From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/50409 Path: main.gmane.org!not-for-mail From: sigurd@12move.de (Karl =?iso-8859-1?q?Pfl=E4sterer?=) Newsgroups: gmane.emacs.gnus.general Subject: Re: Slighty improved regexps for citations Date: Wed, 26 Feb 2003 23:11:23 +0100 Organization: Lemis World Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1046297685 30591 80.91.224.249 (26 Feb 2003 22:14:45 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 26 Feb 2003 22:14:45 +0000 (UTC) Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18o9p4-0007ww-00 for ; Wed, 26 Feb 2003 23:14:42 +0100 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 18o9oM-0001c7-00; Wed, 26 Feb 2003 16:13:58 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Wed, 26 Feb 2003 16:14:57 -0600 (CST) Original-Received: from sclp3.sclp.com (sclp3.sclp.com [66.230.238.2]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id QAA14061 for ; Wed, 26 Feb 2003 16:14:43 -0600 (CST) Original-Received: (qmail 49375 invoked by alias); 26 Feb 2003 22:13:24 -0000 Original-Received: (qmail 49369 invoked from network); 26 Feb 2003 22:13:24 -0000 Original-Received: from quimby.gnus.org (80.91.224.244) by 66.230.238.6 with SMTP; 26 Feb 2003 22:13:24 -0000 Original-Received: from news by quimby.gnus.org with local (Exim 3.12 #1 (Debian)) id 18oA49-0004Ud-00 for ; Wed, 26 Feb 2003 23:30:17 +0100 Original-To: ding@gnus.org Original-Path: wintendo.pflaesterer.de!not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 54 Original-NNTP-Posting-Host: p62.246.146.57.tisdip.tiscali.de Original-X-Trace: quimby.gnus.org 1046298617 17274 62.246.146.57 (26 Feb 2003 22:30:17 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: 26 Feb 2003 22:30:17 GMT X-Face: #iIcL\6>Qj/G*F@AL9T*v/R$j@7Q`6#FU&Flg6u6aVsLdWf(H$U5>:;&*>oy>jOIWgA%8w* A!V7X`\fEGoQ[@D'@i^*p3FCC6&Rg~JT/H_*MOX;"o~flADb8^ Mail-Copies-To: never User-Agent: Oort Gnus v0.16 Hamster/2.0.0.1 Cancel-Lock: sha1:OAHDgPMIAjA1jKWsGIwmfLP8XYo= Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:50409 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:50409 On Wed, 26 Feb 2003, Karl Pflästerer <- sigurd@12move.de wrote: [some code] Here is a different approach. (let (mcpr1 mcpr2) (setq mcpr1 (if (string-match "[[:digit:]]" "1");; support POSIX? (concat "[ \t]*[-_.[:word:]]+>+\\|" "[ \t]*[>|]") ;; ?-, ?_ or ?. MUST NOT be in syntax entry w. (let ((old-table (syntax-table)) non-word-constituents) (set-syntax-table text-mode-syntax-table) (setq non-word-constituents (concat (if (string-match "\\w" "-") "" "-") (if (string-match "\\w" "_") "" "_") (if (string-match "\\w" ".") "" "."))) (set-syntax-table old-table) (if (equal non-word-constituents "") (concat "[ \t]*\\(\\w\\)+>+\\|" "[ \t]*[>|]") (concat "[ \t]*\\(\\w\\|[" non-word-constituents "]\\)+>+\\|" "[ \t]*[>|]")))) mcpr2 "[ \t]*[>|+:][^-]") (setq message-cite-prefix-regexp-alist (list (cons 'simple (concat "\\(" mcpr1 "\\)+")) (cons 'full (concat "\\(" mcpr1 "\\|" mcpr2 "\\)+"))))) (setq message-cite-prefix-regexp-value 'full) (setq message-cite-prefix-regexp (cdr (assq message-cite-prefix-regexp-value message-cite-prefix-regexp-alist))) It's shorter and perhaps it's easier to add new elements. bye KP -- And as in uffish thought he stood, The Jabberwock, with eyes of flame, Came whiffling through the tulgey wood, And burbled as it came! "Lewis Carroll" "Jabberwocky"