From: sigurd@12move.de (Karl Pflästerer)
Subject: Re: Slighty improved regexps for citations
Date: Wed, 26 Feb 2003 23:11:23 +0100 [thread overview]
Message-ID: <m3d6lek86o.fsf@hamster.pflaesterer.de> (raw)
In-Reply-To: <m33cmbkked.fsf@hamster.pflaesterer.de>
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"
next prev parent reply other threads:[~2003-02-26 22:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-25 20:27 Karl Pflästerer
2003-02-25 21:06 ` Karl Pflästerer
[not found] ` <hhk7fnrxnc.fsf@blah.pl>
2003-02-26 17:05 ` Karl Pflästerer
2003-02-25 21:19 ` Reiner Steib
2003-02-25 22:05 ` Karl Pflästerer
2003-02-25 22:27 ` Karl Pflästerer
2003-02-25 23:09 ` Frank Schmitt
2003-02-26 16:37 ` Reiner Steib
2003-02-26 17:59 ` Karl Pflästerer
2003-02-26 22:11 ` Karl Pflästerer [this message]
2003-02-25 21:33 ` Raymond Scholz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3d6lek86o.fsf@hamster.pflaesterer.de \
--to=sigurd@12move.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).