2000-11-17 08:02 ShengHuo ZHU <zsh@cs.rochester.edu>
[gnus] / lisp / message.el
index 4cb92ed..cbcfabb 100644 (file)
@@ -332,7 +332,8 @@ The provided functions are:
   :type 'regexp)
 
 (defcustom message-cite-prefix-regexp
-  "^[]>»|:}+ ]*[]>»|:}+]\\(\\w*>»\\)?\\|^\\w*>"
+  ;; ?-, ?_ or ?. MUST NOT be in syntax entry w.
+  "\\([ \t]*\\(\\w\\|[-_.]\\)+>+\\|[ \t]*[]>»|:}+]\\)+"
   "*Regexp matching the longest possible citation prefix on a line."
   :group 'message-insertion
   :type 'regexp)
@@ -826,9 +827,7 @@ Defaults to `text-mode-abbrev-table'.")
   :group 'message-faces)
 
 (defvar message-font-lock-keywords
-  (let* ((cite-prefix "A-Za-z")
-        (cite-suffix (concat cite-prefix "0-9_.@-"))
-        (content "[ \t]*\\(.+\\(\n[ \t].*\\)*\\)\n?"))
+  (let ((content "[ \t]*\\(.+\\(\n[ \t].*\\)*\\)\n?"))
     `((,(concat "^\\([Tt]o:\\)" content)
        (1 'message-header-name-face)
        (2 'message-header-to-face nil t))
@@ -852,9 +851,7 @@ Defaults to `text-mode-abbrev-table'.")
            `((,(concat "^\\(" (regexp-quote mail-header-separator) "\\)$")
               1 'message-separator-face))
          nil)
-      (,(concat "^[ \t]*"
-               "\\([" cite-prefix "]+[" cite-suffix "]*\\)?"
-               "[:>|}].*")
+      (,(concat "^\\(" message-cite-prefix-regexp "\\).*")
        (0 'message-cited-text-face))
       ("<#/?\\(multipart\\|part\\|external\\|mml\\).*>"
        (0 'message-mml-face))))
@@ -1525,7 +1522,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
@@ -1721,14 +1718,14 @@ With the prefix argument FORCE, insert the header anyway."
     (unless (bolp)
       (save-excursion
        (beginning-of-line)
-       (when (looking-at message-cite-prefix-regexp)
+       (when (looking-at (concat message-cite-prefix-regexp "[ \t]*"))
          (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)))