;ELC ;;; compiled by kwzh@nutrimat.gnu.ai.mit.edu on Wed Jul 17 16:57:38 1996 ;;; from file /gd/gnu/emacs/19.0/lisp/gnus-kill.el ;;; emacs version 19.31.94.1. ;;; bytecomp version FSF 2.10 ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs 18. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19.29"))) (error "`gnus-kill.el' was compiled for Emacs 19.29 or later")) (require (quote gnus)) #@34 *A hook for Gnus kill file mode. (defvar gnus-kill-file-mode-hook nil (#$ . -505)) #@59 *Number of days before expiring unused kill file entries. (defvar gnus-kill-expiry-days 7 (#$ . -594)) #@58 *If non-nil, will save kill files after processing them. (defvar gnus-kill-save-kill-file nil (#$ . -703)) (byte-code "ÀÁ!„ÂÁ B‡" [boundp gnus-winconf-kill-file nil current-load-list] 2) (defalias 'gnus-raise '(macro . #[(field expression level) "À \nÃÄ DDÆBBBB‡" [gnus-kill field expression function gnus-summary-raise-score level (t)] 6])) (defalias 'gnus-lower '(macro . #[(field expression level) "À \nÃÄÅDDDÇBBBB‡" [gnus-kill field expression function gnus-summary-raise-score - level (t)] 7])) (byte-code "ÀÁ!„ÂÁ B „ÄÅ!‰Ç\"ˆÂ‡" [boundp gnus-kill-file-mode-map nil current-load-list gnus-define-keys-1 copy-keymap emacs-lisp-mode-map (" " gnus-kill-file-kill-by-subject " " gnus-kill-file-kill-by-author " " gnus-kill-file-kill-by-thread " " gnus-kill-file-kill-by-xref "" gnus-kill-file-apply-buffer "" gnus-kill-file-apply-last-sexp "" gnus-kill-file-exit)] 3) #@2807 Major mode for editing kill files. If you are using this mode - you probably shouldn't. Kill files perform badly and paint with a pretty broad brush. Score files, on the other hand, are vastly faster (40x speedup) and give you more control over what to do. In addition to Emacs-Lisp Mode, the following commands are available: \{gnus-kill-file-mode-map} A kill file contains Lisp expressions to be applied to a selected newsgroup. The purpose is to mark articles as read on the basis of some set of regexps. A global kill file is applied to every newsgroup, and a local kill file is applied to a specified newsgroup. Since a global kill file is applied to every newsgroup, for better performance use a local one. A kill file can contain any kind of Emacs Lisp expressions expected to be evaluated in the Summary buffer. Writing Lisp programs for this purpose is not so easy because the internal working of Gnus must be well-known. For this reason, Gnus provides a general function which does this easily for non-Lisp programmers. The `gnus-kill' function executes commands available in Summary Mode by their key sequences. `gnus-kill' should be called with FIELD, REGEXP and optional COMMAND and ALL. FIELD is a string representing the header field or an empty string. If FIELD is an empty string, the entire article body is searched for. REGEXP is a string which is compared with FIELD value. COMMAND is a string representing a valid key sequence in Summary mode or Lisp expression. COMMAND defaults to '(gnus-summary-mark-as-read nil "X"). Make sure that COMMAND is executed in the Summary buffer. If the second optional argument ALL is non-nil, the COMMAND is applied to articles which are already marked as read or unread. Articles which are marked are skipped over by default. For example, if you want to mark articles of which subjects contain the string `AI' as read, a possible kill file may look like: (gnus-kill "Subject" "AI") If you want to mark articles with `D' instead of `X', you can use the following expression: (gnus-kill "Subject" "AI" "d") In this example it is assumed that the command `gnus-summary-mark-as-read-forward' is assigned to `d' in Summary Mode. It is possible to delete unnecessary headers which are marked with `X' in a kill file as follows: (gnus-expunge "X") If the Summary buffer is empty after applying kill files, Gnus will exit the selected newsgroup normally. If headers which are marked with `D' are deleted in a kill file, it is impossible to read articles which are marked as read in the previous Gnus sessions. Marks other than `D' should be used for articles which should really be deleted. Entry to this mode calls emacs-lisp-mode-hook and gnus-kill-file-mode-hook with no arguments, if that value is non-nil. (defalias 'gnus-kill-file-mode #[nil "À ˆÁ\n!ˆÃ\f!ˆÅÇÉÊ!ˆËÌÍ\"‡" [kill-all-local-variables use-local-map gnus-kill-file-mode-map set-syntax-table emacs-lisp-mode-syntax-table gnus-kill-file-mode major-mode "Kill" mode-name lisp-mode-variables nil run-hooks emacs-lisp-mode-hook gnus-kill-file-mode-hook] 3 (#$ . 1609) nil]) #@97 Begin editing a kill file for NEWSGROUP. If NEWSGROUP is nil, the global kill file is selected. (defalias 'gnus-kill-file-edit-file #[(newsgroup) "À !ÃÄ\n!!ˆÅ\n!ƒÆÅ\n!!„Ç É\n!\nÆ\n!ƒ0Ë\n!ˆ‚d\fÍ=ƒCÎÏ!ˆË\n!ˆ‚d\fÐ=ƒ`ÎÑ!ˆË!ˆÓ!ˆÔ\n!ˆ‚dÕ\n!ˆ)Ö )‡" [gnus-newsgroup-kill-file newsgroup file gnus-make-directory file-name-directory get-file-buffer get-buffer-window current-window-configuration gnus-winconf-kill-file find-file-noselect buffer pop-to-buffer major-mode gnus-group-mode gnus-configure-windows group gnus-summary-mode article gnus-article-buffer bury-buffer switch-to-buffer find-file-other-window gnus-kill-file-mode] 3 (#$ . 4749) "sNewsgroup: "]) (defalias 'gnus-kill-set-kill-buffer #[nil "À !Ã\n!‰qˆÅ ˆÆ\f!*‡" [gnus-newsgroup-kill-file gnus-newsgroup-name file find-file-noselect buffer gnus-kill-file-mode bury-buffer] 3]) (defalias 'gnus-kill-file-enter-kill #[(field regexp &optional dont-move) "ŠÀ\nÃ=„\fÄ ˆ „dbˆÆÇ #‰cˆÊ !*‡" [nil string major-mode gnus-kill-file-mode gnus-kill-set-kill-buffer dont-move format "(gnus-kill %S %S)\n" field regexp gnus-kill-file-apply-string] 4]) #@18 Kill by subject. (defalias 'gnus-kill-file-kill-by-subject #[nil "ÀÁ !ƒÄÅ ÆH!!‚ÇÈ#‡" [gnus-kill-file-enter-kill "Subject" vectorp gnus-current-headers regexp-quote gnus-simplify-subject 1 "" t] 6 (#$ . 5883) nil]) #@17 Kill by author. (defalias 'gnus-kill-file-kill-by-author #[nil "ÀÁ !ƒÄ ÅH!‚ÆÇ#‡" [gnus-kill-file-enter-kill "From" vectorp gnus-current-headers regexp-quote 2 "" t] 5 (#$ . 6108) nil]) #@17 Kill by author. (defalias 'gnus-kill-file-kill-by-thread #[nil "ÀÁ !ƒÄ ÅH!‚Æ\"‡" [gnus-kill-file-enter-kill "References" vectorp gnus-current-headers regexp-quote 4 ""] 5 (#$ . 6304) nil]) #@15 Kill by Xref. (defalias 'gnus-kill-file-kill-by-xref #[nil "À !… ÂHÃĉƒ?ÈÉ#…DÕʔʕO‰ ˜„ÌÍÎÏ !ÐQÑ#ˆ‚ÌÍÒÑ#+‡" [vectorp gnus-current-headers 8 0 nil group start xref string-match " \\([^ ]+\\):" 1 gnus-newsgroup-name gnus-kill-file-enter-kill "Xref" " " regexp-quote ":" t ""] 6 (#$ . 6504) nil]) #@54 Raise score for all followups to the current author. (defalias 'gnus-kill-file-raise-followups-to-author #[(level) "ÁHŠŠˆebˆÆÇÉQÊ\f!\"ËÌÍ\f$‰cˆÎ !ˆ)ÏÐÑ\f#*‡" [gnus-current-headers 2 nil string name gnus-kill-set-kill-buffer read-string "Add " level " to followup articles to: " regexp-quote format "(gnus-kill %S %S '(gnus-summary-temporarily-raise-by-thread %S))\n" "From" gnus-kill-file-apply-string gnus-message 6 "Added temporary score file entry for followups to %s."] 6 (#$ . 6829) "p"]) #@44 Apply current buffer to current newsgroup. (defalias 'gnus-kill-file-apply-buffer #[nil "ƒÁ\n!ƒÃÄ !‡Å ˆÆÇÈ\"‡" [gnus-current-kill-article get-buffer gnus-summary-buffer gnus-kill-file-apply-string buffer-string ding gnus-message 2 "No newsgroup is selected."] 3 (#$ . 7340) nil]) #@36 Apply STRING to current newsgroup. (defalias 'gnus-kill-file-apply-string #[(string) "À ÂQŠÃ‹*‡" ["(progn \n" string "\n)" ((byte-code "À !ˆÂÃ\f!@!‡" [pop-to-buffer gnus-summary-buffer eval read-from-string string] 3))] 3 (#$ . 7631) nil]) #@65 Apply sexp before point in current buffer to current newsgroup. (defalias 'gnus-kill-file-apply-last-sexp #[nil "ƒÁ\n!ƒŠÃÄ!ˆ`)`{ŠÆ‹*‡Ç ˆÈÉÊ\"‡" [gnus-current-kill-article get-buffer gnus-summary-buffer forward-sexp -1 string ((byte-code "À !ˆÂÃ\f!@!‡" [pop-to-buffer gnus-summary-buffer eval read-from-string string] 3)) ding gnus-message 2 "No newsgroup is selected."] 3 (#$ . 7878) nil]) #@55 Save a kill file, then return to the previous buffer. (defalias 'gnus-kill-file-exit #[nil "À ˆp !ƒÄ !ˆÅ !ˆƒÇ!ˆÈÉ !)‡" [save-buffer killbuf get-buffer gnus-article-buffer bury-buffer delete-windows-on gnus-winconf-kill-file set-window-configuration nil kill-buffer] 2 (#$ . 8280) nil]) #@105 Return the name of a kill file for NEWSGROUP. If NEWSGROUP is nil, return the global kill file instead. (defalias 'gnus-Newsgroup-kill-file #[(newsgroup) "ƒ\nÁ˜ƒ \f\"‡ ƒÂÆ!Ç Q\f\"‡ÂÈ!É Q\f\"‡" [newsgroup "" expand-file-name gnus-kill-file-name gnus-kill-files-directory gnus-use-long-file-name gnus-capitalize-newsgroup "." gnus-newsgroup-directory-form "/"] 4 (#$ . 8585)]) #@33 Remove lines marked with MARKS. (defalias 'gnus-expunge #[(marks) "ŠqˆÁ\nÃ\")‡" [gnus-summary-buffer gnus-summary-limit-to-marks marks reverse] 3 (#$ . 8976)]) #@71 Apply .KILL file, unless a .SCORE file for the same newsgroup exists. (defalias 'gnus-apply-kill-file-unless-scored #[nil "ÀÁ\n!!ƒÀÃ\n!!ƒÄÅÆ\n#ˆÇ‡ÀÃÈ!!„(ÀÃ\n!!ƒ+É ‡Ç‡" [file-exists-p gnus-score-file-name gnus-newsgroup-name gnus-newsgroup-kill-file gnus-message 3 "Note: Ignoring %s.KILL; preferring .SCORE" 0 nil gnus-apply-kill-file-internal] 4 (#$ . 9143)]) #@92 Apply a kill file to the current newsgroup. Returns the number of articles marked as read. (defalias 'gnus-apply-kill-file-internal #[nil "ÀÁ!À\n!D\fGÆÁÁ \n\nƒkË\n@!ƒb\f ƒ7ÏÐ \" ‚[ ƒ[Ñ @ÒH\"„R @ÒH B  A‰ „<Á\n)‚\nA‰\n„) …—Ô‹ˆÕÖ!ˆƒ– \fGZ‰Ò=„ØÙÚ#ˆ)‚—Ò,‡" [gnus-newsgroup-kill-file nil gnus-newsgroup-name kill-files gnus-newsgroup-unreads unreads t gnus-summary-inhibit-highlight beg gnus-newsgroup-kill-headers files file-exists-p gnus-newsgroup-headers headers gnus-kill-killed mapcar #[(header) "ÁH‡" [header 0] 2] gnus-member-of-range 0 gnus-newsgroup-killed ((byte-code "Šƒ=Á@!ƒ6ÂÃÄ@#ˆÅ@!ˆÆ ˆebˆÇÈÉ:ƒ,Ê ˆ‚/Ë ˆÂÃÌ@#ˆA‰„)LJ" [kill-files file-exists-p gnus-message 6 "Processing kill file %s..." find-file gnus-add-current-to-buffer-list nil (byte-code "Àp!‡" [read] 2) ((error)) gnus-kill-parse-gnus-kill-file gnus-kill-parse-rn-kill-file "Processing kill file %s...done"] 5)) gnus-set-mode-line summary nunreads gnus-message 6 "Marked %d articles as read"] 5 (#$ . 9516)]) (defalias 'gnus-score-insert-help #[(string alist idx) "ŠÀÁ!ˆÂp!ˆÃ ˆ\fűˆ…/ÇÈ@@ @8#cˆA‰„Ê)‡" [pop-to-buffer "*Score Help*" buffer-disable-undo erase-buffer string ":\n\n" alist format " %c: %s\n" idx nil] 6]) (defalias 'gnus-kill-parse-gnus-kill-file #[nil "ebˆÀ ˆÁ‰`ÁÄʼnƒR\n<„ÆÇ\n\"ˆ\n@È=„4\n@É=„4\n@Ê=ƒD `|ˆË\n!†?Ìcˆ‚\nŠ qˆÁÎψ)‚\nÐ ƒ_ƒ_Ò ˆÓÁ!*‡" [gnus-kill-file-mode nil form beg (byte-code "Àp!‡" [read] 2) ((error)) error "Illegal kill entry (possibly rn kill file?): %s" gnus-kill gnus-raise gnus-lower eval "" gnus-summary-buffer (eval form) ((error)) buffer-modified-p gnus-kill-save-kill-file save-buffer set-buffer-modified-p] 3]) (defalias 'gnus-kill-parse-rn-kill-file #[nil "ebˆÀ ˆÁÂɉm?…hÉÊ!ƒb˔˕{Ì”ƒ0Ì”f‚1ÍΔΕ{ÏÐ\f\"ƒFÑÒÓ\"ˆÔÑ žA†PÕÏÔ\f\"ƒ]Ö‚^×ÃØ%ˆËyˆ‚-‡" [gnus-kill-file-mode ((97 . "") (104 . "") (102 . "from") (58 . "subject")) ((109 . " ") (106 . "X")) nil commands modifier pattern com-to-com mod-to-header looking-at "[ ]*/\\([^/]*\\)/\\([ahfcH]\\)?:\\([a-z=:]*\\)" 1 2 115 3 string-match "\\+" gnus-kill "from" "." "m" "subject" (gnus-summary-mark-as-unread nil " ") (gnus-summary-mark-as-read nil "X") t] 6]) #@367 If FIELD of an article matches REGEXP, execute COMMAND. Optional 1st argument COMMAND is default to (gnus-summary-mark-as-read nil "X"). If optional 2nd argument ALL is non-nil, articles marked are also applied to. If FIELD is an empty string (or nil), entire article body is searched for. COMMAND must be a lisp expression or a string representing a key sequence. (defalias 'gnus-kill #[(field regexp &optional exe-command all silent) "pŠÁ‹ˆ)Â!ˆ Ä=…E …E?…EÇÈ :ƒ*Ê D‚+ E „6\f…;Ê DC¤\f…CÍC¤!)‡" [old-buffer ((byte-code "À Â\"ˆebˆ Ä †ÆÇ‰‰ \n \f‰ <ƒÂ A:„XÎ @ Ç?%ÑUƒOÒ\f A\"VƒÏÇ‚Ï \f¡ˆ‚Ï @‰\nƒÏ\n:ƒ¨\nA Î\n@ Ç?%ÑUƒŸÒ\f \"Vƒµƒ™ A¡ˆ‚µ A‚µ\n\f¡ˆ‚µÎ\n Ç?%ˆ  A‰ ‚ZÎ  Ç?%ˆ.LJ" [switch-to-buffer gnus-summary-buffer norecord regexp current-time-string exe-command (gnus-summary-mark-as-read nil gnus-kill-file-mark) nil prev kdate kill command date kill-list gnus-execute field all 0 gnus-days-between gnus-kill-expiry-days] 7)) switch-to-buffer major-mode gnus-kill-file-mode regexp silent gnus-pp-gnus-kill gnus-kill field quote exe-command all t] 5 (#$ . 11765)]) (defalias 'gnus-pp-gnus-kill #[(object) "À 8:ƒ\"À 8A:ƒ\"À 8@Â=ƒ(À 8A@A:„(ÃÄ !P‡ŠÅÆ!qˆÇp!ˆÈ ˆÉÊ @ A@#cˆÀ 8A@Ë\f‰ ƒk\fƒYÎ\fÏ‚ZÐÄ @!±ˆ A‰ „M*ÑcˆÒ 8ƒ“ÓÒ 8:ƒŠÒ 8@Â=„ŠÔ‚‹ÏÄÒ 8!±ˆÕ 8ƒœÖcˆÑcˆed{×p!ˆ)‡" [2 object quote "\n" prin1-to-string get-buffer-create "*Gnus PP*" buffer-disable-undo erase-buffer format "\n(%S %S\n '(" t first klist nil "" "\n " ")" 3 "\n " "'" 4 "\n t" kill-buffer] 6]) (defalias 'gnus-execute-1 #[(function regexp form header) "ŠÀ\nƒ« ƒeÀ\nƒa \n!‰;„Å\f!Æ\f\"‰ƒa;ƒ6É!ˆ‚a‰9ƒFÊ!†Q<…Q@Ë=)ƒ\\ ˆ‚aÌ!ˆ)‚«À‰‰‰ ÑÒÓ\nÔH#ˆÕ ˆÖ\nÔH×\"ˆŠqˆebˆÙÀ×#‰)ƒª;ƒ¥É!ˆ‚ªÌ!ˆ, *‡" [nil did-kill header function value prin1-to-string string-match regexp form execute-kbd-macro fboundp lambda eval gnus-mark-article-hook gnus-break-pages gnus-last-article gnus-current-article gnus-message 6 "Searching for article: %d..." 0 gnus-article-setup-buffer gnus-article-prepare t gnus-article-buffer re-search-forward] 6]) #@327 If FIELD of article header matches REGEXP, execute lisp FORM (or a string). If FIELD is an empty string (or nil), entire article body is searched for. If optional 1st argument BACKWARD is non-nil, do backward instead. If optional 2nd argument IGNORE-MARKED is non-nil, articles which are marked as read or ticked are ignored. (defalias 'gnus-execute #[(field regexp form &optional backward ignore-marked) "ŠÀÁ‰‰ƒǘƒÁ‚8ÈÉÊ—P!‰!ƒ2ËÌ\fÍBE‚8ÎÏ\"ˆ „ZÐ`Ñ\"‰ƒKÓ!ˆ)Ð`Ô\"†UÕ ‰„gÖ?Á#‰ƒ‘ƒs >ƒ8ÚÛ ž8‰!ƒ8Ý\f\n$ƒ8 T‚8 -‡" [0 nil header article function killed-no field "" fboundp intern-soft "mail-header-" lambda (h) (h) error "Unknown header field: \"%s\"" get-text-property gnus-intangible to gnus-summary-goto-subject gnus-number gnus-summary-last-subject gnus-summary-search-forward ignore-marked backward gnus-newsgroup-kill-headers vectorp 3 gnus-newsgroup-data gnus-execute-1 regexp form] 6 (#$ . 13920)]) (provide (quote gnus-kill))