From: yamaoka Date: Fri, 27 Feb 2004 03:28:36 +0000 (+0000) Subject: Synch to No Gnus 200402270324. X-Git-Tag: t-gnus-6_17_4-quimby-~1053 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=818235ac7f33073995ec59721791f461dce5ea34;p=elisp%2Fgnus.git- Synch to No Gnus 200402270324. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 891cbb7..75a49b9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -8,6 +8,13 @@ 2004-02-27 Jesper Harder + * spam-stat.el: Pedantic docstring and whitespace fixes (courtesy + of checkdoc.el). + * nnrss.el: do. + * gnus-mlspl.el: do. + * gnus-ml.el: do. + * gnus-srvr.el: do. + * nnrss.el (nnrss-opml-export): Turn on sgml-mode. 2004-02-27 Kevin Ryde (tiny change) diff --git a/lisp/gnus-ml.el b/lisp/gnus-ml.el index 7179fe2..71957b2 100644 --- a/lisp/gnus-ml.el +++ b/lisp/gnus-ml.el @@ -3,7 +3,7 @@ ;; Copyright (C) 2000, 2001 Free Software Foundation, Inc. ;; Author: Julien Gilles -;; Keywords: news +;; Keywords: news, mail ;; This file is part of GNU Emacs. @@ -117,7 +117,7 @@ If FORCE is non-nil, replace the old ones." (t (gnus-message 1 "no list-help in this group"))))) (defun gnus-mailing-list-subscribe () - "Subscribe" + "Subscribe." (interactive) (let ((list-subscribe (with-current-buffer gnus-original-article-buffer @@ -126,7 +126,7 @@ If FORCE is non-nil, replace the old ones." (t (gnus-message 1 "no list-subscribe in this group"))))) (defun gnus-mailing-list-unsubscribe () - "Unsubscribe" + "Unsubscribe." (interactive) (let ((list-unsubscribe (with-current-buffer gnus-original-article-buffer @@ -144,7 +144,7 @@ If FORCE is non-nil, replace the old ones." (t (gnus-message 1 "no list-post in this group"))))) (defun gnus-mailing-list-owner () - "Mail to the owner" + "Mail to the owner." (interactive) (let ((list-owner (with-current-buffer gnus-original-article-buffer @@ -153,7 +153,7 @@ If FORCE is non-nil, replace the old ones." (t (gnus-message 1 "no list-owner in this group"))))) (defun gnus-mailing-list-archive () - "Browse archive" + "Browse archive." (interactive) (require 'browse-url) (let ((list-archive diff --git a/lisp/gnus-mlspl.el b/lisp/gnus-mlspl.el index 2379a17..f1f939e 100644 --- a/lisp/gnus-mlspl.el +++ b/lisp/gnus-mlspl.el @@ -34,31 +34,31 @@ (require 'nnmail) (defvar gnus-group-split-updated-hook nil - "Hook called just after nnmail-split-fancy is updated by -gnus-group-split-update.") + "Hook called just after `nnmail-split-fancy' is updated by +`gnus-group-split-update'.") (defvar gnus-group-split-default-catch-all-group "mail.misc" "Group name (or arbitrary fancy split) with default splitting rules. -Used by gnus-group-split and gnus-group-split-update as a fallback +Used by `gnus-group-split' and `gnus-group-split-update' as a fallback split, in case none of the group-based splits matches.") ;;;###autoload (defun gnus-group-split-setup (&optional auto-update catch-all) - "Set up the split for nnmail-split-fancy. + "Set up the split for `nnmail-split-fancy'. Sets things up so that nnmail-split-fancy is used for mail splitting, and defines the variable nnmail-split-fancy according with group parameters. If AUTO-UPDATE is non-nil (prefix argument accepted, if called interactively), it makes sure nnmail-split-fancy is re-computed before -getting new mail, by adding gnus-group-split-update to -nnmail-pre-get-new-mail-hook. +getting new mail, by adding `gnus-group-split-update' to +`nnmail-pre-get-new-mail-hook'. A non-nil CATCH-ALL replaces the current value of -gnus-group-split-default-catch-all-group. This variable is only used +`gnus-group-split-default-catch-all-group'. This variable is only used by gnus-group-split-update, and only when its CATCH-ALL argument is nil. This argument may contain any fancy split, that will be added as -the last split in a `|' split produced by gnus-group-split-fancy, +the last split in a `|' split produced by `gnus-group-split-fancy', unless overridden by any group marked as a catch-all group. Typical uses are as simple as the name of a default mail group, but more elaborate fancy splits may also be useful to split mail that doesn't @@ -74,11 +74,11 @@ match any of the group-specified splitting rules. See ;;;###autoload (defun gnus-group-split-update (&optional catch-all) - "Computes nnmail-split-fancy from group params and CATCH-ALL, by + "Computes `nnmail-split-fancy' from group params and CATCH-ALL, by calling (gnus-group-split-fancy nil nil CATCH-ALL). -If CATCH-ALL is nil, gnus-group-split-default-catch-all-group is used -instead. This variable is set by gnus-group-split-setup." +If CATCH-ALL is nil, `gnus-group-split-default-catch-all-group' is used +instead. This variable is set by `gnus-group-split-setup'." (interactive) (setq nnmail-split-fancy (gnus-group-split-fancy @@ -88,10 +88,10 @@ instead. This variable is set by gnus-group-split-setup." ;;;###autoload (defun gnus-group-split () - "Uses information from group parameters in order to split mail. + "Use information from group parameters in order to split mail. See `gnus-group-split-fancy' for more information. -gnus-group-split is a valid value for nnmail-split-methods." +`gnus-group-split' is a valid value for `nnmail-split-methods'." (let (nnmail-split-fancy) (gnus-group-split-update) (nnmail-split-fancy))) diff --git a/lisp/gnus-srvr.el b/lisp/gnus-srvr.el index 3de8794..2bd5c2a 100644 --- a/lisp/gnus-srvr.el +++ b/lisp/gnus-srvr.el @@ -51,7 +51,7 @@ with some simple extensions. The following specs are understood: -%h backend +%h back end %n name %w address %s status @@ -346,8 +346,8 @@ The following commands are available: (and server (symbol-name server)))) (defun gnus-server-named-server () - "Returns a server name that matches one of the names returned by -gnus-method-to-server." + "Return a server name that matches one of the names returned by +`gnus-method-to-server'." (let ((server (get-text-property (point-at-bol) 'gnus-named-server))) (and server (symbol-name server)))) @@ -730,10 +730,10 @@ gnus-method-to-server." (if (eq (car method) 'nntp) (while (not (eobp)) (ignore-errors - (push (cons - (buffer-substring + (push (cons + (buffer-substring (point) - (progn + (progn (skip-chars-forward "^ \t") (point))) (let ((last (read cur))) @@ -905,7 +905,7 @@ buffer. (beginning-of-line) (let ((name (get-text-property (point) 'gnus-group))) (when (re-search-forward ": \\(.*\\)$" (point-at-eol) t) - (concat (gnus-method-to-server-name gnus-browse-current-method) ":" + (concat (gnus-method-to-server-name gnus-browse-current-method) ":" (or name (match-string-no-properties 1))))))) @@ -980,7 +980,7 @@ buffer. (gnus-get-function (gnus-server-to-method server) 'request-regenerate) (error - (error "This backend doesn't support regeneration"))) + (error "This back end doesn't support regeneration"))) (gnus-message 5 "Requesting regeneration of %s..." server) (unless (gnus-open-server server) (error "Couldn't open server")) diff --git a/lisp/nnrss.el b/lisp/nnrss.el index 54e20ff..de4a5a9 100644 --- a/lisp/nnrss.el +++ b/lisp/nnrss.el @@ -75,7 +75,7 @@ To use the description in headers, put this name into `nnmail-extra-headers'.") (defvar nnrss-content-function nil "A function which is called in `nnrss-request-article'. The arguments are (ENTRY GROUP ARTICLE). -ENTRY is the record of the current headline. GROUP is the group name. +ENTRY is the record of the current headline. GROUP is the group name. ARTICLE is the article number of the current headline.") (nnoo-define-basics nnrss) @@ -251,7 +251,7 @@ ARTICLE is the article number of the current headline.") ;;; Internal functions (eval-when-compile (defun xml-rpc-method-call (&rest args))) (defun nnrss-fetch (url &optional local) - "Fetch the url and put it in a the expected lisp structure." + "Fetch URL and put it in a the expected Lisp structure." (with-temp-buffer ;some CVS versions of url.el need this to close the connection quickly (let* (xmlform htmlform) @@ -290,7 +290,7 @@ ARTICLE is the article number of the current headline.") (defvar nnrss-extra-categories '(nnrss-snarf-moreover-categories)) (defun nnrss-generate-active () - (if (y-or-n-p "fetch extra categories? ") + (if (y-or-n-p "Fetch extra categories? ") (dolist (func nnrss-extra-categories) (funcall func))) (save-excursion @@ -457,8 +457,8 @@ ARTICLE is the article number of the current headline.") "OPML subscriptions import. Read the file and attempt to subscribe to each Feed in the file." (interactive "fImport file: ") - (mapcar - (lambda (node) (gnus-group-make-rss-group + (mapcar + (lambda (node) (gnus-group-make-rss-group (cdr (assq 'xmlUrl (cadr node))))) (nnrss-find-el 'outline (progn @@ -472,7 +472,7 @@ Export subscriptions to a buffer in OPML Format." (interactive) (with-current-buffer (get-buffer-create "*OPML Export*") (mm-set-buffer-file-coding-system 'utf-8) - (insert (concat + (insert (concat "\n" "\n" "\n" @@ -485,7 +485,7 @@ Export subscriptions to a buffer in OPML Format." " \n" " \n")) (mapcar (lambda (sub) - (insert (concat + (insert (concat " \n"))) nnrss-group-alist) @@ -563,8 +563,8 @@ It is useful when `(setq nnrss-use-local t)'." node)) (defun nnrss-find-el (tag data &optional found-list) - "Find the all matching elements in the data. Careful with this on -large documents!" + "Find the all matching elements in the data. +Careful with this on large documents!" (if (listp data) (mapcar (lambda (bit) (when (car-safe bit) @@ -589,25 +589,26 @@ large documents!" "Test if the element we are handed is an RSS autodiscovery link." (and (eq (car-safe el) 'link) (string-equal (cdr (assoc 'rel (cadr el))) "alternate") - (or (string-equal (cdr (assoc 'type (cadr el))) + (or (string-equal (cdr (assoc 'type (cadr el))) "application/rss+xml") (string-equal (cdr (assoc 'type (cadr el))) "text/xml")))) (defun nnrss-get-rsslinks (data) "Extract the elements that are links to RSS from the parsed data." - (delq nil (mapcar + (delq nil (mapcar (lambda (el) (if (nnrss-rsslink-p el) el)) (nnrss-find-el 'link data)))) (defun nnrss-extract-hrefs (data) - "Recursively extract hrefs from a page's source. DATA should be -the output of xml-parse-region or w3-parse-buffer." + "Recursively extract hrefs from a page's source. +DATA should be the output of `xml-parse-region' or +`w3-parse-buffer'." (mapcar (lambda (ahref) (cdr (assoc 'href (cadr ahref)))) (nnrss-find-el 'a data))) -(defmacro nnrss-match-macro (base-uri item +(defmacro nnrss-match-macro (base-uri item onsite-list offsite-list) `(cond ((or (string-match (concat "^" ,base-uri) ,item) (not (string-match "://" ,item))) @@ -634,7 +635,7 @@ whether they are `offsite' or `onsite'." (nnrss-match-macro base-uri href rss-onsite-end rss-offsite-end)) ((string-match "\\.rdf$" href) - (nnrss-match-macro + (nnrss-match-macro base-uri href rdf-onsite-end rdf-offsite-end)) ((string-match "\\.xml$" href) (nnrss-match-macro @@ -649,7 +650,7 @@ whether they are `offsite' or `onsite'." (nnrss-match-macro base-uri href xml-onsite-in xml-offsite-in))))) hrefs) - (append + (append rss-onsite-end rdf-onsite-end xml-onsite-end rss-onsite-in rdf-onsite-in xml-onsite-in rss-offsite-end rdf-offsite-end xml-offsite-end @@ -682,7 +683,7 @@ whether they are `offsite' or `onsite'." ;; - offsite links containing any of the above (let* ((base-uri (progn (string-match ".*://[^/]+/?" url) (match-string 0 url))) - (hrefs (nnrss-order-hrefs + (hrefs (nnrss-order-hrefs base-uri (nnrss-extract-hrefs parsed-page))) (rss-link nil)) (while (and (eq rss-link nil) (not (eq hrefs nil))) @@ -698,7 +699,7 @@ whether they are `offsite' or `onsite'." (nnrss-find-rss-via-syndic8 url)))))))) (defun nnrss-find-rss-via-syndic8 (url) - "query syndic8 for the rss feeds it has for the url." + "Query syndic8 for the rss feeds it has for URL." (if (not (locate-library "xml-rpc")) (progn (message "XML-RPC is not available... not checking Syndic8.") @@ -709,22 +710,22 @@ whether they are `offsite' or `onsite'." 'syndic8.FindSites url))) (when feedid - (let* ((feedinfo (xml-rpc-method-call + (let* ((feedinfo (xml-rpc-method-call "http://www.syndic8.com/xmlrpc.php" 'syndic8.GetFeedInfo feedid)) (urllist - (delq nil + (delq nil (mapcar (lambda (listinfo) - (if (string-equal + (if (string-equal (cdr (assoc "status" listinfo)) "Syndicated") (cons (cdr (assoc "sitename" listinfo)) (list (cons 'title - (cdr (assoc + (cdr (assoc "sitename" listinfo))) (cons 'href (cdr (assoc @@ -733,20 +734,20 @@ whether they are `offsite' or `onsite'." (if (not (> (length urllist) 1)) (cdar urllist) (let ((completion-ignore-case t) - (selection + (selection (mapcar (lambda (listinfo) - (cons (cdr (assoc "sitename" listinfo)) - (string-to-int + (cons (cdr (assoc "sitename" listinfo)) + (string-to-int (cdr (assoc "feedid" listinfo))))) feedinfo))) - (cdr (assoc + (cdr (assoc (completing-read "Multiple feeds found. Select one: " selection nil t) urllist))))))))) (defun nnrss-rss-p (data) - "Test if data is an RSS feed. Simply ensures that the first -element is rss or rdf." + "Test if DATA is an RSS feed. +Simply ensures that the first element is rss or rdf." (or (eq (caar data) 'rss) (eq (caar data) 'rdf:RDF))) @@ -767,7 +768,7 @@ element is rss or rdf." that gives the URI for which you want to retrieve the namespace prefix), return the prefix." (let* ((prefix (car (rassoc uri (cadar el)))) - (nslist (if prefix + (nslist (if prefix (split-string (symbol-name prefix) ":"))) (ns (cond ((eq (length nslist) 1) ; no prefix given "") diff --git a/lisp/spam-stat.el b/lisp/spam-stat.el index 2b0d21e..c72923f 100644 --- a/lisp/spam-stat.el +++ b/lisp/spam-stat.el @@ -161,14 +161,14 @@ This variable says how many characters this will be." :group 'spam-stat) (defcustom spam-stat-split-fancy-spam-group "mail.spam" - "Name of the group where spam should be stored, if -`spam-stat-split-fancy' is used in fancy splitting rules. Has no -effect when spam-stat is invoked through spam.el." + "Name of the group where spam should be stored. +If `spam-stat-split-fancy' is used in fancy splitting rules. Has +no effect when spam-stat is invoked through spam.el." :type 'string :group 'spam-stat) (defcustom spam-stat-split-fancy-spam-threshhold 0.9 - "Spam score threshhold in spam-stat-split-fancy." + "Spam score threshold in spam-stat-split-fancy." :type 'number :group 'spam-stat) @@ -296,7 +296,7 @@ Use `spam-stat-ngood', `spam-stat-nbad', `spam-stat-good', ;; Parsing (defmacro with-spam-stat-max-buffer-size (&rest body) - "Narrows the buffer down to the first 4k characters, then evaluates BODY." + "Narrow the buffer down to the first 4k characters, then evaluate BODY." `(save-restriction (when (> (- (point-max) (point-min)) @@ -306,7 +306,7 @@ Use `spam-stat-ngood', `spam-stat-nbad', `spam-stat-good', ,@body)) (defun spam-stat-buffer-words () - "Return a hash table of words and number of occurences in the buffer." + "Return a hash table of words and number of occurrences in the buffer." (run-hooks 'spam-stat-washing-hook) (with-spam-stat-max-buffer-size (with-syntax-table spam-stat-syntax-table @@ -356,7 +356,7 @@ Use `spam-stat-ngood', `spam-stat-nbad', `spam-stat-good', (lambda (word count) (let ((entry (gethash word spam-stat))) (if (not entry) - (error "This buffer has unknown words in it.") + (error "This buffer has unknown words in it") (spam-stat-set-good entry (- (spam-stat-good entry) count)) (spam-stat-set-bad entry (+ (spam-stat-bad entry) count)) (spam-stat-set-score entry (spam-stat-compute-score entry)) @@ -372,7 +372,7 @@ Use `spam-stat-ngood', `spam-stat-nbad', `spam-stat-good', (lambda (word count) (let ((entry (gethash word spam-stat))) (if (not entry) - (error "This buffer has unknown words in it.") + (error "This buffer has unknown words in it") (spam-stat-set-good entry (+ (spam-stat-good entry) count)) (spam-stat-set-bad entry (- (spam-stat-bad entry) count)) (spam-stat-set-score entry (spam-stat-compute-score entry)) @@ -383,7 +383,7 @@ Use `spam-stat-ngood', `spam-stat-nbad', `spam-stat-good', ;; Saving and Loading (defun spam-stat-save (&optional force) - "Save the `spam-stat' hash table as lisp file. + "Save the `spam-stat' hash table as Lisp file. With a prefix argument save unconditionally." (interactive "P") (when (or force spam-stat-dirty) @@ -587,7 +587,7 @@ COUNT defaults to 5" (setq spam-stat-dirty t)) (defun spam-stat-install-hooks-function () - "Install the spam-stat function hooks" + "Install the spam-stat function hooks." (interactive) (add-hook 'nnmail-prepare-incoming-message-hook 'spam-stat-store-current-buffer) @@ -598,7 +598,7 @@ COUNT defaults to 5" (spam-stat-install-hooks-function)) (defun spam-stat-unload-hook () - "Uninstall the spam-stat function hooks" + "Uninstall the spam-stat function hooks." (interactive) (remove-hook 'nnmail-prepare-incoming-message-hook 'spam-stat-store-current-buffer)