X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fgnus.el;h=a25977f77196da57c33ae1502e2c8ee5df74f8d1;hb=11f65cf2ffd5c39d314499e19ff17f12b3dac192;hp=e1682d044491e8db26be470f8e5daaa808d3a8f2;hpb=9af3abed1d0a199ba28ab0013980af74950aef98;p=elisp%2Fgnus.git- diff --git a/lisp/gnus.el b/lisp/gnus.el index e1682d0..a25977f 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -2,7 +2,7 @@ ;; Copyright (C) 1987,88,89,90,93,94,95,96,97,98 Free Software Foundation, Inc. ;; Author: Masanobu UMEDA -;; Lars Magne Ingebrigtsen +;; Lars Magne Ingebrigtsen ;; Keywords: news, mail ;; This file is part of GNU Emacs. @@ -250,11 +250,16 @@ is restarted, and sometimes reloaded." :link '(custom-manual "(gnus)Exiting Gnus") :group 'gnus) -(defconst gnus-version-number "5.6.6" - "Version number for this version of Gnus.") +(defconst gnus-product-name "Shoe-gnus" + "Product name of this version of gnus.") -(defconst gnus-version (format "Gnus v%s" gnus-version-number) - "Version string for this version of Gnus.") +(defconst gnus-version-number "6.8.4" + "Version number for this version of gnus.") + +(defconst gnus-version + (format "%s %s (based on Gnus 5.6.30; for SEMI 1.8, FLIM 1.8/1.9)" + gnus-product-name gnus-version-number) + "Version string for this version of gnus.") (defcustom gnus-inhibit-startup-message nil "If non-nil, the startup message will not be displayed. @@ -706,7 +711,12 @@ All other Gnus path variables are initialized from this variable." (defcustom gnus-directory (or (getenv "SAVEDIR") (nnheader-concat gnus-home-directory "News/")) - "*Directory variable from which all other Gnus file variables are derived." + "*Directory variable from which all other Gnus file variables are derived. + +Note that Gnus is mostly loaded when the `.gnus.el' file is read. +This means that other directory variables that are initialized from +this variable won't be set properly if you set this variable in `.gnus.el'. +Set this variable in `.emacs' instead." :group 'gnus-files :type 'directory) @@ -833,6 +843,7 @@ that case, just return a fully prefixed name of the group -- \"nnml+private:mail.misc\", for instance." :group 'gnus-message :type '(choice (const :tag "none" nil) + sexp string)) (defcustom gnus-secondary-servers nil @@ -1095,13 +1106,14 @@ commands will still require prompting." (defcustom gnus-extract-address-components 'gnus-extract-address-components "*Function for extracting address components from a From header. -Two pre-defined function exist: `gnus-extract-address-components', -which is the default, quite fast, and too simplistic solution, and -`mail-extract-address-components', which works much better, but is -slower." + +`gnus-extract-address-components' is a quite fast, and too simplistic. +`mail-extract-address-components' works much better, but is slower. +`std11-extract-address-components' also works better, and less slower." :group 'gnus-summary-format :type '(radio (function-item gnus-extract-address-components) (function-item mail-extract-address-components) + (function-item std11-extract-address-components) (function :tag "Other"))) (defcustom gnus-carpal nil @@ -1335,7 +1347,6 @@ want." gnus-article-emphasize gnus-article-fill-cited-article gnus-article-remove-cr - gnus-article-de-quoted-unreadable gnus-summary-stop-page-breaking ;; gnus-summary-caesar-message ;; gnus-summary-verbose-headers @@ -1414,11 +1425,11 @@ want." (defvar gnus-predefined-server-alist `(("cache" - (nnspool "cache" - (nnspool-spool-directory gnus-cache-directory) - (nnspool-nov-directory gnus-cache-directory) - (nnspool-active-file - (nnheader-concat gnus-cache-directory "active"))))) + nnspool "cache" + (nnspool-spool-directory gnus-cache-directory) + (nnspool-nov-directory gnus-cache-directory) + (nnspool-active-file + (nnheader-concat gnus-cache-directory "active")))) "List of predefined (convenience) servers.") (defvar gnus-topic-indentation "") ;; Obsolete variable. @@ -1536,8 +1547,7 @@ gnus-newsrc-hashtb should be kept so that both hold the same information.") (if (eq (nth 1 package) ':interactive) (cdddr package) (cdr package))))) - '(("metamail" metamail-buffer) - ("info" Info-goto-node) + '(("info" Info-goto-node) ("hexl" hexl-hex-string-to-integer) ("pp" pp pp-to-string pp-eval-expression) ("ps-print" ps-print-preprint) @@ -1618,8 +1628,9 @@ gnus-newsrc-hashtb should be kept so that both hold the same information.") gnus-uu-decode-binhex gnus-uu-decode-uu-view gnus-uu-decode-uu-and-save-view gnus-uu-decode-unshar-view gnus-uu-decode-unshar-and-save-view gnus-uu-decode-save-view - gnus-uu-decode-binhex-view) - ("gnus-uu" gnus-uu-delete-work-dir gnus-quote-arg-for-sh-or-csh) + gnus-uu-decode-binhex-view gnus-uu-unmark-thread) + ("gnus-uu" gnus-uu-delete-work-dir gnus-quote-arg-for-sh-or-csh + gnus-uu-unmark-thread) ("gnus-msg" (gnus-summary-send-map keymap) gnus-article-mail gnus-copy-article-buffer gnus-extended-version) ("gnus-msg" :interactive t @@ -1662,7 +1673,7 @@ gnus-newsrc-hashtb should be kept so that both hold the same information.") gnus-article-hide-headers gnus-article-hide-boring-headers gnus-article-treat-overstrike gnus-article-word-wrap gnus-article-remove-cr gnus-article-remove-trailing-blank-lines - gnus-article-display-x-face gnus-article-de-quoted-unreadable + gnus-article-display-x-face gnus-article-mime-decode-quoted-printable gnus-article-hide-pgp gnus-article-hide-pem gnus-article-hide-signature gnus-article-strip-leading-blank-lines gnus-article-date-local @@ -1969,13 +1980,15 @@ If ARG, insert string at point." "Return VERSION as a floating point number." (when (or (string-match "^\\([^ ]+\\)? ?Gnus v?\\([0-9.]+\\)$" version) (string-match "^\\(.?\\)gnus-\\([0-9.]+\\)$" version)) - (let* ((alpha (and (match-beginning 1) (match-string 1 version))) - (number (match-string 2 version)) - major minor least) - (string-match "\\([0-9]\\)\\.\\([0-9]+\\)\\.?\\([0-9]+\\)?" number) - (setq major (string-to-number (match-string 1 number))) - (setq minor (string-to-number (match-string 2 number))) - (setq least (if (match-beginning 3) + (let ((alpha (and (match-beginning 1) (match-string 1 version))) + (number (match-string 2 version)) + major minor least) + (unless (string-match + "\\([0-9]\\)\\.\\([0-9]+\\)\\.?\\([0-9]+\\)?" number) + (error "Invalid version string: %s" version)) + (setq major (string-to-number (match-string 1 number)) + minor (string-to-number (match-string 2 number)) + least (if (match-beginning 3) (string-to-number (match-string 3 number)) 0)) (string-to-number @@ -1984,7 +1997,11 @@ If ARG, insert string at point." (cond ((member alpha '("(ding)" "d")) "4.99") ((member alpha '("September" "s")) "5.01") - ((member alpha '("Red" "r")) "5.03")) + ((member alpha '("Red" "r")) "5.03") + ((member alpha '("Quassia" "q")) "5.05") + ((member alpha '("p")) "5.07") + ((member alpha '("o")) "5.09") + ((member alpha '("n")) "5.11")) minor least) (format "%d.%02d%02d" major minor least)))))) @@ -2027,7 +2044,7 @@ g -- Group name." (setq prompt (match-string 1 string))) (setq i (match-end 0)) ;; We basically emulate just about everything that - ;; `interactive' does, but adds the "g" and "G" specs. + ;; `interactive' does, but add the specs listed above. (push (cond ((= c ?a) @@ -2168,7 +2185,14 @@ that that variable is buffer-local to the summary buffers." "Return non-nil if GROUP (and ARTICLE) come from a news server." (or (gnus-member-of-valid 'post group) ; Ordinary news group. (and (gnus-member-of-valid 'post-mail group) ; Combined group. - (eq (gnus-request-type group article) 'news)))) + (if (or (null article) + (not (< article 0))) + (eq (gnus-request-type group article) 'news) + (if (not (vectorp article)) + nil + ;; It's a real article. + (eq (gnus-request-type group (mail-header-id article)) + 'news)))))) ;; Returns a list of writable groups. (defun gnus-writable-groups () @@ -2411,10 +2435,19 @@ also examines the topic parameters." (defun gnus-group-parameter-value (params symbol &optional allow-list) "Return the value of SYMBOL in group PARAMS." - (or (car (memq symbol params)) ; It's either a simple symbol, - (and (or allow-list - (atom (cdr (assq symbol params)))) ; and it's not a local variable - (cdr (assq symbol params))))) ; but a cons. + ;; We only wish to return group parameters (dotted lists) and + ;; not local variables, which may have the same names. + ;; But first we handle single elements... + (or (car (memq symbol params)) + ;; Handle alist. + (let (elem) + (catch 'found + (while (setq elem (pop params)) + (when (and (consp elem) + (eq (car elem) symbol) + (or allow-list + (atom (cdr elem)))) + (throw 'found (cdr elem)))))))) (defun gnus-group-add-parameter (group param) "Add parameter PARAM to GROUP." @@ -2447,7 +2480,7 @@ also examines the topic parameters." (when params (setq params (delq name params)) (while (assq name params) - (setq params (delq (assq name params) params))) + (gnus-pull name params)) (gnus-info-set-params info params)))))) (defun gnus-group-add-score (group &optional score) @@ -2462,7 +2495,10 @@ If SCORE is nil, add 1 to the score of GROUP." "Collapse GROUP name LEVELS. Select methods are stripped and any remote host name is stripped down to just the host name." - (let* ((name "") (foreign "") (depth -1) (skip 1) + (let* ((name "") + (foreign "") + (depth 0) + (skip 1) (levels (or levels (progn (while (string-match "\\." group skip) @@ -2659,11 +2695,14 @@ Disallow illegal group names." (defun gnus-read-method (prompt) "Prompt the user for a method. Allow completion over sensible values." - (let ((method - (completing-read - prompt (append gnus-valid-select-methods gnus-predefined-server-alist - gnus-server-alist) - nil t nil 'gnus-method-history))) + (let* ((servers + (append gnus-valid-select-methods + gnus-predefined-server-alist + gnus-server-alist)) + (method + (completing-read + prompt servers + nil t nil 'gnus-method-history))) (cond ((equal method "") (setq method gnus-select-method)) @@ -2673,7 +2712,7 @@ Allow completion over sensible values." (assoc method gnus-valid-select-methods)) (read-string "Address: ") ""))) - ((assoc method gnus-server-alist) + ((assoc method servers) method) (t (list (intern method) ""))))) @@ -2682,7 +2721,7 @@ Allow completion over sensible values." ;;;###autoload (defun gnus-slave-no-server (&optional arg) - "Read network news as a slave, without connecting to local server" + "Read network news as a slave, without connecting to local server." (interactive "P") (gnus-no-server arg t))