Commit | Line | Data |
---|---|---|
185a608e | 1 | ;;; gnus-cite.el --- parse citations in articles for Gnus -*- coding: iso-latin-1 -*- |
eec82323 | 2 | |
43273f39 | 3 | ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 |
16409b0b GM |
4 | ;; Free Software Foundation, Inc. |
5 | ||
6 | ;; Author: Per Abhiddenware | |
7 | ||
8 | ;; This file is part of GNU Emacs. | |
9 | ||
10 | ;; GNU Emacs is free software; you can redistribute it and/or modify | |
eec82323 LMI |
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) | |
13 | ;; any later version. | |
14 | ||
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. | |
19 | ||
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. | |
24 | ||
25 | ;;; Commentary: | |
26 | ||
27 | ;;; Code: | |
28 | ||
5ab7173c RS |
29 | (eval-when-compile (require 'cl)) |
30 | ||
eec82323 LMI |
31 | (require 'gnus) |
32 | (require 'gnus-art) | |
33 | (require 'gnus-range) | |
34 | ||
35 | ;;; Customization: | |
36 | ||
37 | (defgroup gnus-cite nil | |
38 | "Citation." | |
39 | :prefix "gnus-cite-" | |
40 | :link '(custom-manual "(gnus)Article Highlighting") | |
41 | :group 'gnus-article) | |
42 | ||
43 | (defcustom gnus-cite-reply-regexp | |
44 | "^\\(Subject: Re\\|In-Reply-To\\|References\\):" | |
6748645f | 45 | "*If headers match this regexp it is reasonable to believe that |
eec82323 LMI |
46 | article has citations." |
47 | :group 'gnus-cite | |
48 | :type 'string) | |
49 | ||
50 | (defcustom gnus-cite-always-check nil | |
16409b0b | 51 | "Check article always for citations. Set it t to check all articles." |
eec82323 LMI |
52 | :group 'gnus-cite |
53 | :type '(choice (const :tag "no" nil) | |
16409b0b | 54 | (const :tag "yes" t))) |
eec82323 | 55 | |
6748645f LMI |
56 | (defcustom gnus-cited-opened-text-button-line-format "%(%{[-]%}%)\n" |
57 | "Format of opened cited text buttons." | |
58 | :group 'gnus-cite | |
59 | :type 'string) | |
60 | ||
61 | (defcustom gnus-cited-closed-text-button-line-format "%(%{[+]%}%)\n" | |
62 | "Format of closed cited text buttons." | |
eec82323 LMI |
63 | :group 'gnus-cite |
64 | :type 'string) | |
65 | ||
66 | (defcustom gnus-cited-lines-visible nil | |
16409b0b GM |
67 | "The number of lines of hidden cited text to remain visible. |
68 | Or a pair (cons) of numbers which are the number of lines at the top | |
69 | and bottom of the text, respectively, to remain visible." | |
eec82323 LMI |
70 | :group 'gnus-cite |
71 | :type '(choice (const :tag "none" nil) | |
16409b0b GM |
72 | integer |
73 | (cons :tag "Top and Bottom" integer integer))) | |
eec82323 LMI |
74 | |
75 | (defcustom gnus-cite-parse-max-size 25000 | |
76 | "Maximum article size (in bytes) where parsing citations is allowed. | |
77 | Set it to nil to parse all articles." | |
78 | :group 'gnus-cite | |
79 | :type '(choice (const :tag "all" nil) | |
80 | integer)) | |
81 | ||
82 | (defcustom gnus-cite-prefix-regexp | |
185a608e | 83 | ;; The Latin-1 angle quote looks pretty dubious. -- fx |
16409b0b | 84 |