* message.el (message-cite-original-1): Don't call
authorKatsumi Yamaoka <yamaoka@jpl.org>
Fri, 9 Feb 2007 09:35:28 +0000 (09:35 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Fri, 9 Feb 2007 09:35:28 +0000 (09:35 +0000)
 gnus-article-highlight-citation.

* gnus-cite.el (gnus-cite-parse): Work with two or more MS-type citations;
 fix line count.

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

index f9b44c1..a56e7e8 100644 (file)
@@ -1,3 +1,11 @@
+2007-02-09  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * message.el (message-cite-original-1): Don't call
+       gnus-article-highlight-citation.
+
+       * gnus-cite.el (gnus-cite-parse): Work with two or more MS-type
+       citations; fix line count.
+
 2007-02-08  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * gnus-cite.el (gnus-test-font-lock-add-keywords): New function.
index 8bb687c..2cad55a 100644 (file)
@@ -821,13 +821,24 @@ See also the documentation for `gnus-article-highlight-citation'."
       (setq line (1+ line)))
     ;; Horrible special case for some Microsoft mailers.
     (goto-char (point-min))
-    (when (re-search-forward gnus-cite-unsightly-citation-regexp max t)
-      (setq begin (count-lines (point-min) (point)))
-      (setq end (count-lines (point-min) max))
-      (setq entry nil)
-      (while (< begin end)
-       (push begin entry)
-       (setq begin (1+ begin)))
+    (setq start t begin nil entry nil)
+    (while start
+      ;; Assume this search ends up at the beginning of a line.
+      (if (re-search-forward gnus-cite-unsightly-citation-regexp max t)
+         (progn
+           (when (number-or-marker-p start)
+             (setq begin (count-lines (point-min) start)
+                   end (count-lines (point-min) (match-beginning 0))))
+           (setq start (match-end 0)))
+       (when (number-or-marker-p start)
+         (setq begin (count-lines (point-min) start)
+               end (count-lines (point-min) max)))
+       (setq start nil))
+      (when begin
+       (while (< begin end)
+         ;; Need to do 1+ because we're in the bol.
+         (push (setq begin (1+ begin)) entry))))
+    (when entry
       (push (cons "" entry) alist))
     ;; We got all the potential prefixes.  Now create
     ;; `gnus-cite-prefix-alist' containing the oldest prefix for each
index b04b0e3..1952a4f 100644 (file)
@@ -3606,21 +3606,14 @@ This function uses `mail-citation-hook' if that is non-nil."
        (unless (bolp)
          (insert "\n"))
        (funcall message-citation-line-function))
-      (if (and x-no-archive
-              (not message-cite-articles-with-x-no-archive)
-              (string-match "yes" x-no-archive))
-         (progn
-           (undo-boundary)
-           (delete-region (point) (mark t))
-           (insert "> [Quoted text removed due to X-No-Archive]\n")
-           (push-mark)
-           (forward-line -1))
-       ;; FIXME: Doesn't handle first attribution line correctly.  Probably
-       ;; font-lock looks for "\n\n" to find start of mail message.
-       (when (and (boundp 'gnus-message-highlight-citation)
-                  gnus-message-highlight-citation
-                  (fboundp 'gnus-article-highlight-citation))
-         (gnus-article-highlight-citation nil t))))))
+      (when (and x-no-archive
+                (not message-cite-articles-with-x-no-archive)
+                (string-match "yes" x-no-archive))
+       (undo-boundary)
+       (delete-region (point) (mark t))
+       (insert "> [Quoted text removed due to X-No-Archive]\n")
+       (push-mark)
+       (forward-line -1)))))
 
 (defun message-cite-original ()
   "Cite function in the standard Message manner."