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`.
(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
(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))
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)
(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)
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))
(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
(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)
;; 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
(nnbabyl-possibly-change-newsgroup group server)
(nnmail-check-syntax)
(let ((buf (current-buffer))
- result beg)
+ result) ;; beg
(and
(nnmail-activate 'nnbabyl)
(save-excursion
(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")
(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.
;; 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)
(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
(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)
(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