PageRenderTime 65ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 3ms

/lisp/gnus/gnus-art.el

http://github.com/typester/emacs
Emacs Lisp | 8630 lines | 7559 code | 610 blank | 461 comment | 118 complexity | ad39fc4b6e91d76c037bdf1ff2e220c5 MD5 | raw file
Possible License(s): GPL-3.0, LGPL-2.0, AGPL-3.0

Large files files are truncated, but you can click here to view the full file

  1. ;;; gnus-art.el --- article mode commands for Gnus
  2. ;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
  3. ;; 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
  4. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
  5. ;; Keywords: news
  6. ;; This file is part of GNU Emacs.
  7. ;; GNU Emacs is free software: you can redistribute it and/or modify
  8. ;; it under the terms of the GNU General Public License as published by
  9. ;; the Free Software Foundation, either version 3 of the License, or
  10. ;; (at your option) any later version.
  11. ;; GNU Emacs is distributed in the hope that it will be useful,
  12. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. ;; GNU General Public License for more details.
  15. ;; You should have received a copy of the GNU General Public License
  16. ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
  17. ;;; Commentary:
  18. ;;; Code:
  19. ;; For Emacs < 22.2.
  20. (eval-and-compile
  21. (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
  22. (eval-when-compile
  23. (require 'cl))
  24. (defvar tool-bar-map)
  25. (defvar w3m-minor-mode-map)
  26. (require 'gnus)
  27. ;; Avoid the "Recursive load suspected" error in Emacs 21.1.
  28. (eval-and-compile
  29. (let ((recursive-load-depth-limit 100))
  30. (require 'gnus-sum)))
  31. (require 'gnus-spec)
  32. (require 'gnus-int)
  33. (require 'gnus-win)
  34. (require 'mm-bodies)
  35. (require 'mail-parse)
  36. (require 'mm-decode)
  37. (require 'mm-view)
  38. (require 'wid-edit)
  39. (require 'mm-uu)
  40. (require 'message)
  41. (autoload 'gnus-msg-mail "gnus-msg" nil t)
  42. (autoload 'gnus-button-mailto "gnus-msg")
  43. (autoload 'gnus-button-reply "gnus-msg" nil t)
  44. (autoload 'parse-time-string "parse-time" nil nil)
  45. (autoload 'ansi-color-apply-on-region "ansi-color")
  46. (autoload 'mm-url-insert-file-contents-external "mm-url")
  47. (autoload 'mm-extern-cache-contents "mm-extern")
  48. (defgroup gnus-article nil
  49. "Article display."
  50. :link '(custom-manual "(gnus)Article Buffer")
  51. :group 'gnus)
  52. (defgroup gnus-article-treat nil
  53. "Treating article parts."
  54. :link '(custom-manual "(gnus)Article Hiding")
  55. :group 'gnus-article)
  56. (defgroup gnus-article-hiding nil
  57. "Hiding article parts."
  58. :link '(custom-manual "(gnus)Article Hiding")
  59. :group 'gnus-article)
  60. (defgroup gnus-article-highlight nil
  61. "Article highlighting."
  62. :link '(custom-manual "(gnus)Article Highlighting")
  63. :group 'gnus-article
  64. :group 'gnus-visual)
  65. (defgroup gnus-article-signature nil
  66. "Article signatures."
  67. :link '(custom-manual "(gnus)Article Signature")
  68. :group 'gnus-article)
  69. (defgroup gnus-article-headers nil
  70. "Article headers."
  71. :link '(custom-manual "(gnus)Hiding Headers")
  72. :group 'gnus-article)
  73. (defgroup gnus-article-washing nil
  74. "Special commands on articles."
  75. :link '(custom-manual "(gnus)Article Washing")
  76. :group 'gnus-article)
  77. (defgroup gnus-article-emphasis nil
  78. "Fontisizing articles."
  79. :link '(custom-manual "(gnus)Article Fontisizing")
  80. :group 'gnus-article)
  81. (defgroup gnus-article-saving nil
  82. "Saving articles."
  83. :link '(custom-manual "(gnus)Saving Articles")
  84. :group 'gnus-article)
  85. (defgroup gnus-article-mime nil
  86. "Worshiping the MIME wonder."
  87. :link '(custom-manual "(gnus)Using MIME")
  88. :group 'gnus-article)
  89. (defgroup gnus-article-buttons nil
  90. "Pushable buttons in the article buffer."
  91. :link '(custom-manual "(gnus)Article Buttons")
  92. :group 'gnus-article)
  93. (defgroup gnus-article-various nil
  94. "Other article options."
  95. :link '(custom-manual "(gnus)Misc Article")
  96. :group 'gnus-article)
  97. (defcustom gnus-ignored-headers
  98. (mapcar
  99. (lambda (header)
  100. (concat "^" header ":"))
  101. '("Path" "Expires" "Date-Received" "References" "Xref" "Lines"
  102. "Relay-Version" "Message-ID" "Approved" "Sender" "Received"
  103. "X-UIDL" "MIME-Version" "Return-Path" "In-Reply-To"
  104. "Content-Type" "Content-Transfer-Encoding" "X-WebTV-Signature"
  105. "X-MimeOLE" "X-MSMail-Priority" "X-Priority" "X-Loop"
  106. "X-Authentication-Warning" "X-MIME-Autoconverted" "X-Face"
  107. "X-Attribution" "X-Originating-IP" "Delivered-To"
  108. "NNTP-[-A-Za-z]+" "Distribution" "X-no-archive" "X-Trace"
  109. "X-Complaints-To" "X-NNTP-Posting-Host" "X-Orig.*"
  110. "Abuse-Reports-To" "Cache-Post-Path" "X-Article-Creation-Date"
  111. "X-Poster" "X-Mail2News-Path" "X-Server-Date" "X-Cache"
  112. "Originator" "X-Problems-To" "X-Auth-User" "X-Post-Time"
  113. "X-Admin" "X-UID" "Resent-[-A-Za-z]+" "X-Mailing-List"
  114. "Precedence" "Original-[-A-Za-z]+" "X-filename" "X-Orcpt"
  115. "Old-Received" "X-Pgp" "X-Auth" "X-From-Line"
  116. "X-Gnus-Article-Number" "X-Majordomo" "X-Url" "X-Sender"
  117. "MBOX-Line" "Priority" "X400-[-A-Za-z]+"
  118. "Status" "X-Gnus-Mail-Source" "Cancel-Lock"
  119. "X-FTN" "X-EXP32-SerialNo" "Encoding" "Importance"
  120. "Autoforwarded" "Original-Encoded-Information-Types" "X-Ya-Pop3"
  121. "X-Face-Version" "X-Vms-To" "X-ML-NAME" "X-ML-COUNT"
  122. "Mailing-List" "X-finfo" "X-md5sum" "X-md5sum-Origin"
  123. "X-Sun-Charset" "X-Accept-Language" "X-Envelope-Sender"
  124. "List-[A-Za-z]+" "X-Listprocessor-Version"
  125. "X-Received" "X-Distribute" "X-Sequence" "X-Juno-Line-Breaks"
  126. "X-Notes-Item" "X-MS-TNEF-Correlator" "x-uunet-gateway"
  127. "X-Received" "Content-length" "X-precedence"
  128. "X-Authenticated-User" "X-Comment" "X-Report" "X-Abuse-Info"
  129. "X-HTTP-Proxy" "X-Mydeja-Info" "X-Copyright" "X-No-Markup"
  130. "X-Abuse-Info" "X-From_" "X-Accept-Language" "Errors-To"
  131. "X-BeenThere" "X-Mailman-Version" "List-Help" "List-Post"
  132. "List-Subscribe" "List-Id" "List-Unsubscribe" "List-Archive"
  133. "X-Content-length" "X-Posting-Agent" "Original-Received"
  134. "X-Request-PGP" "X-Fingerprint" "X-WRIEnvto" "X-WRIEnvfrom"
  135. "X-Virus-Scanned" "X-Delivery-Agent" "Posted-Date" "X-Gateway"
  136. "X-Local-Origin" "X-Local-Destination" "X-UserInfo1"
  137. "X-Received-Date" "X-Hashcash" "Face" "X-DMCA-Notifications"
  138. "X-Abuse-and-DMCA-Info" "X-Postfilter" "X-Gpg-.*" "X-Disclaimer"
  139. "Envelope-To" "X-Spam-Score" "System-Type" "X-Injected-Via-Gmane"
  140. "X-Gmane-NNTP-Posting-Host" "Jabber-ID" "Archived-At"
  141. "Envelope-Sender" "Envelope-Recipients"))
  142. "*All headers that start with this regexp will be hidden.
  143. This variable can also be a list of regexps of headers to be ignored.
  144. If `gnus-visible-headers' is non-nil, this variable will be ignored."
  145. :type '(choice :custom-show nil
  146. regexp
  147. (repeat regexp))
  148. :group 'gnus-article-hiding)
  149. (defcustom gnus-visible-headers
  150. "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^Followup-To:\\|^Reply-To:\\|^Organization:\\|^Summary:\\|^Keywords:\\|^To:\\|^[BGF]?Cc:\\|^Posted-To:\\|^Mail-Copies-To:\\|^Mail-Followup-To:\\|^Apparently-To:\\|^Gnus-Warning:\\|^Resent-From:\\|^X-Sent:"
  151. "*All headers that do not match this regexp will be hidden.
  152. This variable can also be a list of regexp of headers to remain visible.
  153. If this variable is non-nil, `gnus-ignored-headers' will be ignored."
  154. :type '(choice
  155. (repeat :value-to-internal (lambda (widget value)
  156. (custom-split-regexp-maybe value))
  157. :match (lambda (widget value)
  158. (or (stringp value)
  159. (widget-editable-list-match widget value)))
  160. regexp)
  161. (const :tag "Use gnus-ignored-headers" nil)
  162. regexp)
  163. :group 'gnus-article-hiding)
  164. (defcustom gnus-sorted-header-list
  165. '("^From:" "^Subject:" "^Summary:" "^Keywords:" "^Newsgroups:"
  166. "^Followup-To:" "^To:" "^Cc:" "^Date:" "^Organization:")
  167. "*This variable is a list of regular expressions.
  168. If it is non-nil, headers that match the regular expressions will
  169. be placed first in the article buffer in the sequence specified by
  170. this list."
  171. :type '(repeat regexp)
  172. :group 'gnus-article-hiding)
  173. (defcustom gnus-boring-article-headers '(empty followup-to reply-to)
  174. "Headers that are only to be displayed if they have interesting data.
  175. Possible values in this list are:
  176. 'empty Headers with no content.
  177. 'newsgroups Newsgroup identical to Gnus group.
  178. 'to-address To identical to To-address.
  179. 'to-list To identical to To-list.
  180. 'cc-list CC identical to To-list.
  181. 'followup-to Followup-to identical to Newsgroups.
  182. 'reply-to Reply-to identical to From.
  183. 'date Date less than four days old.
  184. 'long-to To and/or Cc longer than 1024 characters.
  185. 'many-to Multiple To and/or Cc."
  186. :type '(set (const :tag "Headers with no content." empty)
  187. (const :tag "Newsgroups identical to Gnus group." newsgroups)
  188. (const :tag "To identical to To-address." to-address)
  189. (const :tag "To identical to To-list." to-list)
  190. (const :tag "CC identical to To-list." cc-list)
  191. (const :tag "Followup-to identical to Newsgroups." followup-to)
  192. (const :tag "Reply-to identical to From." reply-to)
  193. (const :tag "Date less than four days old." date)
  194. (const :tag "To and/or Cc longer than 1024 characters." long-to)
  195. (const :tag "Multiple To and/or Cc headers." many-to))
  196. :group 'gnus-article-hiding)
  197. (defcustom gnus-article-skip-boring nil
  198. "Skip over text that is not worth reading.
  199. By default, if you set this t, then Gnus will display citations and
  200. signatures, but will never scroll down to show you a page consisting
  201. only of boring text. Boring text is controlled by
  202. `gnus-article-boring-faces'."
  203. :version "22.1"
  204. :type 'boolean
  205. :group 'gnus-article-hiding)
  206. (defcustom gnus-signature-separator '("^-- $" "^-- *$")
  207. "Regexp matching signature separator.
  208. This can also be a list of regexps. In that case, it will be checked
  209. from head to tail looking for a separator. Searches will be done from
  210. the end of the buffer."
  211. :type '(choice :format "%{%t%}: %[Value Menu%]\n%v"
  212. (regexp)
  213. (repeat :tag "List of regexp" regexp))
  214. :group 'gnus-article-signature)
  215. (defcustom gnus-signature-limit nil
  216. "Provide a limit to what is considered a signature.
  217. If it is a number, no signature may not be longer (in characters) than
  218. that number. If it is a floating point number, no signature may be
  219. longer (in lines) than that number. If it is a function, the function
  220. will be called without any parameters, and if it returns nil, there is
  221. no signature in the buffer. If it is a string, it will be used as a
  222. regexp. If it matches, the text in question is not a signature.
  223. This can also be a list of the above values."
  224. :type '(choice (const nil)
  225. (integer :value 200)
  226. (number :value 4.0)
  227. function
  228. (regexp :value ".*"))
  229. :group 'gnus-article-signature)
  230. (defcustom gnus-hidden-properties '(invisible t intangible t)
  231. "Property list to use for hiding text."
  232. :type 'sexp
  233. :group 'gnus-article-hiding)
  234. ;; Fixme: This isn't the right thing for mixed graphical and non-graphical
  235. ;; frames in a session.
  236. (defcustom gnus-article-x-face-command
  237. (if (featurep 'xemacs)
  238. (if (or (gnus-image-type-available-p 'xface)
  239. (gnus-image-type-available-p 'pbm))
  240. 'gnus-display-x-face-in-from
  241. "{ echo '/* Width=48, Height=48 */'; uncompface; } | icontopbm | ee -")
  242. (if (gnus-image-type-available-p 'pbm)
  243. 'gnus-display-x-face-in-from
  244. "{ echo '/* Width=48, Height=48 */'; uncompface; } | icontopbm | \
  245. display -"))
  246. "*String or function to be executed to display an X-Face header.
  247. If it is a string, the command will be executed in a sub-shell
  248. asynchronously. The compressed face will be piped to this command."
  249. :type `(choice string
  250. (function-item gnus-display-x-face-in-from)
  251. function)
  252. :version "21.1"
  253. :group 'gnus-picon
  254. :group 'gnus-article-washing)
  255. (defcustom gnus-article-x-face-too-ugly nil
  256. "Regexp matching posters whose face shouldn't be shown automatically."
  257. :type '(choice regexp (const nil))
  258. :group 'gnus-article-washing)
  259. (defcustom gnus-article-banner-alist nil
  260. "Banner alist for stripping.
  261. For example,
  262. ((egroups . \"^[ \\t\\n]*-------------------+\\\\( \\\\(e\\\\|Yahoo! \\\\)Groups Sponsor -+\\\\)?....\\n\\\\(.+\\n\\\\)+\"))"
  263. :version "21.1"
  264. :type '(repeat (cons symbol regexp))
  265. :group 'gnus-article-washing)
  266. (gnus-define-group-parameter
  267. banner
  268. :variable-document
  269. "Alist of regexps (to match group names) and banner."
  270. :variable-group gnus-article-washing
  271. :parameter-type
  272. '(choice :tag "Banner"
  273. :value nil
  274. (const :tag "Remove signature" signature)
  275. (symbol :tag "Item in `gnus-article-banner-alist'" none)
  276. regexp
  277. (const :tag "None" nil))
  278. :parameter-document
  279. "If non-nil, specify how to remove `banners' from articles.
  280. Symbol `signature' means to remove signatures delimited by
  281. `gnus-signature-separator'. Any other symbol is used to look up a
  282. regular expression to match the banner in `gnus-article-banner-alist'.
  283. A string is used as a regular expression to match the banner
  284. directly.")
  285. (defcustom gnus-article-address-banner-alist nil
  286. "Alist of mail addresses and banners.
  287. Each element has the form (ADDRESS . BANNER), where ADDRESS is a regexp
  288. to match a mail address in the From: header, BANNER is one of a symbol
  289. `signature', an item in `gnus-article-banner-alist', a regexp and nil.
  290. If ADDRESS matches author's mail address, it will remove things like
  291. advertisements. For example:
  292. \((\"@yoo-hoo\\\\.co\\\\.jp\\\\'\" . \"\\n_+\\nDo You Yoo-hoo!\\\\?\\n.*\\n.*\\n\"))
  293. "
  294. :type '(repeat
  295. (cons
  296. (regexp :tag "Address")
  297. (choice :tag "Banner" :value nil
  298. (const :tag "Remove signature" signature)
  299. (symbol :tag "Item in `gnus-article-banner-alist'" none)
  300. regexp
  301. (const :tag "None" nil))))
  302. :version "22.1"
  303. :group 'gnus-article-washing)
  304. (defmacro gnus-emphasis-custom-with-format (&rest body)
  305. `(let ((format "\
  306. \\(\\s-\\|^\\|\\=\\|[-\"]\\|\\s(\\)\\(%s\\(\\w+\\(\\s-+\\w+\\)*[.,]?\\)%s\\)\
  307. \\(\\([-,.;:!?\"]\\|\\s)\\)+\\s-\\|[?!.]\\s-\\|\\s)\\|\\s-\\)"))
  308. ,@body))
  309. (defun gnus-emphasis-custom-value-to-external (value)
  310. (gnus-emphasis-custom-with-format
  311. (if (consp (car value))
  312. (list (format format (car (car value)) (cdr (car value)))
  313. 2
  314. (if (nth 1 value) 2 3)
  315. (nth 2 value))
  316. value)))
  317. (defun gnus-emphasis-custom-value-to-internal (value)
  318. (gnus-emphasis-custom-with-format
  319. (let ((regexp (concat "\\`"
  320. (format (regexp-quote format)
  321. "\\([^()]+\\)" "\\([^()]+\\)")
  322. "\\'"))
  323. pattern)
  324. (if (string-match regexp (setq pattern (car value)))
  325. (list (cons (match-string 1 pattern) (match-string 2 pattern))
  326. (= (nth 2 value) 2)
  327. (nth 3 value))
  328. value))))
  329. (defcustom gnus-emphasis-alist
  330. (let ((types
  331. '(("\\*" "\\*" bold nil 2)
  332. ("_" "_" underline)
  333. ("/" "/" italic)
  334. ("_/" "/_" underline-italic)
  335. ("_\\*" "\\*_" underline-bold)
  336. ("\\*/" "/\\*" bold-italic)
  337. ("_\\*/" "/\\*_" underline-bold-italic))))
  338. (nconc
  339. (gnus-emphasis-custom-with-format
  340. (mapcar (lambda (spec)
  341. (list (format format (car spec) (cadr spec))
  342. (or (nth 3 spec) 2)
  343. (or (nth 4 spec) 3)
  344. (intern (format "gnus-emphasis-%s" (nth 2 spec)))))
  345. types))
  346. '(;; I've never seen anyone use this strikethru convention whereas I've
  347. ;; several times seen it triggered by normal text. --Stef
  348. ;; Miles suggests that this form is sometimes used but for italics,
  349. ;; so maybe we should map it to `italic'.
  350. ;; ("\\(\\s-\\|^\\)\\(-\\(\\(\\w\\|-[^-]\\)+\\)-\\)\\(\\s-\\|[?!.,;]\\)"
  351. ;; 2 3 gnus-emphasis-strikethru)
  352. ("\\(\\s-\\|^\\)\\(_\\(\\(\\w\\|_[^_]\\)+\\)_\\)\\(\\s-\\|[?!.,;]\\)"
  353. 2 3 gnus-emphasis-underline))))
  354. "*Alist that says how to fontify certain phrases.
  355. Each item looks like this:
  356. (\"_\\\\(\\\\w+\\\\)_\" 0 1 'underline)
  357. The first element is a regular expression to be matched. The second
  358. is a number that says what regular expression grouping used to find
  359. the entire emphasized word. The third is a number that says what
  360. regexp grouping should be displayed and highlighted. The fourth
  361. is the face used for highlighting."
  362. :type
  363. '(repeat
  364. (menu-choice
  365. :format "%[Customizing Style%]\n%v"
  366. :indent 2
  367. (group :tag "Default"
  368. :value ("" 0 0 default)
  369. :value-create
  370. (lambda (widget)
  371. (let ((value (widget-get
  372. (cadr (widget-get (widget-get widget :parent)
  373. :args))
  374. :value)))
  375. (if (not (eq (nth 2 value) 'default))
  376. (widget-put
  377. widget
  378. :value
  379. (gnus-emphasis-custom-value-to-external value))))
  380. (widget-group-value-create widget))
  381. regexp
  382. (integer :format "Match group: %v")
  383. (integer :format "Emphasize group: %v")
  384. face)
  385. (group :tag "Simple"
  386. :value (("_" . "_") nil default)
  387. (cons :format "%v"
  388. (regexp :format "Start regexp: %v")
  389. (regexp :format "End regexp: %v"))
  390. (boolean :format "Show start and end patterns: %[%v%]\n"
  391. :on " On " :off " Off ")
  392. face)))
  393. :get (lambda (symbol)
  394. (mapcar 'gnus-emphasis-custom-value-to-internal
  395. (default-value symbol)))
  396. :set (lambda (symbol value)
  397. (set-default symbol (mapcar 'gnus-emphasis-custom-value-to-external
  398. value)))
  399. :group 'gnus-article-emphasis)
  400. (defcustom gnus-emphasize-whitespace-regexp "^[ \t]+\\|[ \t]*\n"
  401. "A regexp to describe whitespace which should not be emphasized.
  402. Typical values are \"^[ \\t]+\\\\|[ \\t]*\\n\" and \"[ \\t]+\\\\|[ \\t]*\\n\".
  403. The former avoids underlining of leading and trailing whitespace,
  404. and the latter avoids underlining any whitespace at all."
  405. :version "21.1"
  406. :group 'gnus-article-emphasis
  407. :type 'regexp)
  408. (defface gnus-emphasis-bold '((t (:bold t)))
  409. "Face used for displaying strong emphasized text (*word*)."
  410. :group 'gnus-article-emphasis)
  411. (defface gnus-emphasis-italic '((t (:italic t)))
  412. "Face used for displaying italic emphasized text (/word/)."
  413. :group 'gnus-article-emphasis)
  414. (defface gnus-emphasis-underline '((t (:underline t)))
  415. "Face used for displaying underlined emphasized text (_word_)."
  416. :group 'gnus-article-emphasis)
  417. (defface gnus-emphasis-underline-bold '((t (:bold t :underline t)))
  418. "Face used for displaying underlined bold emphasized text (_*word*_)."
  419. :group 'gnus-article-emphasis)
  420. (defface gnus-emphasis-underline-italic '((t (:italic t :underline t)))
  421. "Face used for displaying underlined italic emphasized text (_/word/_)."
  422. :group 'gnus-article-emphasis)
  423. (defface gnus-emphasis-bold-italic '((t (:bold t :italic t)))
  424. "Face used for displaying bold italic emphasized text (/*word*/)."
  425. :group 'gnus-article-emphasis)
  426. (defface gnus-emphasis-underline-bold-italic
  427. '((t (:bold t :italic t :underline t)))
  428. "Face used for displaying underlined bold italic emphasized text.
  429. Example: (_/*word*/_)."
  430. :group 'gnus-article-emphasis)
  431. (defface gnus-emphasis-strikethru (if (featurep 'xemacs)
  432. '((t (:strikethru t)))
  433. '((t (:strike-through t))))
  434. "Face used for displaying strike-through text (-word-)."
  435. :group 'gnus-article-emphasis)
  436. (defface gnus-emphasis-highlight-words
  437. '((t (:background "black" :foreground "yellow")))
  438. "Face used for displaying highlighted words."
  439. :group 'gnus-article-emphasis)
  440. (defcustom gnus-article-time-format "%a, %d %b %Y %T %Z"
  441. "Format for display of Date headers in article bodies.
  442. See `format-time-string' for the possible values.
  443. The variable can also be function, which should return a complete Date
  444. header. The function is called with one argument, the time, which can
  445. be fed to `format-time-string'."
  446. :type '(choice string function)
  447. :link '(custom-manual "(gnus)Article Date")
  448. :group 'gnus-article-washing)
  449. (defcustom gnus-save-all-headers t
  450. "*If non-nil, don't remove any headers before saving.
  451. This will be overridden by the `:headers' property that the symbol of
  452. the saver function, which is specified by `gnus-default-article-saver',
  453. might have."
  454. :group 'gnus-article-saving
  455. :type 'boolean)
  456. (defcustom gnus-prompt-before-saving 'always
  457. "*This variable says how much prompting is to be done when saving articles.
  458. If it is nil, no prompting will be done, and the articles will be
  459. saved to the default files. If this variable is `always', each and
  460. every article that is saved will be preceded by a prompt, even when
  461. saving large batches of articles. If this variable is neither nil not
  462. `always', there the user will be prompted once for a file name for
  463. each invocation of the saving commands."
  464. :group 'gnus-article-saving
  465. :type '(choice (item always)
  466. (item :tag "never" nil)
  467. (sexp :tag "once" :format "%t\n" :value t)))
  468. (defcustom gnus-saved-headers gnus-visible-headers
  469. "Headers to keep if `gnus-save-all-headers' is nil.
  470. If `gnus-save-all-headers' is non-nil, this variable will be ignored.
  471. If that variable is nil, however, all headers that match this regexp
  472. will be kept while the rest will be deleted before saving. This and
  473. `gnus-save-all-headers' will be overridden by the `:headers' property
  474. that the symbol of the saver function, which is specified by
  475. `gnus-default-article-saver', might have."
  476. :group 'gnus-article-saving
  477. :type 'regexp)
  478. ;; Note that "Rmail format" is mbox since Emacs 23, but Babyl before.
  479. (defcustom gnus-default-article-saver 'gnus-summary-save-in-rmail
  480. "A function to save articles in your favourite format.
  481. The function will be called by way of the `gnus-summary-save-article'
  482. command, and friends such as `gnus-summary-save-article-rmail'.
  483. Gnus provides the following functions:
  484. * gnus-summary-save-in-rmail (Rmail format)
  485. * gnus-summary-save-in-mail (Unix mail format)
  486. * gnus-summary-save-in-folder (MH folder)
  487. * gnus-summary-save-in-file (article format)
  488. * gnus-summary-save-body-in-file (article body)
  489. * gnus-summary-save-in-vm (use VM's folder format)
  490. * gnus-summary-write-to-file (article format -- overwrite)
  491. * gnus-summary-write-body-to-file (article body -- overwrite)
  492. * gnus-summary-save-in-pipe (article format)
  493. The symbol of each function may have the following properties:
  494. * :decode
  495. The value non-nil means save decoded articles. This is meaningful
  496. only with `gnus-summary-save-in-file', `gnus-summary-save-body-in-file',
  497. `gnus-summary-write-to-file', `gnus-summary-write-body-to-file', and
  498. `gnus-summary-save-in-pipe'.
  499. * :function
  500. The value specifies an alternative function which appends, not
  501. overwrites, articles to a file. This implies that when saving many
  502. articles at a time, `gnus-prompt-before-saving' is bound to t and all
  503. articles are saved in a single file. This is meaningful only with
  504. `gnus-summary-write-to-file' and `gnus-summary-write-body-to-file'.
  505. * :headers
  506. The value specifies the symbol of a variable of which the value
  507. specifies headers to be saved. If it is omitted,
  508. `gnus-save-all-headers' and `gnus-saved-headers' control what
  509. headers should be saved."
  510. :group 'gnus-article-saving
  511. :type '(radio (function-item gnus-summary-save-in-rmail)
  512. (function-item gnus-summary-save-in-mail)
  513. (function-item gnus-summary-save-in-folder)
  514. (function-item gnus-summary-save-in-file)
  515. (function-item gnus-summary-save-body-in-file)
  516. (function-item gnus-summary-save-in-vm)
  517. (function-item gnus-summary-write-to-file)
  518. (function-item gnus-summary-write-body-to-file)
  519. (function-item gnus-summary-save-in-pipe)
  520. (function)))
  521. (defcustom gnus-article-save-coding-system
  522. (or (and (mm-coding-system-p 'utf-8) 'utf-8)
  523. (and (mm-coding-system-p 'iso-2022-7bit) 'iso-2022-7bit)
  524. (and (mm-coding-system-p 'emacs-mule) 'emacs-mule)
  525. (and (mm-coding-system-p 'escape-quoted) 'escape-quoted))
  526. "Coding system used to save decoded articles to a file.
  527. The recommended coding systems are `utf-8', `iso-2022-7bit' and so on,
  528. which can safely encode any characters in text. This is used by the
  529. commands including:
  530. * gnus-summary-save-article-file
  531. * gnus-summary-save-article-body-file
  532. * gnus-summary-write-article-file
  533. * gnus-summary-write-article-body-file
  534. and the functions to which you may set `gnus-default-article-saver':
  535. * gnus-summary-save-in-file
  536. * gnus-summary-save-body-in-file
  537. * gnus-summary-write-to-file
  538. * gnus-summary-write-body-to-file
  539. Those commands and functions save just text displayed in the article
  540. buffer to a file if the value of this variable is non-nil. Note that
  541. buttonized MIME parts will be lost in a saved file in that case.
  542. Otherwise, raw articles will be saved."
  543. :group 'gnus-article-saving
  544. :type `(choice
  545. :format "%{%t%}:\n %[Value Menu%] %v"
  546. (const :tag "Save raw articles" nil)
  547. ,@(delq nil
  548. (mapcar
  549. (lambda (arg) (if (mm-coding-system-p (nth 3 arg)) arg))
  550. '((const :tag "UTF-8" utf-8)
  551. (const :tag "iso-2022-7bit" iso-2022-7bit)
  552. (const :tag "Emacs internal" emacs-mule)
  553. (const :tag "escape-quoted" escape-quoted))))
  554. (symbol :tag "Coding system")))
  555. (defcustom gnus-rmail-save-name 'gnus-plain-save-name
  556. "A function generating a file name to save articles in Rmail format.
  557. The function is called with NEWSGROUP, HEADERS, and optional LAST-FILE."
  558. :group 'gnus-article-saving
  559. :type 'function)
  560. (defcustom gnus-mail-save-name 'gnus-plain-save-name
  561. "A function generating a file name to save articles in Unix mail format.
  562. The function is called with NEWSGROUP, HEADERS, and optional LAST-FILE."
  563. :group 'gnus-article-saving
  564. :type 'function)
  565. (defcustom gnus-folder-save-name 'gnus-folder-save-name
  566. "A function generating a file name to save articles in MH folder.
  567. The function is called with NEWSGROUP, HEADERS, and optional LAST-FOLDER."
  568. :group 'gnus-article-saving
  569. :type 'function)
  570. (defcustom gnus-file-save-name 'gnus-numeric-save-name
  571. "A function generating a file name to save articles in article format.
  572. The function is called with NEWSGROUP, HEADERS, and optional
  573. LAST-FILE."
  574. :group 'gnus-article-saving
  575. :type 'function)
  576. (defcustom gnus-split-methods
  577. '((gnus-article-archive-name)
  578. (gnus-article-nndoc-name))
  579. "*Variable used to suggest where articles are to be saved.
  580. For instance, if you would like to save articles related to Gnus in
  581. the file \"gnus-stuff\", and articles related to VM in \"vm-stuff\",
  582. you could set this variable to something like:
  583. '((\"^Subject:.*gnus\\|^Newsgroups:.*gnus\" \"gnus-stuff\")
  584. (\"^Subject:.*vm\\|^Xref:.*vm\" \"vm-stuff\"))
  585. This variable is an alist where the key is the match and the
  586. value is a list of possible files to save in if the match is
  587. non-nil.
  588. If the match is a string, it is used as a regexp match on the
  589. article. If the match is a symbol, that symbol will be funcalled
  590. from the buffer of the article to be saved with the newsgroup as the
  591. parameter. If it is a list, it will be evaled in the same buffer.
  592. If this form or function returns a string, this string will be used as a
  593. possible file name; and if it returns a non-nil list, that list will be
  594. used as possible file names."
  595. :group 'gnus-article-saving
  596. :type '(repeat (choice (list :value (fun) function)
  597. (cons :value ("" "") regexp (repeat string))
  598. (sexp :value nil))))
  599. (defcustom gnus-page-delimiter "^\^L"
  600. "*Regexp describing what to use as article page delimiters.
  601. The default value is \"^\^L\", which is a form linefeed at the
  602. beginning of a line."
  603. :type 'regexp
  604. :group 'gnus-article-various)
  605. (defcustom gnus-article-mode-line-format "Gnus: %g [%w] %S%m"
  606. "*The format specification for the article mode line.
  607. See `gnus-summary-mode-line-format' for a closer description.
  608. The following additional specs are available:
  609. %w The article washing status.
  610. %m The number of MIME parts in the article."
  611. :type 'string
  612. :group 'gnus-article-various)
  613. (defcustom gnus-article-mode-hook nil
  614. "*A hook for Gnus article mode."
  615. :type 'hook
  616. :group 'gnus-article-various)
  617. (when (featurep 'xemacs)
  618. ;; Extracted from gnus-xmas-define in order to preserve user settings
  619. (when (fboundp 'turn-off-scroll-in-place)
  620. (add-hook 'gnus-article-mode-hook 'turn-off-scroll-in-place))
  621. ;; Extracted from gnus-xmas-redefine in order to preserve user settings
  622. (add-hook 'gnus-article-mode-hook 'gnus-xmas-article-menu-add))
  623. (defcustom gnus-article-menu-hook nil
  624. "*Hook run after the creation of the article mode menu."
  625. :type 'hook
  626. :group 'gnus-article-various)
  627. (defcustom gnus-article-prepare-hook nil
  628. "*A hook called after an article has been prepared in the article buffer."
  629. :type 'hook
  630. :group 'gnus-article-various)
  631. (defcustom gnus-copy-article-ignored-headers nil
  632. "List of headers to be removed when copying an article.
  633. Each element is a regular expression."
  634. :version "23.1" ;; No Gnus
  635. :type '(repeat regexp)
  636. :group 'gnus-article-various)
  637. (make-obsolete-variable 'gnus-article-hide-pgp-hook nil
  638. "Gnus 5.10 (Emacs-22.1)")
  639. (defface gnus-button
  640. '((t (:weight bold)))
  641. "Face used for highlighting a button in the article buffer."
  642. :group 'gnus-article-buttons)
  643. (defcustom gnus-article-button-face 'gnus-button
  644. "Face used for highlighting buttons in the article buffer.
  645. An article button is a piece of text that you can activate by pressing
  646. `RET' or `mouse-2' above it."
  647. :type 'face
  648. :group 'gnus-article-buttons)
  649. (defcustom gnus-article-mouse-face 'highlight
  650. "Face used for mouse highlighting in the article buffer.
  651. Article buttons will be displayed in this face when the cursor is
  652. above them."
  653. :type 'face
  654. :group 'gnus-article-buttons)
  655. (defcustom gnus-signature-face 'gnus-signature
  656. "Face used for highlighting a signature in the article buffer.
  657. Obsolete; use the face `gnus-signature' for customizations instead."
  658. :type 'face
  659. :group 'gnus-article-highlight
  660. :group 'gnus-article-signature)
  661. (defface gnus-signature
  662. '((t
  663. (:italic t)))
  664. "Face used for highlighting a signature in the article buffer."
  665. :group 'gnus-article-highlight
  666. :group 'gnus-article-signature)
  667. ;; backward-compatibility alias
  668. (put 'gnus-signature-face 'face-alias 'gnus-signature)
  669. (put 'gnus-signature-face 'obsolete-face "22.1")
  670. (defface gnus-header-from
  671. '((((class color)
  672. (background dark))
  673. (:foreground "PaleGreen1"))
  674. (((class color)
  675. (background light))
  676. (:foreground "red3"))
  677. (t
  678. (:italic t)))
  679. "Face used for displaying from headers."
  680. :group 'gnus-article-headers
  681. :group 'gnus-article-highlight)
  682. ;; backward-compatibility alias
  683. (put 'gnus-header-from-face 'face-alias 'gnus-header-from)
  684. (put 'gnus-header-from-face 'obsolete-face "22.1")
  685. (defface gnus-header-subject
  686. '((((class color)
  687. (background dark))
  688. (:foreground "SeaGreen1"))
  689. (((class color)
  690. (background light))
  691. (:foreground "red4"))
  692. (t
  693. (:bold t :italic t)))
  694. "Face used for displaying subject headers."
  695. :group 'gnus-article-headers
  696. :group 'gnus-article-highlight)
  697. ;; backward-compatibility alias
  698. (put 'gnus-header-subject-face 'face-alias 'gnus-header-subject)
  699. (put 'gnus-header-subject-face 'obsolete-face "22.1")
  700. (defface gnus-header-newsgroups
  701. '((((class color)
  702. (background dark))
  703. (:foreground "yellow" :italic t))
  704. (((class color)
  705. (background light))
  706. (:foreground "MidnightBlue" :italic t))
  707. (t
  708. (:italic t)))
  709. "Face used for displaying newsgroups headers.
  710. In the default setup this face is only used for crossposted
  711. articles."
  712. :group 'gnus-article-headers
  713. :group 'gnus-article-highlight)
  714. ;; backward-compatibility alias
  715. (put 'gnus-header-newsgroups-face 'face-alias 'gnus-header-newsgroups)
  716. (put 'gnus-header-newsgroups-face 'obsolete-face "22.1")
  717. (defface gnus-header-name
  718. '((((class color)
  719. (background dark))
  720. (:foreground "SpringGreen2"))
  721. (((class color)
  722. (background light))
  723. (:foreground "maroon"))
  724. (t
  725. (:bold t)))
  726. "Face used for displaying header names."
  727. :group 'gnus-article-headers
  728. :group 'gnus-article-highlight)
  729. ;; backward-compatibility alias
  730. (put 'gnus-header-name-face 'face-alias 'gnus-header-name)
  731. (put 'gnus-header-name-face 'obsolete-face "22.1")
  732. (defface gnus-header-content
  733. '((((class color)
  734. (background dark))
  735. (:foreground "SpringGreen1" :italic t))
  736. (((class color)
  737. (background light))
  738. (:foreground "indianred4" :italic t))
  739. (t
  740. (:italic t))) "Face used for displaying header content."
  741. :group 'gnus-article-headers
  742. :group 'gnus-article-highlight)
  743. ;; backward-compatibility alias
  744. (put 'gnus-header-content-face 'face-alias 'gnus-header-content)
  745. (put 'gnus-header-content-face 'obsolete-face "22.1")
  746. (defcustom gnus-header-face-alist
  747. '(("From" nil gnus-header-from)
  748. ("Subject" nil gnus-header-subject)
  749. ("Newsgroups:.*," nil gnus-header-newsgroups)
  750. ("" gnus-header-name gnus-header-content))
  751. "*Controls highlighting of article headers.
  752. An alist of the form (HEADER NAME CONTENT).
  753. HEADER is a regular expression which should match the name of a
  754. header and NAME and CONTENT are either face names or nil.
  755. The name of each header field will be displayed using the face
  756. specified by the first element in the list where HEADER matches
  757. the header name and NAME is non-nil. Similarly, the content will
  758. be displayed by the first non-nil matching CONTENT face."
  759. :group 'gnus-article-headers
  760. :group 'gnus-article-highlight
  761. :type '(repeat (list (regexp :tag "Header")
  762. (choice :tag "Name"
  763. (item :tag "skip" nil)
  764. (face :value default))
  765. (choice :tag "Content"
  766. (item :tag "skip" nil)
  767. (face :value default)))))
  768. (defcustom gnus-face-properties-alist (if (featurep 'xemacs)
  769. '((xface . (:face gnus-x-face)))
  770. '((pbm . (:face gnus-x-face))
  771. (png . nil)))
  772. "Alist of image types and properties applied to Face and X-Face images.
  773. Here are examples:
  774. ;; Specify the altitude of Face images in the From header.
  775. \(setq gnus-face-properties-alist
  776. '((pbm . (:face gnus-x-face :ascent 80))
  777. (png . (:ascent 80))))
  778. ;; Show Face images as pressed buttons.
  779. \(setq gnus-face-properties-alist
  780. '((pbm . (:face gnus-x-face :relief -2))
  781. (png . (:relief -2))))
  782. See the manual for the valid properties for various image types.
  783. Currently, `pbm' is used for X-Face images and `png' is used for Face
  784. images in Emacs. Only the `:face' property is effective on the `xface'
  785. image type in XEmacs if it is built with the libcompface library."
  786. :version "23.1" ;; No Gnus
  787. :group 'gnus-article-headers
  788. :type '(repeat (cons :format "%v" (symbol :tag "Image type") plist)))
  789. (defcustom gnus-article-decode-hook
  790. '(article-decode-charset article-decode-encoded-words
  791. article-decode-group-name article-decode-idna-rhs)
  792. "*Hook run to decode charsets in articles."
  793. :group 'gnus-article-headers
  794. :type 'hook)
  795. (defcustom gnus-display-mime-function 'gnus-display-mime
  796. "Function to display MIME articles."
  797. :group 'gnus-article-mime
  798. :type 'function)
  799. (defvar gnus-decode-header-function 'mail-decode-encoded-word-region
  800. "Function used to decode headers.")
  801. (defvar gnus-decode-address-function 'mail-decode-encoded-address-region
  802. "Function used to decode addresses.")
  803. (defvar gnus-article-dumbquotes-map
  804. '(("\200" "EUR")
  805. ("\202" ",")
  806. ("\203" "f")
  807. ("\204" ",,")
  808. ("\205" "...")
  809. ("\213" "<")
  810. ("\214" "OE")
  811. ("\221" "`")
  812. ("\222" "'")
  813. ("\223" "``")
  814. ("\224" "\"")
  815. ("\225" "*")
  816. ("\226" "-")
  817. ("\227" "--")
  818. ("\230" "~")
  819. ("\231" "(TM)")
  820. ("\233" ">")
  821. ("\234" "oe")
  822. ("\264" "'"))
  823. "Table for MS-to-Latin1 translation.")
  824. (defcustom gnus-ignored-mime-types nil
  825. "List of MIME types that should be ignored by Gnus."
  826. :version "21.1"
  827. :group 'gnus-article-mime
  828. :type '(repeat regexp))
  829. (defcustom gnus-unbuttonized-mime-types '(".*/.*")
  830. "List of MIME types that should not be given buttons when rendered inline.
  831. See also `gnus-buttonized-mime-types' which may override this variable.
  832. This variable is only used when `gnus-inhibit-mime-unbuttonizing' is nil."
  833. :version "21.1"
  834. :group 'gnus-article-mime
  835. :type '(repeat regexp))
  836. (defcustom gnus-buttonized-mime-types nil
  837. "List of MIME types that should be given buttons when rendered inline.
  838. If set, this variable overrides `gnus-unbuttonized-mime-types'.
  839. To see e.g. security buttons you could set this to
  840. `(\"multipart/signed\")'. You could also add \"multipart/alternative\" to
  841. this list to display radio buttons that allow you to choose one of two
  842. media types those mails include. See also `mm-discouraged-alternatives'.
  843. This variable is only used when `gnus-inhibit-mime-unbuttonizing' is nil."
  844. :version "22.1"
  845. :group 'gnus-article-mime
  846. :type '(repeat regexp))
  847. (defcustom gnus-inhibit-mime-unbuttonizing nil
  848. "If non-nil, all MIME parts get buttons.
  849. When nil (the default value), then some MIME parts do not get buttons,
  850. as described by the variables `gnus-buttonized-mime-types' and
  851. `gnus-unbuttonized-mime-types'."
  852. :version "22.1"
  853. :group 'gnus-article-mime
  854. :type 'boolean)
  855. (defcustom gnus-body-boundary-delimiter "_"
  856. "String used to delimit header and body.
  857. This variable is used by `gnus-article-treat-body-boundary' which can
  858. be controlled by `gnus-treat-body-boundary'."
  859. :version "22.1"
  860. :group 'gnus-article-various
  861. :type '(choice (item :tag "None" :value nil)
  862. string))
  863. (defcustom gnus-picon-databases '("/usr/lib/picon" "/usr/local/faces"
  864. "/usr/share/picons")
  865. "Defines the location of the faces database.
  866. For information on obtaining this database of pretty pictures, please
  867. see http://www.cs.indiana.edu/picons/ftp/index.html"
  868. :version "22.1"
  869. :type '(repeat directory)
  870. :link '(url-link :tag "download"
  871. "http://www.cs.indiana.edu/picons/ftp/index.html")
  872. :link '(custom-manual "(gnus)Picons")
  873. :group 'gnus-picon)
  874. (defun gnus-picons-installed-p ()
  875. "Say whether picons are installed on your machine."
  876. (let ((installed nil))
  877. (dolist (database gnus-picon-databases)
  878. (when (file-exists-p database)
  879. (setq installed t)))
  880. installed))
  881. (defcustom gnus-article-mime-part-function nil
  882. "Function called with a MIME handle as the argument.
  883. This is meant for people who want to do something automatic based
  884. on parts -- for instance, adding Vcard info to a database."
  885. :group 'gnus-article-mime
  886. :type '(choice (const nil)
  887. function))
  888. (defcustom gnus-mime-multipart-functions nil
  889. "An alist of MIME types to functions to display them."
  890. :version "21.1"
  891. :group 'gnus-article-mime
  892. :type '(repeat (cons :format "%v" (string :tag "MIME type") function)))
  893. (defcustom gnus-article-date-lapsed-new-header nil
  894. "Whether the X-Sent and Date headers can coexist.
  895. When using `gnus-treat-date-lapsed', the \"X-Sent:\" header will
  896. either replace the old \"Date:\" header (if this variable is nil), or
  897. be added below it (otherwise)."
  898. :version "21.1"
  899. :group 'gnus-article-headers
  900. :type 'boolean)
  901. (defcustom gnus-article-mime-match-handle-function 'undisplayed-alternative
  902. "Function called with a MIME handle as the argument.
  903. This is meant for people who want to view first matched part.
  904. For `undisplayed-alternative' (default), the first undisplayed
  905. part or alternative part is used. For `undisplayed', the first
  906. undisplayed part is used. For a function, the first part which
  907. the function return t is used. For nil, the first part is
  908. used."
  909. :version "21.1"
  910. :group 'gnus-article-mime
  911. :type '(choice
  912. (item :tag "first" :value nil)
  913. (item :tag "undisplayed" :value undisplayed)
  914. (item :tag "undisplayed or alternative"
  915. :value undisplayed-alternative)
  916. (function)))
  917. (defcustom gnus-mime-action-alist
  918. '(("save to file" . gnus-mime-save-part)
  919. ("save and strip" . gnus-mime-save-part-and-strip)
  920. ("replace with file" . gnus-mime-replace-part)
  921. ("delete part" . gnus-mime-delete-part)
  922. ("display as text" . gnus-mime-inline-part)
  923. ("view the part" . gnus-mime-view-part)
  924. ("pipe to command" . gnus-mime-pipe-part)
  925. ("toggle display" . gnus-article-press-button)
  926. ("toggle display" . gnus-article-view-part-as-charset)
  927. ("view as type" . gnus-mime-view-part-as-type)
  928. ("view internally" . gnus-mime-view-part-internally)
  929. ("view externally" . gnus-mime-view-part-externally))
  930. "An alist of actions that run on the MIME attachment."
  931. :group 'gnus-article-mime
  932. :type '(repeat (cons (string :tag "name")
  933. (function))))
  934. (defcustom gnus-auto-select-part 1
  935. "Advance to next MIME part when deleting or stripping parts.
  936. When 0, point will be placed on the same part as before. When
  937. positive (negative), move point forward (backwards) this many
  938. parts. When nil, redisplay article."
  939. :version "23.1" ;; No Gnus
  940. :group 'gnus-article-mime
  941. :type '(choice (const nil :tag "Redisplay article.")
  942. (const 1 :tag "Next part.")
  943. (const 0 :tag "Current part.")
  944. integer))
  945. ;;;
  946. ;;; The treatment variables
  947. ;;;
  948. (defvar gnus-part-display-hook nil
  949. "Hook called on parts that are to receive treatment.")
  950. (defvar gnus-article-treat-custom
  951. '(choice (const :tag "Off" nil)
  952. (const :tag "On" t)
  953. (const :tag "Header" head)
  954. (const :tag "First" first)
  955. (const :tag "Last" last)
  956. (integer :tag "Less")
  957. (repeat :tag "Groups" regexp)
  958. (sexp :tag "Predicate")))
  959. (defvar gnus-article-treat-head-custom
  960. '(choice (const :tag "Off" nil)
  961. (const :tag "Header" head)))
  962. (defvar gnus-article-treat-types '("text/plain" "text/x-verbatim"
  963. "text/x-patch")
  964. "Parts to treat.")
  965. (defvar gnus-inhibit-treatment nil
  966. "Whether to inhibit treatment.")
  967. (defcustom gnus-treat-highlight-signature '(or t (typep "text/x-vcard"))
  968. "Highlight the signature.
  969. Valid values are nil, t, `head', `first', `last', an integer or a
  970. predicate. See Info node `(gnus)Customizing Articles'."
  971. :group 'gnus-article-treat
  972. :link '(custom-manual "(gnus)Customizing Articles")
  973. :type gnus-article-treat-custom)
  974. (put 'gnus-treat-highlight-signature 'highlight t)
  975. (defcustom gnus-treat-buttonize 100000
  976. "Add buttons.
  977. Valid values are nil, t, `head', `first', `last', an integer or a
  978. predicate. See Info node `(gnus)Customizing Articles'."
  979. :group 'gnus-article-treat
  980. :link '(custom-manual "(gnus)Customizing Articles")
  981. :type gnus-article-treat-custom)
  982. (put 'gnus-treat-buttonize 'highlight t)
  983. (defcustom gnus-treat-buttonize-head 'head
  984. "Add buttons to the head.
  985. Valid values are nil, t, `head', `first', `last', an integer or a
  986. predicate. See Info node `(gnus)Customizing Articles'."
  987. :group 'gnus-article-treat
  988. :link '(custom-manual "(gnus)Customizing Articles")
  989. :type gnus-article-treat-head-custom)
  990. (put 'gnus-treat-buttonize-head 'highlight t)
  991. (defcustom gnus-treat-emphasize 50000
  992. "Emphasize text.
  993. Valid values are nil, t, `head', `first', `last', an integer or a
  994. predicate. See Info node `(gnus)Customizing Articles'."
  995. :group 'gnus-article-treat
  996. :link '(custom-manual "(gnus)Customizing Articles")
  997. :type gnus-article-treat-custom)
  998. (put 'gnus-treat-emphasize 'highlight t)
  999. (defcustom gnus-treat-strip-cr nil
  1000. "Remove carriage returns.
  1001. Valid values are nil, t, `head', `first', `last', an integer or a
  1002. predicate. See Info node `(gnus)Customizing Articles'."
  1003. :version "22.1"
  1004. :group 'gnus-article-treat
  1005. :link '(custom-manual "(gnus)Customizing Articles")
  1006. :type gnus-article-treat-custom)
  1007. (defcustom gnus-treat-unsplit-urls nil
  1008. "Remove newlines from within URLs.
  1009. Valid values are nil, t, `head', `first', `last', an integer or a
  1010. predicate. See Info node `(gnus)Customizing Articles'."
  1011. :version "22.1"
  1012. :group 'gnus-article-treat
  1013. :link '(custom-manual "(gnus)Customizing Articles")
  1014. :type gnus-article-treat-custom)
  1015. (defcustom gnus-treat-leading-whitespace nil
  1016. "Remove leading whitespace in headers.
  1017. Valid values are nil, t, `head', `first', `last', an integer or a
  1018. predicate. See Info node `(gnus)Customizing Articles'."
  1019. :version "22.1"
  1020. :group 'gnus-article-treat
  1021. :link '(custom-manual "(gnus)Customizing Articles")
  1022. :type gnus-article-treat-custom)
  1023. (defcustom gnus-treat-hide-headers 'head
  1024. "Hide headers.
  1025. Valid values are nil, t, `head', `first', `last', an integer or a
  1026. predicate. See Info node `(gnus)Customizing Articles'."
  1027. :group 'gnus-article-treat
  1028. :link '(custom-manual "(gnus)Customizing Articles")
  1029. :type gnus-article-treat-head-custom)
  1030. (defcustom gnus-treat-hide-boring-headers nil
  1031. "Hide boring headers.
  1032. Valid values are nil, t, `head', `first', `last', an integer or a
  1033. predicate. See Info node `(gnus)Customizing Articles'."
  1034. :group 'gnus-article-treat
  1035. :link '(custom-manual "(gnus)Customizing Articles")
  1036. :type gnus-article-treat-head-custom)
  1037. (defcustom gnus-treat-hide-signature nil
  1038. "Hide the signature.
  1039. Valid values are nil, t, `head', `first', `last', an integer or a
  1040. predicate. See Info node `(gnus)Customizing Articles'."
  1041. :group 'gnus-article-treat
  1042. :link '(custom-manual "(gnus)Customizing Articles")
  1043. :type gnus-article-treat-custom)
  1044. (defcustom gnus-treat-fill-article nil
  1045. "Fill the article.
  1046. Valid values are nil, t, `head', `first', `last', an integer or a
  1047. predicate. See Info node `(gnus)Customizing Articles'."
  1048. :group 'gnus-article-treat
  1049. :link '(custom-manual "(gnus)Customizing Articles")
  1050. :type gnus-article-treat-custom)
  1051. (defcustom gnus-treat-hide-citation nil
  1052. "Hide cited text.
  1053. Valid values are nil, t, `head', `first', `last', an integer or a
  1054. predicate. See Info node `(gnus)Customizing Articles'."
  1055. :group 'gnus-article-treat
  1056. :link '(custom-manual "(gnus)Customizing Articles")
  1057. :type gnus-article-treat-custom)
  1058. (defcustom gnus-treat-hide-citation-maybe nil
  1059. "Hide cited text.
  1060. Valid values are nil, t, `head', `first', `last', an integer or a
  1061. predicate. See Info node `(gnus)Customizing Articles'."
  1062. :group 'gnus-article-treat
  1063. :link '(custom-manual "(gnus)Customizing Articles")
  1064. :type gnus-article-treat-custom)
  1065. (defcustom gnus-treat-strip-list-identifiers 'head
  1066. "Strip list identifiers from `gnus-list-identifiers`.
  1067. Valid values are nil, t, `head', `first', `last', an integer or a
  1068. predicate. See Info node `(gnus)Customizing Articles'."
  1069. :version "21.1"
  1070. :group 'gnus-article-treat
  1071. :link '(custom-manual "(gnus)Customizing Articles")
  1072. :type gnus-article-treat-custom)
  1073. (make-obsolete-variable 'gnus-treat-strip-pgp nil
  1074. "Gnus 5.10 (Emacs 22.1)")
  1075. (defcustom gnus-treat-strip-pem nil
  1076. "Strip PEM signatures.
  1077. Valid values are nil, t, `head', `first', `last', an integer or a
  1078. predicate. See Info node `(gnus)Customizing Articles'."
  1079. :group 'gnus-article-treat
  1080. :link '(custom-manual "(gnus)Customizing Articles")
  1081. :type gnus-article-treat-custom)
  1082. (defcustom gnus-treat-strip-banner t
  1083. "Strip banners from articles.
  1084. The banner to be stripped is specified in the `banner' group parameter.
  1085. Valid values are nil, t, `head', `first', `last', an integer or a
  1086. predicate. See Info node `(gnus)Customizing Articles'."
  1087. :group 'gnus-article-treat
  1088. :link '(custom-manual "(gnus)Customizing Articles")
  1089. :type gnus-article-treat-custom)
  1090. (defcustom gnus-treat-highlight-headers 'head
  1091. "Highlight the headers.
  1092. Valid values are nil, t, `head', `first', `last', an integer or a
  1093. predicate. See Info node `(gnus)Customizing Articles'."
  1094. :group 'gnus-article-treat
  1095. :link '(custom-manual "(gnus)Customizing Articles")
  1096. :type gnus-article-treat-head-custom)
  1097. (put 'gnus-treat-highlight-headers 'highlight t)
  1098. (defcustom gnus-treat-highlight-citation t
  1099. "Highlight cited text.
  1100. Valid values are nil, t, `head', `first', `last', an integer or a
  1101. predicate. See Info node `(gnus)Customizing Articles'."
  1102. :group 'gnus-article-treat
  1103. :link '(custom-manual "(gnus)Customizing Articles")
  1104. :type gnus-article-treat-custom)
  1105. (put 'gnus-treat-highlight-citation 'highlight t)
  1106. (defcustom gnus-treat-date-ut nil
  1107. "Display the Date in UT (GMT).
  1108. Valid values are nil, t, `head', `first', `last', an integer or a
  1109. predicate. See Info node `(gnus)Customizing Articles'."
  1110. :group 'gnus-article-treat
  1111. :link '(custom-manual "(gnus)Customizing Articles")
  1112. :type gnus-article-treat-head-custom)
  1113. (defcustom gnus-treat-date-local nil
  1114. "Display the Date in the local timezone.
  1115. Valid values are nil, t, `head', `first', `last', an integer or a
  1116. predicate. See Info node `(gnus)Customizing Articles'."
  1117. :group 'gnus-article-treat
  1118. :link '(custom-manual "(gnus)Customizing Articles")
  1119. :type gnus-article-treat-head-custom)
  1120. (defcustom gnus-treat-date-english nil
  1121. "Display the Date in a format that can be read aloud in English.
  1122. Valid values are nil, t, `head', `first', `last', an integer or a
  1123. predicate. See Info node `(gnus)Customizing Articles'."
  1124. :version "22.1"
  1125. :group 'gnus-article-treat
  1126. :link '(custom-manual "(gnus)Customizing Articles")
  1127. :type gnus-article-treat-head-custom)
  1128. (defcustom gnus-treat-date-lapsed nil
  1129. "Display the Date header in a way that says how much time has elapsed.
  1130. Valid values are nil, t, `head', `first', `last', an integer or a
  1131. predicate. See Info node `(gnus)Customizing Articles'."
  1132. :group 'gnus-article-treat
  1133. :link '(custom-manual "(gnus)Customizing Articles")
  1134. :type gnus-article-treat-head-custom)
  1135. (defcustom gnus-treat-date-original nil
  1136. "Display the date in the original timezone.
  1137. Valid values are nil, t, `head', `first', `last', an integer or a
  1138. predicate. See Info node `(gnus)Customizing Articles'."
  1139. :group 'gnus-article-treat
  1140. :link '(custom-manual "(gnus)Customizing Articles")
  1141. :type gnus-article-treat-head-custom)
  1142. (defcustom gnus-treat-date-iso8601 nil
  1143. "Display the date in the ISO8601 format.
  1144. Valid values are nil, t, `head', `first', `last', an integer or a
  1145. predicate. See Info node `(gnus)Customizing Articles'."
  1146. :version "21.1"
  1147. :group 'gnus-article-treat
  1148. :link '(custom-manual "(gnus)Customizing Articles")
  1149. :type gnus-article-treat-head-custom)
  1150. (defcustom gnus-treat-date-user-defined nil
  1151. "Display the date in a user-defined format.
  1152. The format is defined by the `gnus-article-time-format' variable.
  1153. Valid values are nil, t, `head', `first', `last', an integer or a
  1154. predicate. See Info node `(gnus)Customizing Articles'."
  1155. :group 'gnus-article-treat
  1156. :link '(custom-manual "(gnus)Customizing Articles")
  1157. :type gnus-article-treat-head-custom)
  1158. (defcustom gnus-treat-strip-headers-in-body t
  1159. "Strip the X-No-Archive header line from the beginning of the body.
  1160. Valid values are nil, t, `head', `first', `last', an integer or a
  1161. predicate. See Info node `(gnus)Customizing Articles'."
  1162. :version "21.1"
  1163. :group 'gnus-article-treat
  1164. :link '(custom-manual "(gnus)Customizing Articles")
  1165. :type gnus-article-treat-custom)
  1166. (defcustom gnus-treat-strip-trailing-blank-lines nil
  1167. "Strip trailing blank lines.
  1168. Valid values are nil, t, `head', `first', `last', an integer or a
  1169. pred…

Large files files are truncated, but you can click here to view the full file