(gnus-cite-ignore-quoted-from): New user option.
authorKatsumi Yamaoka <yamaoka@jpl.org>
Wed, 23 Jun 2004 09:58:24 +0000 (09:58 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Wed, 23 Jun 2004 09:58:24 +0000 (09:58 +0000)
(gnus-cite-parse): Ignore quoted envelope From_.  Suggested by Karl Chen.

lisp/ChangeLog
lisp/gnus-cite.el

index 9869ce0..525a8d5 100644 (file)
@@ -1,3 +1,9 @@
+2004-06-23  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus-cite.el (gnus-cite-ignore-quoted-from): New user option.
+       (gnus-cite-parse): Ignore quoted envelope From_.  Suggested by
+       Karl Chen <quarl@nospam.quarl.org>.
+
 2004-06-23  Jesper Harder  <harder@ifa.au.dk>
 
        * message.el (message-idna-to-ascii-rhs-1): Don't choke on
index 9c1d57b..fb44773 100644 (file)
@@ -1,6 +1,6 @@
 ;;; gnus-cite.el --- parse citations in articles for Gnus
 
-;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
 ;;        Free Software Foundation, Inc.
 
 ;; Author: Per Abhiddenware
@@ -127,6 +127,13 @@ The text matching the first grouping will be used as a button."
   :group 'gnus-cite
   :type 'regexp)
 
+(defcustom gnus-cite-ignore-quoted-from t
+  "Non-nil means don't regard lines beginning with \">From \" as cited text.
+Those lines may have been quoted by MTAs in order not to mix up with
+the envelope From line."
+  :group 'gnus-cite
+  :type 'boolean)
+
 (defface gnus-cite-attribution-face '((t
                                       (:italic t)))
   "Face used for attribution lines.")
@@ -739,6 +746,10 @@ See also the documentation for `gnus-article-highlight-citation'."
       ;; Ignore very long prefixes.
       (when (> end (+ begin gnus-cite-max-prefix))
        (setq end (+ begin gnus-cite-max-prefix)))
+      ;; Ignore quoted envelope From_.
+      (when (and gnus-cite-ignore-quoted-from
+                (looking-at ">from "))
+       (setq end (1+ begin)))
       (while (re-search-forward prefix-regexp (1- end) t)
        ;; Each prefix.
        (setq end (match-end 0)