Gnus development mailing list
 help / color / mirror / Atom feed
* Slighty improved regexps for citations
@ 2003-02-25 20:27 Karl Pflästerer
  2003-02-25 21:06 ` Karl Pflästerer
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Karl Pflästerer @ 2003-02-25 20:27 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 366 bytes --]

Hi,
here are two short patches that allow gnus to grok moer citation signs
(gnus didn't know something about `:' and `#' was only mentioned in
deuglify.el)

Here something for the changelog:

2003-02-25  Karl Pflästerer  <sigurd@12move.de>

	* message.el (message-cite-prefix-regexp): added `:' and `#'

	* deuglify.el (gnus-outlook-deuglify-cite-marks): added `:'


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch for message.el --]
[-- Type: text/x-patch, Size: 599 bytes --]

Index: message.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/message.el,v
retrieving revision 6.306
diff -u -r6.306 message.el
--- message.el	23 Feb 2003 13:39:47 -0000	6.306
+++ message.el	25 Feb 2003 20:32:35 -0000
@@ -504,7 +504,7 @@
 	  "\\([ \t]*\\(\\w\\)+>+\\|[ \t]*[]>|}+]\\)+"
 	(concat "\\([ \t]*\\(\\w\\|["
 		non-word-constituents
-		"]\\)+>+\\|[ \t]*[]>|}+]\\)+"))))
+		"]\\)+>+\\|[ \t]*[]>|:#}+]\\)+"))))
   "*Regexp matching the longest possible citation prefix on a line."
   :group 'message-insertion
   :type 'regexp)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: patch for deuglify.el --]
[-- Type: text/x-patch, Size: 554 bytes --]

Index: deuglify.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/deuglify.el,v
retrieving revision 6.10
diff -u -r6.10 deuglify.el
--- deuglify.el	8 Feb 2003 21:20:53 -0000	6.10
+++ deuglify.el	25 Feb 2003 20:33:47 -0000
@@ -244,7 +244,7 @@
   :type 'number
   :group 'gnus-outlook-deuglify)
 
-(defcustom gnus-outlook-deuglify-cite-marks ">|#%"
+(defcustom gnus-outlook-deuglify-cite-marks ">|#%:"
   "Characters that indicate cited lines."
   :type 'string
   :group 'gnus-outlook-deuglify)

[-- Attachment #4: Type: text/plain, Size: 152 bytes --]


bye
   KP

-- 
Männer der Wissenschaft! Man sagt ihr viele nach, 
aber die meisten mit Unrecht.  
                             Karl Kraus 'Aphorismen'

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Slighty improved regexps for citations
  2003-02-25 20:27 Slighty improved regexps for citations Karl Pflästerer
@ 2003-02-25 21:06 ` Karl Pflästerer
       [not found]   ` <hhk7fnrxnc.fsf@blah.pl>
  2003-02-25 21:19 ` Reiner Steib
  2003-02-25 21:33 ` Raymond Scholz
  2 siblings, 1 reply; 11+ messages in thread
From: Karl Pflästerer @ 2003-02-25 21:06 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 392 bytes --]

Sorry there was a little error (I forgot the true-part in the regexp for
message.el). Here is the correct patch (the other one again so it's more
convenient for the one who commits)

Here something for the changelog:

2003-02-25  Karl Pflästerer  <sigurd@12move.de>

	* message.el (message-cite-prefix-regexp): added `:' and `#'

	* deuglify.el (gnus-outlook-deuglify-cite-marks): added `:'


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch(2) for message.el --]
[-- Type: text/x-patch, Size: 999 bytes --]

Index: message.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/message.el,v
retrieving revision 6.306
diff -u -r6.306 message.el
--- message.el	23 Feb 2003 13:39:47 -0000	6.306
+++ message.el	25 Feb 2003 21:10:13 -0000
@@ -488,8 +488,9 @@
   :type 'regexp)
 
 (defcustom message-cite-prefix-regexp
+(setq message-cite-prefix-regexp
   (if (string-match "[[:digit:]]" "1") ;; support POSIX?
-      "\\([ \t]*[-_.[:word:]]+>+\\|[ \t]*[]>|}+]\\)+"
+      "\\([ \t]*[-_.[:word:]]+>+\\|[ \t]*[]>|:#}+]\\)+"
     ;; ?-, ?_ or ?. MUST NOT be in syntax entry w.
     (let ((old-table (syntax-table))
 	  non-word-constituents)
@@ -504,7 +505,7 @@
 	  "\\([ \t]*\\(\\w\\)+>+\\|[ \t]*[]>|}+]\\)+"
 	(concat "\\([ \t]*\\(\\w\\|["
 		non-word-constituents
-		"]\\)+>+\\|[ \t]*[]>|}+]\\)+"))))
+		"]\\)+>+\\|[ \t]*[]>|:#}+]\\)+"))))
   "*Regexp matching the longest possible citation prefix on a line."
   :group 'message-insertion
   :type 'regexp)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: patch for deuglify.el --]
[-- Type: text/x-patch, Size: 554 bytes --]

Index: deuglify.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/deuglify.el,v
retrieving revision 6.10
diff -u -r6.10 deuglify.el
--- deuglify.el	8 Feb 2003 21:20:53 -0000	6.10
+++ deuglify.el	25 Feb 2003 20:33:47 -0000
@@ -244,7 +244,7 @@
   :type 'number
   :group 'gnus-outlook-deuglify)
 
-(defcustom gnus-outlook-deuglify-cite-marks ">|#%"
+(defcustom gnus-outlook-deuglify-cite-marks ">|#%:"
   "Characters that indicate cited lines."
   :type 'string
   :group 'gnus-outlook-deuglify)

[-- Attachment #4: Type: text/plain, Size: 193 bytes --]


bye
   KP

-- 
 He took his vorpal sword in hand:
     Long time the manxome foe he sought--
 So rested he by the Tumtum tree,
     And stood awhile in thought.  "Lewis Carroll" "Jabberwocky"

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Slighty improved regexps for citations
  2003-02-25 20:27 Slighty improved regexps for citations Karl Pflästerer
  2003-02-25 21:06 ` 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 21:33 ` Raymond Scholz
  2 siblings, 2 replies; 11+ messages in thread
From: Reiner Steib @ 2003-02-25 21:19 UTC (permalink / raw)


On Tue, Feb 25 2003, Karl Pflästerer wrote:

> here are two short patches that allow gnus to grok moer citation signs
> (gnus didn't know something about `:' and `#' was only mentioned in
> deuglify.el)

IIRC ":" was removed after some discussion here:

,----
| 2002-08-15  Katsumi Yamaoka  <yamaoka@jpl.org>
| [...]
| 	* message.el (message-cite-prefix-regexp): Exclude ":" and "»".
`----

Maybe you'll find the reason for this change in the archives?

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo--- PGP key available via WWW   http://rsteib.home.pages.de/



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Slighty improved regexps for citations
  2003-02-25 20:27 Slighty improved regexps for citations Karl Pflästerer
  2003-02-25 21:06 ` Karl Pflästerer
  2003-02-25 21:19 ` Reiner Steib
@ 2003-02-25 21:33 ` Raymond Scholz
  2 siblings, 0 replies; 11+ messages in thread
From: Raymond Scholz @ 2003-02-25 21:33 UTC (permalink / raw)


* sigurd@12move.de (Karl Pflästerer) wrote:

> 	* message.el (message-cite-prefix-regexp): added `:' and `#'
>
> 	* deuglify.el (gnus-outlook-deuglify-cite-marks): added `:'

This reminds me of the fact that deuglify.el should probably make more
use of existing variables in gnus-art.el and/or message.el to
recognize various parts of the article body (citation, attribution,
signature separator...).

Cheers, Ray
-- 
Hfr fgebat rapelcgvba!



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Slighty improved regexps for citations
  2003-02-25 21:19 ` Reiner Steib
@ 2003-02-25 22:05   ` Karl Pflästerer
  2003-02-25 22:27   ` Karl Pflästerer
  1 sibling, 0 replies; 11+ messages in thread
From: Karl Pflästerer @ 2003-02-25 22:05 UTC (permalink / raw)


On Tue, 25 Feb 2003, Reiner Steib <- 4.uce.03.r.s@nurfuerspam.de wrote:

> IIRC ":" was removed after some discussion here:

> ,----
> | 2002-08-15  Katsumi Yamaoka  <yamaoka@jpl.org>
> | [...]
> | 	* message.el (message-cite-prefix-regexp): Exclude ":" and "»".
> `----

> Maybe you'll find the reason for this change in the archives?

I'll look.  I use that enhanced variable for a long time since I read
groups where posters use these signs.  I never noticed any problems.
But there had surely been a good reason to to remove them.

bye
   KP

-- 
      And has thou slain the Jabberwock?
          Come to my arms, my beamish boy!
      O frabjous day!  Callooh!  Callay!'
          He chortled in his joy.   "Lewis Carroll" "Jabberwocky"



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Slighty improved regexps for citations
  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
  1 sibling, 1 reply; 11+ messages in thread
From: Karl Pflästerer @ 2003-02-25 22:27 UTC (permalink / raw)


On Tue, 25 Feb 2003, Reiner Steib <- 4.uce.03.r.s@nurfuerspam.de wrote:

> Maybe you'll find the reason for this change in the archives?

I found the reason now and IMO it's worth to discuss again about it.
The reason was that people if they /wrote/ a message and a colon was the
first sign in a line gnus thought this line was a quote and so used the
text colour to indicate a citation.  IMO that happens rather seldom but
more often I see articles with a colon as indicator for a citation.

bye
   KP

-- 
 `Beware the Jabberwock, my son!
     The jaws that bite, the claws that catch!
  Beware the Jubjub bird, and shun
    The frumious Bandersnatch!'   "Lewis Carroll" "Jabberwocky"



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Slighty improved regexps for citations
  2003-02-25 22:27   ` Karl Pflästerer
@ 2003-02-25 23:09     ` Frank Schmitt
  2003-02-26 16:37       ` Reiner Steib
  0 siblings, 1 reply; 11+ messages in thread
From: Frank Schmitt @ 2003-02-25 23:09 UTC (permalink / raw)


sigurd@12move.de (Karl Pflästerer) writes:

> On Tue, 25 Feb 2003, Reiner Steib <- 4.uce.03.r.s@nurfuerspam.de wrote:
>
>> Maybe you'll find the reason for this change in the archives?
>
> I found the reason now and IMO it's worth to discuss again about it.
> The reason was that people if they /wrote/ a message and a colon was the
> first sign in a line gnus thought this line was a quote and so used the
> text colour to indicate a citation.  IMO that happens rather seldom but
> more often I see articles with a colon as indicator for a citation.

The right solution would be (IMO) to have two categories of citation
marks: Frequently used ones and seldom used ones.

For the seldom used ones, Gnus should only mark lines beginning with
those as quotes if the are several such lines.

So in article 1

------------------------------------
From: Foo
Subject: Bar

Blindtext Blindtext Blindtext Blindtext Blindtext 
: Blindtext Blindtext Blindtext Blindtext Blindtext 
Blindtext Blindtext Blindtext Blindtext Blindtext 
Blindtext Blindtext Blindtext Blindtext Blindtext 
-----------------------------------

the second line of the body wouldn't be marked as a quote but
in article 2

------------------------------------
From: Foo
Subject: Bar

:Blindtext Blindtext Blindtext Blindtext Blindtext 
Blindtext Blindtext Blindtext Blindtext Blindtext 

:Blindtext Blindtext Blindtext Blindtext Blindtext 
Blindtext Blindtext Blindtext Blindtext Blindtext 
-----------------------------------

lines 1 and 3 of the body should be marked as quotes.

-- 
One Ring to rule them all, One Ring to find them,
One Ring to bring them all and in the darkness bind them
In the Land of Mordor where the Shadows lie.



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Slighty improved regexps for citations
  2003-02-25 23:09     ` Frank Schmitt
@ 2003-02-26 16:37       ` Reiner Steib
  2003-02-26 17:59         ` Karl Pflästerer
  0 siblings, 1 reply; 11+ messages in thread
From: Reiner Steib @ 2003-02-26 16:37 UTC (permalink / raw)


On Wed, Feb 26 2003, Frank Schmitt wrote:

> sigurd@12move.de (Karl Pflästerer) writes:
>> I found the reason now and IMO it's worth to discuss again about
>> it.

JFTR: <news:81sn1ji51m.fsf@zion.bpnetworks.com> ff.
<URL:http://news.gmane.org/onethread.php?group=gmane.emacs.gnus.general&
root=%3C81sn1ji51m.fsf@zion.bpnetworks.com%3E>

>> The reason was that people if they /wrote/ a message and a colon was the
>> first sign in a line gnus thought this line was a quote and so used the
>> text colour to indicate a citation.  

Ah, `message' is required from `gnus-cite.el' and the function
`gnus-cite-parse' uses `message-cite-prefix-regexp'.

>> IMO that happens rather seldom but more often I see articles with a
>> colon as indicator for a citation.

As there seem to be different preferences, I'd suggest to decompose
`message-cite-prefix-regexp'.  The current value looks quite
complicated, so users might be afraid to change it. ;-)

What about adding a simpler variable `message-cite-prefix-chars' (or a
list?) with default value of say `>', `|' and `}' (string ">|}" or a
list).  Then the user could easily add some chars (with concat,
add-to-list, ...?). Or add a variable for extra chars (empty by
default) that is integrated into `message-cite-prefix-regexp' during
the initialization of this variable.  What do you think?

> The right solution would be (IMO) to have two categories of citation
> marks: Frequently used ones and seldom used ones.
>
> For the seldom used ones, Gnus should only mark lines beginning with
> those as quotes if the are several such lines.

Nice idea.  It this feasible?  (I don't grok that font-lock stuff.)

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo--- PGP key available via WWW   http://rsteib.home.pages.de/



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Slighty improved regexps for citations
       [not found]   ` <hhk7fnrxnc.fsf@blah.pl>
@ 2003-02-26 17:05     ` Karl Pflästerer
  0 siblings, 0 replies; 11+ messages in thread
From: Karl Pflästerer @ 2003-02-26 17:05 UTC (permalink / raw)


On Wed, 26 Feb 2003, Maciej Matysiak <- phoner.ding@blah.pl wrote:

> would it be possible to make gnus recongnize ':' as citation prefix,
> but not ':)', ':-)' and other smiley mutations? that'd be prolly quite
> ugly regexp i think, but at the moment i have to remove the colon from
> m-c-p-r (or have hilighted every second line in some mails :( ).

It is possible and the regexp would not be too ugly (well for some
approbiate values of ugly). If we accept that the second char of a
smiley is a dash (if you look at the value of `smiley-regexp-alist'
at the moment that's true).
Then we could write (I rewrote the definition a bit so it is easier to
read):

(setq message-cite-prefix-regexp
	(if (string-match "[[:digit:]]" "1");; support POSIX?
	  (concat
	   "\\("
	   "[ \t]*[-_.[:word:]]+>+\\|"
	   "[ \t]*:+[^-]\\|"
	   "[ \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]*:+[^-]\\|"
	       "[ \t]*[]>|}+]"
	       "\\)+")
	      (concat
	       "\\("
	       "[ \t]*\\(\\w\\|[" non-word-constituents "]\\)+>+\\|"
	       "[ \t]*:+[^-]\\|"
	       "[ \t]*[]>|#}+]"
	       "\\)+")))))

Here a some lines to test if it works:
> should be a citation
> also
: and here
: and there
:- but here not

The best way would be IMO to use the keys of `smiley-regexp-alist'. They
could be retrieved like that:

(let ((smileyreg))
  (dolist (entry smiley-regexp-alist)
    (setq smileyreg (concat smileyreg (and smileyreg "\\|") (car entry))))
  smileyreg)

but the problem is, there are some constructions which are not allowed
in between square brackets.


bye
   KP

-- 
Der wahre Weltuntergang ist die Vernichtung des Geistes, der andere hängt von
dem gleichgiltigen Versuch ab, ob nach der Vernichtung des Geistes noch eine
Welt bestehen kann.
                   Karl Kraus 'Untergang der Welt durch schwarze Magie'



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Slighty improved regexps for citations
  2003-02-26 16:37       ` Reiner Steib
@ 2003-02-26 17:59         ` Karl Pflästerer
  2003-02-26 22:11           ` Karl Pflästerer
  0 siblings, 1 reply; 11+ messages in thread
From: Karl Pflästerer @ 2003-02-26 17:59 UTC (permalink / raw)


On Wed, 26 Feb 2003, Reiner Steib <- 4.uce.03.r.s@nurfuerspam.de wrote:

> On Wed, Feb 26 2003, Frank Schmitt wrote:

>> sigurd@12move.de (Karl Pflästerer) writes:
>>> I found the reason now and IMO it's worth to discuss again about
>>> it.

[...]

>>> The reason was that people if they /wrote/ a message and a colon was
>>> the first sign in a line gnus thought this line was a quote and so
>>> used the text colour to indicate a citation.

> Ah, `message' is required from `gnus-cite.el' and the function
> `gnus-cite-parse' uses `message-cite-prefix-regexp'.

Yep.

[...]

> What about adding a simpler variable `message-cite-prefix-chars' (or a
> list?) with default value of say `>', `|' and `}' (string ">|}" or a
> list).  Then the user could easily add some chars (with concat,
> add-to-list, ...?). Or add a variable for extra chars (empty by
> default) that is integrated into `message-cite-prefix-regexp' during
> the initialization of this variable.  What do you think?

Here is a version with an alist.  The alist could hold a bunch of values
and the user could select the approbiate one by changing the value of
`message-cite-prefix-regexp-value' (which could be a symbol).  With
`add-to-list' the user could easily add new alist entrys. Or the alist
could be written with `defcustom'.  To add a variable seems to me not
convenient enough and also not very flexible. We would end were we stay
now: a lot of users frob that variable in `.gnus' to fit their
preferences.  For that they have to know a bit about regexps so a
(possible long) alist would be easier to use especially for newbies[a]


(defcustom message-cite-prefix-regexp-value 'full)

(setq message-cite-prefix-regexp-alist
	(list
	 (cons 'full
	       (if (string-match "[[:digit:]]" "1");; support POSIX?
		(concat
		 "\\("
		 "[ \t]*[-_.[:word:]]+>+\\|"
		 "[ \t]*:+[^-]\\|"
		 "[ \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]*:+[^-]\\|"
		     "[ \t]*[]>|}+]"
		     "\\)+")
		    (concat
		     "\\("
		     "[ \t]*\\(\\w\\|[" non-word-constituents "]\\)+>+\\|"
		     "[ \t]*:+[^-]\\|"
		     "[ \t]*[]>|#}+]"
		     "\\)+")))))
	 (cons 'simple
	       (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]*[>|]"
		     "\\)+")))))))

(setq message-cite-prefix-regexp
	(cdr (assq message-cite-prefix-regexp-value
	message-cite-prefix-regexp-alist)))


>> For the seldom used ones, Gnus should only mark lines beginning with
>> those as quotes if the are several such lines.

> Nice idea.  It this feasible?  (I don't grok that font-lock stuff.)

But that happens already for *all* citation marks.
,------------------------------------------------------------------------. 
| `gnus-cite-minimum-match-count' is a variable declared in Lisp.         |
|   -- loaded from "gnus-cite"                                            |
|                                                                         |
| Value: 2                                                                |
|                                                                         |
| Documentation:                                                          |
| Minimum number of identical prefixes before we believe it's a citation. |
|                                                                         |
`------------------------------------------------------------------------´ 

bye
   KP

_____
[a] (BTW what's the name for new Gnus users: gnubies? :-) I like it
-- 
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"



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Slighty improved regexps for citations
  2003-02-26 17:59         ` Karl Pflästerer
@ 2003-02-26 22:11           ` Karl Pflästerer
  0 siblings, 0 replies; 11+ messages in thread
From: Karl Pflästerer @ 2003-02-26 22:11 UTC (permalink / raw)


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"



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2003-02-26 22:11 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-25 20:27 Slighty improved regexps for citations 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
2003-02-25 21:33 ` Raymond Scholz

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).