From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/33321 Path: main.gmane.org!not-for-mail From: dme@dme.org Newsgroups: gmane.emacs.gnus.general Subject: Re: someone broke message-newline-and-reformat Date: 12 Nov 2000 11:21:07 +0000 Sender: owner-ding@hpc.uh.edu Message-ID: <878zqph1wc.fsf@serafina-pekkala.dme.org> References: <874s1gm1al.fsf@serafina-pekkala.dme.org> <87k8aabbmx.fsf@serafina-pekkala.dme.org> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1035169452 24552 80.91.224.250 (21 Oct 2002 03:04:12 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 03:04:12 +0000 (UTC) Cc: Vladimir Volovich , ding@gnus.org Return-Path: Original-Received: from spinoza.math.uh.edu (spinoza.math.uh.edu [129.7.128.18]) by mailhost.sclp.com (Postfix) with ESMTP id 07669D049A for ; Sun, 12 Nov 2000 06:22:28 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by spinoza.math.uh.edu (8.9.1/8.9.1) with ESMTP id FAB20755; Sun, 12 Nov 2000 05:22:01 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sun, 12 Nov 2000 05:21:04 -0600 (CST) Original-Received: from mailhost.sclp.com (postfix@66-209.196.61.interliant.com [209.196.61.66] (may be forged)) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id FAA05245 for ; Sun, 12 Nov 2000 05:20:49 -0600 (CST) Original-Received: from finch-post-11.mail.demon.net (finch-post-11.mail.demon.net [194.217.242.39]) by mailhost.sclp.com (Postfix) with ESMTP id DAB71D049A for ; Sun, 12 Nov 2000 06:21:10 -0500 (EST) Original-Received: from serafina-pekkala.dme.org ([212.240.232.117]) by finch-post-11.mail.demon.net with esmtp (Exim 2.12 #1) id 13uvC8-0007zE-0B; Sun, 12 Nov 2000 11:21:08 +0000 Original-To: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai =?iso-8859-1?q?Gro=DFjohann?=) In-Reply-To: <87k8aabbmx.fsf@serafina-pekkala.dme.org> Original-Lines: 186 User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Canyonlands) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:33321 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:33321 Here's the patch mentioned. I'd be obliged of a couple of people could test this before it is committed - particularly those who use or see non-us-ascii citation leaders (as indicated by Vladimir). Index: lisp/ChangeLog =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /usr/local/cvsroot/gnus/lisp/ChangeLog,v retrieving revision 6.91 diff -u -r6.91 ChangeLog --- lisp/ChangeLog 2000/11/10 11:06:52 6.91 +++ lisp/ChangeLog 2000/11/12 09:40:13 @@ -1,3 +1,15 @@ +2000-11-12 David Edmondson + + * message.el (message-cite-prefix-regexp): moved from gnus-cite.el + and replace `.' with `\w' to allow for different syntax tables + (from Vladimir Volovich). + * message.el (message-newline-and-reformat): use + `message-cite-prefix-regexp'. + * gnus-cite.el (gnus-supercite-regexp): use + `message-cite-prefix-regexp'. + * gnus-cite.el (gnus-cite-parse): use + `message-cite-prefix-regexp'. + 2000-11-07 Kai Gro=DFjohann =20 * gnus-sum.el (gnus-move-split-methods): Say that Index: lisp/gnus-cite.el =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /usr/local/cvsroot/gnus/lisp/gnus-cite.el,v retrieving revision 6.0 diff -u -r6.0 gnus-cite.el --- lisp/gnus-cite.el 2000/10/27 23:11:23 6.0 +++ lisp/gnus-cite.el 2000/11/12 09:40:22 @@ -26,6 +26,7 @@ (require 'gnus) (require 'gnus-art) (require 'gnus-range) +(require 'message) ; for message-cite-prefix-regexp =20 ;;; Customization: =20 @@ -74,19 +75,13 @@ :type '(choice (const :tag "all" nil) integer)) =20 -(defcustom gnus-cite-prefix-regexp - "^[]>=BB|:}+ ]*[]>=BB|:}+]\\(.*>=BB\\)?\\|^.*>" - "*Regexp matching the longest possible citation prefix on a line." - :group 'gnus-cite - :type 'regexp) - (defcustom gnus-cite-max-prefix 20 "Maximum possible length for a citation prefix." :group 'gnus-cite :type 'integer) =20 (defcustom gnus-supercite-regexp - (concat "^\\(" gnus-cite-prefix-regexp "\\)? *" + (concat "^\\(" message-cite-prefix-regexp "\\)? *" ">>>>> +\"\\([^\"\n]+\\)\" +=3D=3D") "*Regexp matching normal Supercite attribution lines. The first grouping must match prefixes added by other packages." @@ -306,7 +301,7 @@ corresponding citation merged with `gnus-cite-attribution-face'. =20 Text is considered cited if at least `gnus-cite-minimum-match-count' -lines matches `gnus-cite-prefix-regexp' with the same prefix. +lines matches `message-cite-prefix-regexp' with the same prefix. =20 Lines matching `gnus-cite-attribution-suffix' and perhaps `gnus-cite-attribution-prefix' are considered attribution lines." @@ -679,7 +674,7 @@ ;; Ignore very long prefixes. (when (> end (+ (point) gnus-cite-max-prefix)) (setq end (+ (point) gnus-cite-max-prefix))) - (while (re-search-forward gnus-cite-prefix-regexp (1- end) t) + (while (re-search-forward message-cite-prefix-regexp (1- end) t) ;; Each prefix. (setq end (match-end 0) prefix (buffer-substring begin end)) Index: lisp/message.el =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /usr/local/cvsroot/gnus/lisp/message.el,v retrieving revision 6.7 diff -u -r6.7 message.el --- lisp/message.el 2000/11/04 17:13:56 6.7 +++ lisp/message.el 2000/11/12 09:41:07 @@ -331,6 +331,12 @@ :group 'message-insertion :type 'regexp) =20 +(defcustom message-cite-prefix-regexp + "^[]>=BB|:}+ ]*[]>=BB|:}+]\\(\\w*>=BB\\)?\\|^\\w*>" + "*Regexp matching the longest possible citation prefix on a line." + :group 'message-insertion + :type 'regexp) + (defcustom message-cancel-message "I am canceling my own article.\n" "Message to be inserted in the cancel message." :group 'message-interface @@ -1711,21 +1717,18 @@ (defun message-newline-and-reformat () "Insert four newlines, and then reformat if inside quoted text." (interactive) - (let ((prefix "[]>=BB|:}+ \t]*") - (supercite-thing "[-._a-zA-Z0-9]*[>]+[ \t]*") - quoted point) + (let (quoted point) (unless (bolp) (save-excursion - (beginning-of-line) - (when (looking-at (concat prefix "\\|" - supercite-thing)) - (setq quoted (match-string 0)))) + (beginning-of-line) + (when (looking-at message-cite-prefix-regexp) + (setq quoted (match-string 0)))) (insert "\n")) (setq point (point)) (insert "\n\n\n") (delete-region (point) (re-search-forward "[ \t]*")) (when quoted - (insert quoted)) + (insert quoted " ")) (fill-paragraph nil) (goto-char point) (forward-line 1))) Index: texi/ChangeLog =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /usr/local/cvsroot/gnus/texi/ChangeLog,v retrieving revision 6.8 diff -u -r6.8 ChangeLog --- texi/ChangeLog 2000/11/10 11:06:46 6.8 +++ texi/ChangeLog 2000/11/12 09:41:15 @@ -1,3 +1,10 @@ +2000-11-12 David Edmondson + + * gnus.texi: remove `gnus-cite-prefix-regexp'. + + * message.texi (Insertion): move `gnus-cite-prefix-regexp' from + gnus.texi to here and rename to `message-cite-prefix-regexp'. + 2000-11-07 Kai Gro=DFjohann =20 * gnus.texi (Mail Group Commands): `gnus-move-split-methods' uses Index: texi/gnus.texi =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /usr/local/cvsroot/gnus/texi/gnus.texi,v retrieving revision 6.10 diff -u -r6.10 gnus.texi --- texi/gnus.texi 2000/11/10 11:06:42 6.10 +++ texi/gnus.texi 2000/11/12 09:44:48 @@ -6995,10 +6995,6 @@ If the article size if bigger than this variable (which is 25000 by default), no citation highlighting will be performed. =20 -@item gnus-cite-prefix-regexp -@vindex gnus-cite-prefix-regexp -Regexp matching the longest possible citation prefix on a line. - @item gnus-cite-max-prefix @vindex gnus-cite-max-prefix Maximum possible length for a citation prefix (default 20). Index: texi/message.texi =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /usr/local/cvsroot/gnus/texi/message.texi,v retrieving revision 6.0 diff -u -r6.0 message.texi --- texi/message.texi 2000/10/27 23:12:30 6.0 +++ texi/message.texi 2000/11/12 09:45:00 @@ -464,6 +464,10 @@ messages. The default is @samp{.}, which means that all headers will be removed. =20 +@item message-cite-prefix-regexp +@vindex message-cite-prefix-regexp +Regexp matching the longest possible citation prefix on a line. + @item message-citation-line-function @vindex message-citation-line-function Function called to insert the citation line. The default is dme.