(marginal 10-line change.)
authorShengHuo ZHU <zsh@cs.rochester.edu>
Sun, 12 Nov 2000 13:36:10 +0000 (13:36 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Sun, 12 Nov 2000 13:36:10 +0000 (13:36 +0000)
2000-11-12  David Edmondson  <dme@dme.org>

* 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'.

lisp/ChangeLog
lisp/gnus-cite.el
lisp/message.el
texi/ChangeLog
texi/gnus.texi
texi/message.texi

index 455da8c..c8815dd 100644 (file)
@@ -1,3 +1,15 @@
+2000-11-12  David Edmondson  <dme@dme.org>
+       
+       * 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-12 08:52:46  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * mml2015.el (mml2015-mailcrypt-verify): Replace armors with
index 0b7f42f..0a59f65 100644 (file)
@@ -26,6 +26,7 @@
 (require 'gnus)
 (require 'gnus-art)
 (require 'gnus-range)
+(require 'message)     ; for message-cite-prefix-regexp
 
 ;;; Customization:
 
@@ -74,19 +75,13 @@ Set it to nil to parse all articles."
   :type '(choice (const :tag "all" nil)
                 integer))
 
-(defcustom gnus-cite-prefix-regexp
-  "^[]>»|:}+ ]*[]>»|:}+]\\(.*>»\\)?\\|^.*>"
-  "*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)
 
 (defcustom gnus-supercite-regexp
-  (concat "^\\(" gnus-cite-prefix-regexp "\\)? *"
+  (concat "^\\(" message-cite-prefix-regexp "\\)? *"
          ">>>>> +\"\\([^\"\n]+\\)\" +==")
   "*Regexp matching normal Supercite attribution lines.
 The first grouping must match prefixes added by other packages."
@@ -306,7 +301,7 @@ Attribution lines are highlighted with the same face as the
 corresponding citation merged with `gnus-cite-attribution-face'.
 
 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.
 
 Lines matching `gnus-cite-attribution-suffix' and perhaps
 `gnus-cite-attribution-prefix' are considered attribution lines."
@@ -679,7 +674,7 @@ See also the documentation for `gnus-article-highlight-citation'."
       ;; 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 40f581d..4cb92ed 100644 (file)
@@ -331,6 +331,12 @@ The provided functions are:
   :group 'message-insertion
   :type 'regexp)
 
+(defcustom message-cite-prefix-regexp
+  "^[]>»|:}+ ]*[]>»|:}+]\\(\\w*>»\\)?\\|^\\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 @@ With the prefix argument FORCE, insert the header anyway."
 (defun message-newline-and-reformat ()
   "Insert four newlines, and then reformat if inside quoted text."
   (interactive)
-  (let ((prefix "[]>»|:}+ \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))
+       (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 f6c68d6..0bd7475 100644 (file)
@@ -1,3 +1,10 @@
+2000-11-12  David Edmondson  <dme@dme.org>
+
+       * 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-11  Simon Josefsson  <sj@extundo.com>
 
        * message.texi (Security): Add.
index 4e72a3d..c719f49 100644 (file)
@@ -6995,10 +6995,6 @@ Some variables to customize the citation highlights:
 If the article size if bigger than this variable (which is 25000 by
 default), no citation highlighting will be performed.
 
-@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 f5db014..68cf4c3 100644 (file)
@@ -465,6 +465,10 @@ All headers that match this regexp will be removed from yanked
 messages.  The default is @samp{.}, which means that all headers will be
 removed.
 
+@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