1 ;;; gnus-cite.el --- parse citations in articles for Gnus
3 ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
4 ;; Free Software Foundation, Inc.
6 ;; Author: Per Abhiddenware
8 ;; This file is part of GNU Emacs.
10 ;; GNU Emacs is free software; you can redistribute it and/or modify
11 ;; it under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 2, or (at your option)
15 ;; GNU Emacs is distributed in the hope that it will be useful,
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;; GNU General Public License for more details.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 ;; Boston, MA 02111-1307, USA.
29 (eval-when-compile (require 'cl))
33 (require 'message) ; for message-cite-prefix-regexp
37 (defgroup gnus-cite nil
40 :link '(custom-manual "(gnus)Article Highlighting")
43 (defcustom gnus-cited-opened-text-button-line-format "%(%{[-]%}%)\n"
44 "Format of opened cited text buttons."
48 (defcustom gnus-cited-closed-text-button-line-format "%(%{[+]%}%)\n"
49 "Format of closed cited text buttons."
53 (defcustom gnus-cited-lines-visible nil
54 "The number of lines of hidden cited text to remain visible.
55 Or a pair (cons) of numbers which are the number of lines at the top
56 and bottom of the text, respectively, to remain visible."
58 :type '(choice (const :tag "none" nil)
60 (cons :tag "Top and Bottom" integer integer)))
62 (defcustom gnus-cite-parse-max-size 25000
63 "Maximum article size (in bytes) where parsing citations is allowed.
64 Set it to nil to parse all articles."
66 :type '(choice (const :tag "all" nil)
69 (defcustom gnus-cite-max-prefix 20
70 "Maximum possible length for a citation prefix."
74 (defcustom gnus-supercite-regexp
75 (concat "^\\(" message-cite-prefix-regexp "\\)? *"
76 ">>>>> +\"\\([^\"\n]+\\)\" +==")
77 "*Regexp matching normal Supercite attribution lines.
78 The first grouping must match prefixes added by other packages."
82 (defcustom gnus-supercite-secondary-regexp "^.*\"\\([^\"\n]+\\)\" +=="
83 "Regexp matching mangled Supercite attribution lines.
84 The first regexp group should match the Supercite attribution."
88 (defcustom gnus-cite-minimum-match-count 2
89 "Minimum number of identical prefixes before we believe it's a citation."