Synch with Gnus.
[elisp/gnus.git-] / lisp / message.el
index 6229384..124c154 100644 (file)
@@ -436,6 +436,13 @@ The provided functions are:
   :group 'message-insertion
   :type 'regexp)
 
+(defcustom message-cite-prefix-regexp
+  ;; ?-, ?_ or ?. MUST NOT be in syntax entry w.
+  "[ \t]*\\(\\(\\w\\|[-_.]\\)+>+[ \t]*\\|[]>»|:}+][ \t]*\\)+"
+  "*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
@@ -1175,10 +1182,12 @@ See also the documentations for the following variables:
 
 (defvar message-font-lock-keywords-2
   (append message-font-lock-keywords-1
-         '((message-font-lock-cited-text-matcher
+         `((message-font-lock-cited-text-matcher
             (1 'message-cited-text-face)
             (2 'message-cited-text-face))
-           ("<#/?\\(multipart\\|part\\|external\\).*>"
+           (,(concat "^\\(" message-cite-prefix-regexp "\\).*")
+            (0 'message-cited-text-face))
+           ("<#/?\\(multipart\\|part\\|external\\|mml\\).*>"
             (0 'message-mml-face)))))
 
 (defvar message-font-lock-keywords message-font-lock-keywords-2
@@ -1898,7 +1907,7 @@ M-RET    message-newline-and-reformat (break the line and reformat)."
         (concat
          "[ \t]*"                      ; possible initial space
          "\\(\\(" (regexp-quote message-yank-prefix) "\\|" ; user's prefix
-         "\\w+>\\|"                    ; supercite-style prefix
+         "\\(\\w\\|[-_.]\\)+>\\|"      ; supercite-style prefix
          "[|:>]"                       ; standard prefix
          "\\)[ \t]*\\)+")))            ; possible space after each prefix
     (setq paragraph-start
@@ -2120,14 +2129,11 @@ 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))
@@ -4542,8 +4548,7 @@ that further discussion should take place only in "
           (if (and mft
                    message-use-followup-to
                    (or (not (eq message-use-followup-to 'ask))
-                       (message-y-or-n-p
-                       (concat "Obey Mail-Followup-To? ") t "\
+                       (message-y-or-n-p "Obey Mail-Followup-To? " t "\
 You should normally obey the Mail-Followup-To: header.  In this
 article, it has the value of