* lisp/gnus/nnmh.el (nnmh-newsgroup-articles): Declare var
Reported by Barry Fishman <barry@ecubist.org>. Along the way, I checked other variables which are similarly let-bound to nil and then read with any intervening assignment, which found another similar case of missing `defvar`s plus a bit of dead code. * lisp/gnus/gnus-kill.el (gnus-apply-kill-file-internal): Remove constant nil var `beg`. * lisp/gnus/gnus-search.el (gnus-search-query-parse-kv): Remove constant nil var `return`. * lisp/gnus/gnus-start.el (gnus-ask-server-for-new-groups): Remove constant nil var `group`. (gnus-killed-assoc, gnus-marked-assoc, gnus-newsrc-assoc): Declare vars. * lisp/gnus/gnus-sum.el (gnus-compute-read-articles): Remove constant nil var `first`. * lisp/gnus/nnbabyl.el (nnbabyl-request-accept-article): Remove constant nil var `beg`. * lisp/gnus/nnfolder.el (nnfolder-possibly-change-group): Remove constant nil var `inf`. * lisp/gnus/nnrss.el (nnrss-request-article): Remove constant nil var `err`.
This commit is contained in:
parent
f695fdfef7
commit
8497af6892
8 changed files with 22 additions and 16 deletions
|
@ -337,7 +337,7 @@ Returns the number of articles marked as read."
|
|||
(gnus-newsgroup-kill-file gnus-newsgroup-name)))
|
||||
(unreads (length gnus-newsgroup-unreads))
|
||||
(gnus-summary-inhibit-highlight t)
|
||||
beg)
|
||||
) ;; beg
|
||||
(setq gnus-newsgroup-kill-headers nil)
|
||||
;; If there are any previously scored articles, we remove these
|
||||
;; from the `gnus-newsgroup-headers' list that the score functions
|
||||
|
@ -381,7 +381,7 @@ Returns the number of articles marked as read."
|
|||
|
||||
(gnus-set-mode-line 'summary)
|
||||
|
||||
(if beg
|
||||
(if nil ;; beg
|
||||
(let ((nunreads (- unreads (length gnus-newsgroup-unreads))))
|
||||
(or (eq nunreads 0)
|
||||
(gnus-message 6 "Marked %d articles as read" nunreads))
|
||||
|
|
|
@ -549,7 +549,7 @@ structure.
|
|||
|
||||
In the simplest case, they are simply consed together. String
|
||||
KEY is converted to a symbol."
|
||||
(let (return)
|
||||
(let () ;; return
|
||||
(cond
|
||||
((member key gnus-search-date-keys)
|
||||
(when (string= "after" key)
|
||||
|
@ -559,7 +559,7 @@ KEY is converted to a symbol."
|
|||
(setq value (gnus-search-query-parse-mark value)))
|
||||
((string= "message-id" key)
|
||||
(setq key "id")))
|
||||
(or return
|
||||
(or nil ;; return
|
||||
(cons (intern key) value))))
|
||||
|
||||
(defun gnus-search-query-parse-date (value &optional rel-date)
|
||||
|
|
|
@ -1172,7 +1172,7 @@ for new groups, and subscribe the new groups as zombies."
|
|||
gnus-check-new-newsgroups)
|
||||
gnus-secondary-select-methods))))
|
||||
(groups 0)
|
||||
group new-newsgroups got-new method hashtb
|
||||
new-newsgroups got-new method hashtb ;; group
|
||||
gnus-override-subscribe-method)
|
||||
(unless gnus-killed-hashtb
|
||||
(gnus-make-hashtable-from-killed))
|
||||
|
@ -1203,14 +1203,14 @@ for new groups, and subscribe the new groups as zombies."
|
|||
(cond
|
||||
((eq do-sub 'subscribe)
|
||||
(cl-incf groups)
|
||||
(puthash g-name group gnus-killed-hashtb)
|
||||
(puthash g-name nil gnus-killed-hashtb) ;; group
|
||||
(gnus-call-subscribe-functions
|
||||
gnus-subscribe-options-newsgroup-method g-name))
|
||||
((eq do-sub 'ignore)
|
||||
nil)
|
||||
(t
|
||||
(cl-incf groups)
|
||||
(puthash g-name group gnus-killed-hashtb)
|
||||
(puthash g-name nil gnus-killed-hashtb) ;; group
|
||||
(if gnus-subscribe-hierarchical-interactive
|
||||
(push g-name new-newsgroups)
|
||||
(gnus-call-subscribe-functions
|
||||
|
@ -2378,6 +2378,11 @@ If FORCE is non-nil, the .newsrc file is read."
|
|||
(unless (gnus-yes-or-no-p (concat errmsg "; continue? "))
|
||||
(error "%s" errmsg)))))))))
|
||||
|
||||
;; IIUC these 3 vars were used in older .newsrc files.
|
||||
(defvar gnus-killed-assoc)
|
||||
(defvar gnus-marked-assoc)
|
||||
(defvar gnus-newsrc-assoc)
|
||||
|
||||
(defun gnus-read-newsrc-el-file (file)
|
||||
(let ((ding-file (concat file "d")))
|
||||
(when (file-exists-p ding-file)
|
||||
|
|
|
@ -6354,9 +6354,9 @@ The resulting hash table is returned, or nil if no Xrefs were found."
|
|||
;; First peel off all invalid article numbers.
|
||||
(when active
|
||||
(let ((ids articles)
|
||||
id first)
|
||||
id) ;; first
|
||||
(while (setq id (pop ids))
|
||||
(when (and first (> id (cdr active)))
|
||||
(when nil ;; (and first (> id (cdr active)))
|
||||
;; We'll end up in this situation in one particular
|
||||
;; obscure situation. If you re-scan a group and get
|
||||
;; a new article that is cross-posted to a different
|
||||
|
|
|
@ -323,7 +323,7 @@
|
|||
(nnbabyl-possibly-change-newsgroup group server)
|
||||
(nnmail-check-syntax)
|
||||
(let ((buf (current-buffer))
|
||||
result beg)
|
||||
result) ;; beg
|
||||
(and
|
||||
(nnmail-activate 'nnbabyl)
|
||||
(save-excursion
|
||||
|
@ -331,7 +331,7 @@
|
|||
(search-forward "\n\n" nil t)
|
||||
(forward-line -1)
|
||||
(save-excursion
|
||||
(while (re-search-backward "^X-Gnus-Newsgroup: " beg t)
|
||||
(while (re-search-backward "^X-Gnus-Newsgroup: " nil t) ;; beg
|
||||
(delete-region (point) (progn (forward-line 1) (point)))))
|
||||
(when nnmail-cache-accepted-message-ids
|
||||
(nnmail-cache-insert (nnmail-fetch-field "message-id")
|
||||
|
|
|
@ -706,7 +706,7 @@ deleted. Point is left where the deleted region was."
|
|||
(if dont-check
|
||||
(setq nnfolder-current-group group
|
||||
nnfolder-current-buffer nil)
|
||||
(let (inf file)
|
||||
(let (file) ;; inf
|
||||
;; If we have to change groups, see if we don't already have
|
||||
;; the folder in memory. If we do, verify the modtime and
|
||||
;; destroy the folder if needed so we can rescan it.
|
||||
|
@ -718,7 +718,7 @@ deleted. Point is left where the deleted region was."
|
|||
;; touched the file since last time.
|
||||
(when (and nnfolder-current-buffer
|
||||
(not (gnus-buffer-live-p nnfolder-current-buffer)))
|
||||
(setq nnfolder-buffer-alist (delq inf nnfolder-buffer-alist)
|
||||
(setq nnfolder-buffer-alist (delq nil nnfolder-buffer-alist) ;; inf
|
||||
nnfolder-current-buffer nil))
|
||||
|
||||
(setq nnfolder-current-group group)
|
||||
|
|
|
@ -503,6 +503,8 @@ as unread by Gnus.")
|
|||
(setcdr active (1+ (cdr active))))
|
||||
(cdr active)))
|
||||
|
||||
(defvar nnmh-newsgroup-articles)
|
||||
|
||||
(defun nnmh-update-gnus-unreads (group)
|
||||
;; Go through the .nnmh-articles file and compare with the actual
|
||||
;; articles in this folder. The articles that are "new" will be
|
||||
|
|
|
@ -200,7 +200,7 @@ for decoding when the cdr that the data specify is not available.")
|
|||
(nnrss-possibly-change-group group server)
|
||||
(let ((e (assq article nnrss-group-data))
|
||||
(nntp-server-buffer (or buffer nntp-server-buffer))
|
||||
err) ;; post
|
||||
) ;; err post
|
||||
(when e
|
||||
(with-current-buffer nntp-server-buffer
|
||||
(erase-buffer)
|
||||
|
@ -302,8 +302,7 @@ for decoding when the cdr that the data specify is not available.")
|
|||
(when nnrss-content-function
|
||||
(funcall nnrss-content-function e group article))))
|
||||
(cond
|
||||
(err
|
||||
(nnheader-report 'nnrss err))
|
||||
;; (err (nnheader-report 'nnrss err))
|
||||
((not e)
|
||||
(nnheader-report 'nnrss "no such id: %d" article))
|
||||
(t
|
||||
|
|
Loading…
Add table
Reference in a new issue