aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2021-01-30 18:44:00 -0500
committerStefan Monnier2021-01-30 18:44:00 -0500
commitdaa4e0120dc32a8c3eeafdf8914a0e29e5c149e9 (patch)
treede03b4f43e411393e00e44e2b4f65ca1e3c9e705
parent9be4f41b4254c029fc328b10ecef4e71cd2ca024 (diff)
downloademacs-daa4e0120dc32a8c3eeafdf8914a0e29e5c149e9.tar.gz
emacs-daa4e0120dc32a8c3eeafdf8914a0e29e5c149e9.zip
* lisp/gnus: Use lexical-binding in all the files
* lisp/gnus/gnus-group.el (features): Use `dlet`. (gnus-tmp-level, gnus-tmp-marked, gnus-tmp-group): Declare vars. (gnus-group-insert-group-line): Bind dynbound vars via `let` rather than as formal args. Bind `number` as dynbound. (gnus-visual, gnus-score-find-score-files-function) (gnus-home-score-file, gnus-apply-kill-hook) (gnus-summary-expunge-below): Declare vars. (gnus-group-restart, gnus-group-list-plus): Fix `interactive` spec since the arg is unused. * lisp/gnus/mail-source.el (mail-source-bind, mail-source-bind-common): Use `dlet` and suppress the warnings about the non-prefixed dynbound vars. (mail-source-set-1): Remove unused var `auth-info`. (mail-source-call-script): Remove unused var `background`. (mail-source-fetch-pop, mail-source-check-pop): Bind pop3 vars with `dlet`. * lisp/gnus/gnus-int.el (mail-source-plugged, gnus-inhibit-demon): Declare vars. (gnus-server-opened, gnus-status-message) (gnus-open-server, gnus-close-server, gnus-request-list) (gnus-finish-retrieve-group-infos, gnus-retrieve-group-data-early) (gnus-request-list-newsgroups, gnus-request-newgroups) (gnus-request-regenerate, gnus-request-compact, gnus-request-group) (gnus-retrieve-groups, gnus-request-post, gnus-request-expunge-group) (gnus-request-scan, gnus-request-update-info, gnus-request-marks) (gnus-request-accept-article, gnus-request-create-group) (gnus-asynchronous-p, gnus-remove-denial): Bind `gnus-command-method` via `let` rather than as formal args. * lisp/gnus/gnus-topic.el (gnus-topic-insert-topic-line): Pass documented vars to eval for `gnus-topic-line-format-spec`. * lisp/gnus/message.el (message-yank-original): Use `cl-progv` rather than `eval` to bind the vars from `message-cite-style`. * lisp/gnus/mml.el (mml-parse-1): Use `apply` instead of `eval`. (gnus-newsgroup-name, gnus-displaying-mime, gnus-newsgroup-name) (gnus-article-prepare-hook, gnus-newsgroup-charset) (gnus-original-article-buffer, gnus-message-buffer) (message-this-is-news, message-this-is-mail): Declare vars. * lisp/gnus/deuglify.el (gnus-outlook-rearrange-article): Remove unused var `cite-marks`. * lisp/gnus/gnus-art.el (ansi-color-context-region): Declare var. (gnus-mime-display-attachment-buttons-in-header): Move declaration before first use. (gnus-mime-display-alternative): Remove unused var `from`. * lisp/gnus/gnus-bookmark.el (gnus-bookmark-bmenu-list): Remove unused var `start` `end`. * lisp/gnus/gnus-cache.el (gnus-article-decode-hook) (nnml-generate-active-function): Declare var. * lisp/gnus/gnus-cite.el (gnus-message-citation-mode): Remove unused var `keywords`. * lisp/gnus/gnus-cloud.el (gnus-cloud-encode-data): Remove unused var `cipher`. (gnus-cloud-ensure-cloud-group): Remove unused var `method`. * lisp/gnus/gnus-delay.el (gnus-delay-article): Remove unused var `days`. * lisp/gnus/gnus-html.el (gnus-html-wash-images): Remove unused vars `tag`, `string`, and `images`. (gnus-html-wash-tags): Remove unused vars `string` and `images`. * lisp/gnus/gnus-msg.el (gnus-msg-mail): Remove unused var `group-name`. (gnus-group-mail, gnus-group-news, gnus-summary-mail-other-window) (gnus-summary-news-other-window): Remove unused vars `group` and `buffer`. (gnus-configure-posting-styles): Remove unused vars `style` and `attribute`. * lisp/gnus/gnus-picon.el (gnus-picon-find-face): Remove unused vars `database`, `directory`, and `instance`. (gnus-picon-transform-newsgroups): Remove unused var `point`. * lisp/gnus/gnus-range.el (gnus-range-difference): Remove unused var `safe`. * lisp/gnus/gnus-score.el (gnus-score-load-file): Remove unused var `score-fn`. * lisp/gnus/gnus-sum.el (message-options-set-recipient): Declare var. * lisp/gnus/gnus-undo.el (gnus-undo): Fix docstring lie. * lisp/gnus/gnus-util.el (print-string-length) (iswitchb-make-buflist-hook): Declare vars. (gnus-emacs-version): Remove unused var `codename`. (gnus-rename-file): Remove unused vars `old-name` and `new-name`. * lisp/gnus/gnus-uu.el (gnus-uu-yenc-article): Remove unused var `start-char`. (gnus-asynchronous): Declare var. * lisp/gnus/mm-partial.el (gnus-displaying-mime): Declare var. (mm-inline-partial): Remove unused var `buffer`. * lisp/gnus/mm-view.el (w3m-force-redisplay, w3m-safe-url-regexp) (gnus-displaying-mime, gnus-original-article-buffer) (gnus-article-prepare-hook): Declare vars. * lisp/gnus/mml-smime.el (mml-smime-epg-encrypt): Remove unused var `boundary`. (mml-smime-epg-verify): Remove unused vars `plain` and `signature-file`. * lisp/gnus/mml1991.el (pgg-text-mode): Declare var. * lisp/gnus/mml2015.el (pgg-text-mode): Declare var. (mml2015-pgg-decrypt): Remove unused var `result`. (mml2015-epg-key-image-to-string): Remove unused var `error`. (mml2015-epg-decrypt): Remove unused var `result`. (mml2015-epg-verify): Remove unused vars `plain` and `signature-file`. * lisp/gnus/nnbabyl.el (nnml-current-directory): Declare var. * lisp/gnus/nndiary.el (nndiary-files): Move declaration before first use. * lisp/gnus/nnfolder.el (nnfolder-request-accept-article): Remove unused var `buf`. * lisp/gnus/nnmail.el (nnmail-parse-active): Remove unused var `err`. * lisp/gnus/nnmairix.el (nnmairix-request-group): Remove unused var `args`. (nnmairix-request-create-group): Remove unused var `info`. (nnmairix-request-list): Remove unused var `folder`. (nnmairix-request-set-mark): Remove unused var `propto`. (nnmairix-request-set-mark): Remove unused vars `number` and `method`. (nnmairix-close-group): Remove unused var `method`. (nnmairix-create-search-group-from-message): Remove unused var `cq`. (nnmairix-create-server-and-default-group): Remove unused var `create`. (nnmairix-purge-old-groups): Remove unused var `folder`. (nnmairix-remove-tick-mark-original-article, nnmairix-get-valid-servers): Remove unused var `cur`. (nnmairix-replace-group-and-numbers): Remove unused var `header`. (nnmairix-goto-original-article): Remove unused var `rval`. (nnmairix-widget-create-query): Remove unused var `allwidgets`. * lisp/gnus/nnmbox.el (nnml-current-directory): Declare var. * lisp/gnus/nnmh.el (nnmh-toplev): Move declaration before first use. (nnmh-request-list-1): Remove unused var `rdir`. * lisp/gnus/nnml.el (nnml-generate-nov-file): Remove unused var `file`. * lisp/gnus/nnrss.el (nnrss-request-article): Remove unused var `post`. (nnrss-request-article): Remove unused var `fn`. (nnrss-check-group): Remove unused var `rdf-ns`. * lisp/gnus/nnweb.el (nnweb-request-article): Remove unused var `active`. (nnweb-google-parse-1): Remove unused var `Score`. * lisp/gnus/spam-stat.el (spam-stat-error-holder): Remove var. (spam-stat-buffer-words-with-scores): Remove unused var `word`. (spam-stat-score-buffer): Remove unused var `spam-stat-error-holder`. (spam-stat-split-fancy): Use `err` instead of `spam-stat-error-holder`. * lisp/gnus/spam-wash.el (spam-wash): Remove unused var `handle`. * lisp/gnus/spam.el (spam-copy-or-move-routine): Remove unused vars `article` and `mark`. (spam-register-routine): Remove unused var `article`. (spam-log-undo-registration): Remove unused var `found`. (spam-ifile-register-with-ifile): Remove unused var `parameters`. (spam-check-stat): Remove unused vars `category` and `return`. (spam-parse-list): Remove unused var `found`. (spam-filelist-register-routine): Remove unused var `from`.
-rw-r--r--lisp/gnus/canlock.el2
-rw-r--r--lisp/gnus/deuglify.el5
-rw-r--r--lisp/gnus/gmm-utils.el2
-rw-r--r--lisp/gnus/gnus-agent.el6
-rw-r--r--lisp/gnus/gnus-art.el32
-rw-r--r--lisp/gnus/gnus-bcklg.el2
-rw-r--r--lisp/gnus/gnus-bookmark.el4
-rw-r--r--lisp/gnus/gnus-cache.el6
-rw-r--r--lisp/gnus/gnus-cite.el21
-rw-r--r--lisp/gnus/gnus-cloud.el12
-rw-r--r--lisp/gnus/gnus-cus.el11
-rw-r--r--lisp/gnus/gnus-delay.el6
-rw-r--r--lisp/gnus/gnus-demon.el2
-rw-r--r--lisp/gnus/gnus-diary.el2
-rw-r--r--lisp/gnus/gnus-dired.el2
-rw-r--r--lisp/gnus/gnus-draft.el2
-rw-r--r--lisp/gnus/gnus-eform.el2
-rw-r--r--lisp/gnus/gnus-fun.el2
-rw-r--r--lisp/gnus/gnus-group.el48
-rw-r--r--lisp/gnus/gnus-html.el10
-rw-r--r--lisp/gnus/gnus-int.el398
-rw-r--r--lisp/gnus/gnus-kill.el14
-rw-r--r--lisp/gnus/gnus-logic.el2
-rw-r--r--lisp/gnus/gnus-mh.el6
-rw-r--r--lisp/gnus/gnus-ml.el2
-rw-r--r--lisp/gnus/gnus-mlspl.el2
-rw-r--r--lisp/gnus/gnus-msg.el30
-rw-r--r--lisp/gnus/gnus-notifications.el2
-rw-r--r--lisp/gnus/gnus-picon.el6
-rw-r--r--lisp/gnus/gnus-range.el4
-rw-r--r--lisp/gnus/gnus-rfc1843.el2
-rw-r--r--lisp/gnus/gnus-salt.el4
-rw-r--r--lisp/gnus/gnus-score.el8
-rw-r--r--lisp/gnus/gnus-sieve.el2
-rw-r--r--lisp/gnus/gnus-spec.el6
-rw-r--r--lisp/gnus/gnus-srvr.el6
-rw-r--r--lisp/gnus/gnus-sum.el26
-rw-r--r--lisp/gnus/gnus-topic.el11
-rw-r--r--lisp/gnus/gnus-undo.el8
-rw-r--r--lisp/gnus/gnus-util.el17
-rw-r--r--lisp/gnus/gnus-uu.el20
-rw-r--r--lisp/gnus/gnus-vm.el2
-rw-r--r--lisp/gnus/gnus-win.el8
-rw-r--r--lisp/gnus/gnus.el2
-rw-r--r--lisp/gnus/gssapi.el2
-rw-r--r--lisp/gnus/legacy-gnus-agent.el4
-rw-r--r--lisp/gnus/mail-source.el60
-rw-r--r--lisp/gnus/message.el17
-rw-r--r--lisp/gnus/mm-archive.el2
-rw-r--r--lisp/gnus/mm-bodies.el2
-rw-r--r--lisp/gnus/mm-encode.el2
-rw-r--r--lisp/gnus/mm-partial.el6
-rw-r--r--lisp/gnus/mm-url.el2
-rw-r--r--lisp/gnus/mm-util.el2
-rw-r--r--lisp/gnus/mm-view.el13
-rw-r--r--lisp/gnus/mml-sec.el6
-rw-r--r--lisp/gnus/mml-smime.el15
-rw-r--r--lisp/gnus/mml.el41
-rw-r--r--lisp/gnus/mml1991.el13
-rw-r--r--lisp/gnus/mml2015.el24
-rw-r--r--lisp/gnus/nnagent.el14
-rw-r--r--lisp/gnus/nnbabyl.el22
-rw-r--r--lisp/gnus/nndiary.el23
-rw-r--r--lisp/gnus/nndir.el2
-rw-r--r--lisp/gnus/nndoc.el22
-rw-r--r--lisp/gnus/nndraft.el16
-rw-r--r--lisp/gnus/nneething.el16
-rw-r--r--lisp/gnus/nnfolder.el19
-rw-r--r--lisp/gnus/nngateway.el2
-rw-r--r--lisp/gnus/nnheader.el2
-rw-r--r--lisp/gnus/nnimap.el6
-rw-r--r--lisp/gnus/nnmail.el14
-rw-r--r--lisp/gnus/nnmairix.el53
-rw-r--r--lisp/gnus/nnmbox.el22
-rw-r--r--lisp/gnus/nnmh.el25
-rw-r--r--lisp/gnus/nnml.el22
-rw-r--r--lisp/gnus/nnnil.el22
-rw-r--r--lisp/gnus/nnoo.el4
-rw-r--r--lisp/gnus/nnregistry.el13
-rw-r--r--lisp/gnus/nnrss.el22
-rw-r--r--lisp/gnus/nnspool.el28
-rw-r--r--lisp/gnus/nntp.el2
-rw-r--r--lisp/gnus/nnvirtual.el32
-rw-r--r--lisp/gnus/nnweb.el16
-rw-r--r--lisp/gnus/score-mode.el2
-rw-r--r--lisp/gnus/smiley.el2
-rw-r--r--lisp/gnus/spam-report.el2
-rw-r--r--lisp/gnus/spam-stat.el16
-rw-r--r--lisp/gnus/spam-wash.el4
-rw-r--r--lisp/gnus/spam.el24
90 files changed, 780 insertions, 667 deletions
diff --git a/lisp/gnus/canlock.el b/lisp/gnus/canlock.el
index 993050109d1..dbdbaa83d7e 100644
--- a/lisp/gnus/canlock.el
+++ b/lisp/gnus/canlock.el
@@ -1,4 +1,4 @@
1;;; canlock.el --- functions for Cancel-Lock feature 1;;; canlock.el --- functions for Cancel-Lock feature -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1998-1999, 2001-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1998-1999, 2001-2021 Free Software Foundation, Inc.
4 4
diff --git a/lisp/gnus/deuglify.el b/lisp/gnus/deuglify.el
index 3a40b55f56b..08beef7db9f 100644
--- a/lisp/gnus/deuglify.el
+++ b/lisp/gnus/deuglify.el
@@ -1,4 +1,4 @@
1;;; deuglify.el --- deuglify broken Outlook (Express) articles 1;;; deuglify.el --- deuglify broken Outlook (Express) articles -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 2001-2021 Free Software Foundation, Inc. 3;; Copyright (C) 2001-2021 Free Software Foundation, Inc.
4 4
@@ -336,7 +336,8 @@ NODISPLAY is non-nil, don't redisplay the article buffer."
336 "Put text from ATTR-START to the end of buffer at the top of the article buffer." 336 "Put text from ATTR-START to the end of buffer at the top of the article buffer."
337 ;; FIXME: 1. (*) text/plain ( ) text/html 337 ;; FIXME: 1. (*) text/plain ( ) text/html
338 (let ((inhibit-read-only t) 338 (let ((inhibit-read-only t)
339 (cite-marks gnus-outlook-deuglify-cite-marks)) 339 ;; (cite-marks gnus-outlook-deuglify-cite-marks)
340 )
340 (gnus-with-article-buffer 341 (gnus-with-article-buffer
341 (article-goto-body) 342 (article-goto-body)
342 ;; article does not start with attribution 343 ;; article does not start with attribution
diff --git a/lisp/gnus/gmm-utils.el b/lisp/gnus/gmm-utils.el
index 3542587319d..bcf8dd014bc 100644
--- a/lisp/gnus/gmm-utils.el
+++ b/lisp/gnus/gmm-utils.el
@@ -1,4 +1,4 @@
1;;; gmm-utils.el --- Utility functions for Gnus, Message and MML 1;;; gmm-utils.el --- Utility functions for Gnus, Message and MML -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 2006-2021 Free Software Foundation, Inc. 3;; Copyright (C) 2006-2021 Free Software Foundation, Inc.
4 4
diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el
index 9af19bd02ca..86c471197d5 100644
--- a/lisp/gnus/gnus-agent.el
+++ b/lisp/gnus/gnus-agent.el
@@ -1,4 +1,4 @@
1;;; gnus-agent.el --- unplugged support for Gnus 1;;; gnus-agent.el --- unplugged support for Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1997-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1997-2021 Free Software Foundation, Inc.
4 4
@@ -820,7 +820,7 @@ be a select method."
820 (condition-case err 820 (condition-case err
821 (while t 821 (while t
822 (let ((bgn (point))) 822 (let ((bgn (point)))
823 (eval (read (current-buffer))) 823 (eval (read (current-buffer)) t)
824 (delete-region bgn (point)))) 824 (delete-region bgn (point))))
825 (end-of-file 825 (end-of-file
826 (delete-file (gnus-agent-lib-file "flags"))) 826 (delete-file (gnus-agent-lib-file "flags")))
@@ -2666,7 +2666,7 @@ The following commands are available:
2666 (point) 2666 (point)
2667 (prog1 (1+ (point)) 2667 (prog1 (1+ (point))
2668 ;; Insert the text. 2668 ;; Insert the text.
2669 (eval gnus-category-line-format-spec)) 2669 (eval gnus-category-line-format-spec t))
2670 (list 'gnus-category gnus-tmp-name)))) 2670 (list 'gnus-category gnus-tmp-name))))
2671 2671
2672(defun gnus-enter-category-buffer () 2672(defun gnus-enter-category-buffer ()
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 4034d362af4..25ebc305947 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -1,4 +1,4 @@
1;;; gnus-art.el --- article mode commands for Gnus 1;;; gnus-art.el --- article mode commands for Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1996-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1996-2021 Free Software Foundation, Inc.
4 4
@@ -1432,7 +1432,7 @@ See Info node `(gnus)Customizing Articles' and Info node
1432 (message "\ 1432 (message "\
1433** gnus-treat-display-xface is an obsolete variable;\ 1433** gnus-treat-display-xface is an obsolete variable;\
1434 use gnus-treat-display-x-face instead") 1434 use gnus-treat-display-x-face instead")
1435 (eval (car (get 'gnus-treat-display-xface 'saved-value)))) 1435 (eval (car (get 'gnus-treat-display-xface 'saved-value)) t))
1436 (t 1436 (t
1437 value))))) 1437 value)))))
1438(put 'gnus-treat-display-x-face 'highlight t) 1438(put 'gnus-treat-display-x-face 'highlight t)
@@ -2162,6 +2162,8 @@ MAP is an alist where the elements are on the form (\"from\" \"to\")."
2162 (put-text-property 2162 (put-text-property
2163 (point) (1+ (point)) 'face 'underline))))))))) 2163 (point) (1+ (point)) 'face 'underline)))))))))
2164 2164
2165(defvar ansi-color-context-region)
2166
2165(defun article-treat-ansi-sequences () 2167(defun article-treat-ansi-sequences ()
2166 "Translate ANSI SGR control sequences into overlays or extents." 2168 "Translate ANSI SGR control sequences into overlays or extents."
2167 (interactive) 2169 (interactive)
@@ -2893,7 +2895,7 @@ message header will be added to the bodies of the \"text/html\" parts."
2893 (t "<br>\n")))) 2895 (t "<br>\n"))))
2894 (goto-char (point-min)) 2896 (goto-char (point-min))
2895 (while (re-search-forward "^[\t ]+" nil t) 2897 (while (re-search-forward "^[\t ]+" nil t)
2896 (dotimes (i (prog1 2898 (dotimes (_ (prog1
2897 (current-column) 2899 (current-column)
2898 (delete-region (match-beginning 0) 2900 (delete-region (match-beginning 0)
2899 (match-end 0)))) 2901 (match-end 0))))
@@ -3021,6 +3023,8 @@ message header will be added to the bodies of the \"text/html\" parts."
3021 (setq showed t))))) 3023 (setq showed t)))))
3022 showed)) 3024 showed))
3023 3025
3026(defvar gnus-mime-display-attachment-buttons-in-header)
3027
3024(defun gnus-article-browse-html-article (&optional arg) 3028(defun gnus-article-browse-html-article (&optional arg)
3025 "View \"text/html\" parts of the current article with a WWW browser. 3029 "View \"text/html\" parts of the current article with a WWW browser.
3026Inline images embedded in a message using the cid scheme, as they are 3030Inline images embedded in a message using the cid scheme, as they are
@@ -4712,8 +4716,6 @@ If ALL-HEADERS is non-nil, no headers are hidden."
4712 (gnus-run-hooks 'gnus-article-prepare-hook) 4716 (gnus-run-hooks 'gnus-article-prepare-hook)
4713 t)))))) 4717 t))))))
4714 4718
4715(defvar gnus-mime-display-attachment-buttons-in-header)
4716
4717;;;###autoload 4719;;;###autoload
4718(defun gnus-article-prepare-display () 4720(defun gnus-article-prepare-display ()
4719 "Make the current buffer look like a nice article." 4721 "Make the current buffer look like a nice article."
@@ -6149,7 +6151,7 @@ If nil, don't show those extra buttons."
6149 (let* ((preferred (or preferred (mm-preferred-alternative handles))) 6151 (let* ((preferred (or preferred (mm-preferred-alternative handles)))
6150 (ihandles handles) 6152 (ihandles handles)
6151 (point (point)) 6153 (point (point))
6152 handle (inhibit-read-only t) from begend not-pref) 6154 handle (inhibit-read-only t) begend not-pref) ;; from
6153 (save-window-excursion 6155 (save-window-excursion
6154 (save-restriction 6156 (save-restriction
6155 (when ibegend 6157 (when ibegend
@@ -6170,7 +6172,8 @@ If nil, don't show those extra buttons."
6170 (not (gnus-unbuttonized-mime-type-p 6172 (not (gnus-unbuttonized-mime-type-p
6171 "multipart/alternative"))) 6173 "multipart/alternative")))
6172 (add-text-properties 6174 (add-text-properties
6173 (setq from (point)) 6175 ;; (setq from
6176 (point);; )
6174 (progn 6177 (progn
6175 (insert (format "%d. " id)) 6178 (insert (format "%d. " id))
6176 (point)) 6179 (point))
@@ -6191,7 +6194,8 @@ If nil, don't show those extra buttons."
6191 ;; Do the handles 6194 ;; Do the handles
6192 (while (setq handle (pop handles)) 6195 (while (setq handle (pop handles))
6193 (add-text-properties 6196 (add-text-properties
6194 (setq from (point)) 6197 ;; (setq from
6198 (point) ;; )
6195 (progn 6199 (progn
6196 (insert (format "(%c) %-18s" 6200 (insert (format "(%c) %-18s"
6197 (if (equal handle preferred) ?* ? ) 6201 (if (equal handle preferred) ?* ? )
@@ -7986,13 +7990,13 @@ specified by `gnus-button-alist'."
7986 (article-goto-body) 7990 (article-goto-body)
7987 (setq beg (point)) 7991 (setq beg (point))
7988 (while (setq entry (pop alist)) 7992 (while (setq entry (pop alist))
7989 (setq regexp (eval (car entry))) 7993 (setq regexp (eval (car entry) t))
7990 (goto-char beg) 7994 (goto-char beg)
7991 (while (re-search-forward regexp nil t) 7995 (while (re-search-forward regexp nil t)
7992 (let ((start (match-beginning (nth 1 entry))) 7996 (let ((start (match-beginning (nth 1 entry)))
7993 (end (match-end (nth 1 entry))) 7997 (end (match-end (nth 1 entry)))
7994 (from (match-beginning 0))) 7998 (from (match-beginning 0)))
7995 (when (and (eval (nth 2 entry)) 7999 (when (and (eval (nth 2 entry) t)
7996 (not (gnus-button-in-region-p 8000 (not (gnus-button-in-region-p
7997 start end 'gnus-callback))) 8001 start end 'gnus-callback)))
7998 ;; That optional form returned non-nil, so we add the 8002 ;; That optional form returned non-nil, so we add the
@@ -8083,14 +8087,14 @@ url is put as the `gnus-button-url' overlay property on the button."
8083 (match-beginning 0)) 8087 (match-beginning 0))
8084 (point-max))) 8088 (point-max)))
8085 (goto-char beg) 8089 (goto-char beg)
8086 (while (re-search-forward (eval (nth 1 entry)) end t) 8090 (while (re-search-forward (eval (nth 1 entry) t) end t)
8087 ;; Each match within a header. 8091 ;; Each match within a header.
8088 (let* ((entry (cdr entry)) 8092 (let* ((entry (cdr entry))
8089 (start (match-beginning (nth 1 entry))) 8093 (start (match-beginning (nth 1 entry)))
8090 (end (match-end (nth 1 entry))) 8094 (end (match-end (nth 1 entry)))
8091 (form (nth 2 entry))) 8095 (form (nth 2 entry)))
8092 (goto-char (match-end 0)) 8096 (goto-char (match-end 0))
8093 (when (eval form) 8097 (when (eval form t)
8094 (gnus-article-add-button 8098 (gnus-article-add-button
8095 start end (nth 3 entry) 8099 start end (nth 3 entry)
8096 (buffer-substring (match-beginning (nth 4 entry)) 8100 (buffer-substring (match-beginning (nth 4 entry))
@@ -8099,7 +8103,7 @@ url is put as the `gnus-button-url' overlay property on the button."
8099 8103
8100;;; External functions: 8104;;; External functions:
8101 8105
8102(defun gnus-article-add-button (from to fun &optional data text) 8106(defun gnus-article-add-button (from to fun &optional data _text)
8103 "Create a button between FROM and TO with callback FUN and data DATA." 8107 "Create a button between FROM and TO with callback FUN and data DATA."
8104 (add-text-properties 8108 (add-text-properties
8105 from to 8109 from to
@@ -8312,7 +8316,7 @@ url is put as the `gnus-button-url' overlay property on the button."
8312 (setq indx (match-string 1 indx)) 8316 (setq indx (match-string 1 indx))
8313 (Info-index indx) 8317 (Info-index indx)
8314 (when comma 8318 (when comma
8315 (dotimes (i (with-temp-buffer 8319 (dotimes (_ (with-temp-buffer
8316 (insert comma) 8320 (insert comma)
8317 ;; Note: the XEmacs version of `how-many' takes 8321 ;; Note: the XEmacs version of `how-many' takes
8318 ;; no optional argument. 8322 ;; no optional argument.
diff --git a/lisp/gnus/gnus-bcklg.el b/lisp/gnus/gnus-bcklg.el
index d6f53e4b380..6c7ad0c4744 100644
--- a/lisp/gnus/gnus-bcklg.el
+++ b/lisp/gnus/gnus-bcklg.el
@@ -1,4 +1,4 @@
1;;; gnus-bcklg.el --- backlog functions for Gnus 1;;; gnus-bcklg.el --- backlog functions for Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1996-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1996-2021 Free Software Foundation, Inc.
4 4
diff --git a/lisp/gnus/gnus-bookmark.el b/lisp/gnus/gnus-bookmark.el
index c6eb2a1c1d4..bc41d5b149d 100644
--- a/lisp/gnus/gnus-bookmark.el
+++ b/lisp/gnus/gnus-bookmark.el
@@ -1,4 +1,4 @@
1;;; gnus-bookmark.el --- Bookmarks in Gnus 1;;; gnus-bookmark.el --- Bookmarks in Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 2006-2021 Free Software Foundation, Inc. 3;; Copyright (C) 2006-2021 Free Software Foundation, Inc.
4 4
@@ -350,7 +350,7 @@ deletion, or > if it is flagged for displaying."
350 (switch-to-buffer (gnus-get-buffer-create "*Gnus Bookmark List*")) 350 (switch-to-buffer (gnus-get-buffer-create "*Gnus Bookmark List*"))
351 (set-buffer (gnus-get-buffer-create "*Gnus Bookmark List*"))) 351 (set-buffer (gnus-get-buffer-create "*Gnus Bookmark List*")))
352 (let ((inhibit-read-only t) 352 (let ((inhibit-read-only t)
353 alist name start end) 353 alist name) ;; start end
354 (erase-buffer) 354 (erase-buffer)
355 (insert "% Gnus Bookmark\n- --------\n") 355 (insert "% Gnus Bookmark\n- --------\n")
356 (add-text-properties (point-min) (point) 356 (add-text-properties (point-min) (point)
diff --git a/lisp/gnus/gnus-cache.el b/lisp/gnus/gnus-cache.el
index b17a11276c2..5ed731947bc 100644
--- a/lisp/gnus/gnus-cache.el
+++ b/lisp/gnus/gnus-cache.el
@@ -1,4 +1,4 @@
1;;; gnus-cache.el --- cache interface for Gnus 1;;; gnus-cache.el --- cache interface for Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1995-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1995-2021 Free Software Foundation, Inc.
4 4
@@ -148,6 +148,8 @@ it's not cached."
148 (gnus-kill-buffer buffer) 148 (gnus-kill-buffer buffer)
149 (setq gnus-cache-buffer nil)))) 149 (setq gnus-cache-buffer nil))))
150 150
151(defvar gnus-article-decode-hook)
152
151(defun gnus-cache-possibly-enter-article 153(defun gnus-cache-possibly-enter-article
152 (group article ticked dormant unread &optional force) 154 (group article ticked dormant unread &optional force)
153 (when (and (or force (not (eq gnus-use-cache 'passive))) 155 (when (and (or force (not (eq gnus-use-cache 'passive)))
@@ -728,6 +730,8 @@ If LOW, update the lower bound instead."
728 (gnus-cache-write-active t) 730 (gnus-cache-write-active t)
729 (gnus-message 5 "Generating the cache active file...done")))) 731 (gnus-message 5 "Generating the cache active file...done"))))
730 732
733(defvar nnml-generate-active-function)
734
731;;;###autoload 735;;;###autoload
732(defun gnus-cache-generate-nov-databases (dir) 736(defun gnus-cache-generate-nov-databases (dir)
733 "Generate NOV files recursively starting in DIR." 737 "Generate NOV files recursively starting in DIR."
diff --git a/lisp/gnus/gnus-cite.el b/lisp/gnus/gnus-cite.el
index c63adb36d8b..96f1a7de5ec 100644
--- a/lisp/gnus/gnus-cite.el
+++ b/lisp/gnus/gnus-cite.el
@@ -1,4 +1,4 @@
1;;; gnus-cite.el --- parse citations in articles for Gnus 1;;; gnus-cite.el --- parse citations in articles for Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1995-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1995-2021 Free Software Foundation, Inc.
4 4
@@ -524,7 +524,7 @@ text (i.e., computer code and the like) will not be folded."
524 ;; like code? Check for ragged edges on the left. 524 ;; like code? Check for ragged edges on the left.
525 (< (length columns) 3)))) 525 (< (length columns) 3))))
526 526
527(defun gnus-article-hide-citation (&optional arg force) 527(defun gnus-article-hide-citation (&optional arg _force)
528 "Toggle hiding of all cited text except attribution lines. 528 "Toggle hiding of all cited text except attribution lines.
529See the documentation for `gnus-article-highlight-citation'. 529See the documentation for `gnus-article-highlight-citation'.
530If given a negative prefix, always show; if given a positive prefix, 530If given a negative prefix, always show; if given a positive prefix,
@@ -594,7 +594,7 @@ always hide."
594 (progn 594 (progn
595 (gnus-article-add-button 595 (gnus-article-add-button
596 (point) 596 (point)
597 (progn (eval gnus-cited-closed-text-button-line-format-spec) 597 (progn (eval gnus-cited-closed-text-button-line-format-spec t)
598 (point)) 598 (point))
599 'gnus-article-toggle-cited-text 599 'gnus-article-toggle-cited-text
600 (list (cons beg end) start)) 600 (list (cons beg end) start))
@@ -644,7 +644,8 @@ means show, nil means toggle."
644 (progn (eval 644 (progn (eval
645 (if hidden 645 (if hidden
646 gnus-cited-opened-text-button-line-format-spec 646 gnus-cited-opened-text-button-line-format-spec
647 gnus-cited-closed-text-button-line-format-spec)) 647 gnus-cited-closed-text-button-line-format-spec)
648 t)
648 (point)) 649 (point))
649 'gnus-article-toggle-cited-text 650 'gnus-article-toggle-cited-text
650 args) 651 args)
@@ -697,7 +698,7 @@ See also the documentation for `gnus-article-highlight-citation'."
697 698
698;;; Internal functions: 699;;; Internal functions:
699 700
700(defun gnus-cite-parse-maybe (&optional force no-overlay) 701(defun gnus-cite-parse-maybe (&optional _force no-overlay)
701 "Always parse the buffer." 702 "Always parse the buffer."
702 (gnus-cite-localize) 703 (gnus-cite-localize)
703 ;;Reset parser information. 704 ;;Reset parser information.
@@ -890,25 +891,25 @@ See also the documentation for `gnus-article-highlight-citation'."
890 (regexp-quote tag) ">")))) 891 (regexp-quote tag) ">"))))
891 ;; Find loose supercite citations after attributions. 892 ;; Find loose supercite citations after attributions.
892 (gnus-cite-match-attributions 'small t 893 (gnus-cite-match-attributions 'small t
893 (lambda (prefix tag) 894 (lambda (_prefix tag)
894 (when tag 895 (when tag
895 (concat "\\<" 896 (concat "\\<"
896 (regexp-quote tag) 897 (regexp-quote tag)
897 "\\>")))) 898 "\\>"))))
898 ;; Find loose supercite citations anywhere. 899 ;; Find loose supercite citations anywhere.
899 (gnus-cite-match-attributions 'small nil 900 (gnus-cite-match-attributions 'small nil
900 (lambda (prefix tag) 901 (lambda (_prefix tag)
901 (when tag 902 (when tag
902 (concat "\\<" 903 (concat "\\<"
903 (regexp-quote tag) 904 (regexp-quote tag)
904 "\\>")))) 905 "\\>"))))
905 ;; Find nested citations after attributions. 906 ;; Find nested citations after attributions.
906 (gnus-cite-match-attributions 'small-if-unique t 907 (gnus-cite-match-attributions 'small-if-unique t
907 (lambda (prefix tag) 908 (lambda (prefix _tag)
908 (concat "\\`" (regexp-quote prefix) ".+"))) 909 (concat "\\`" (regexp-quote prefix) ".+")))
909 ;; Find nested citations anywhere. 910 ;; Find nested citations anywhere.
910 (gnus-cite-match-attributions 'small nil 911 (gnus-cite-match-attributions 'small nil
911 (lambda (prefix tag) 912 (lambda (prefix _tag)
912 (concat "\\`" (regexp-quote prefix) ".+"))) 913 (concat "\\`" (regexp-quote prefix) ".+")))
913 ;; Remove loose prefixes with too few lines. 914 ;; Remove loose prefixes with too few lines.
914 (let ((alist gnus-cite-loose-prefix-alist) 915 (let ((alist gnus-cite-loose-prefix-alist)
@@ -1137,7 +1138,7 @@ When enabled, it automatically turns on `font-lock-mode'."
1137 (when (derived-mode-p 'message-mode) 1138 (when (derived-mode-p 'message-mode)
1138 ;; FIXME: Use font-lock-add-keywords! 1139 ;; FIXME: Use font-lock-add-keywords!
1139 (let ((defaults (car font-lock-defaults)) 1140 (let ((defaults (car font-lock-defaults))
1140 default keywords) 1141 default) ;; keywords
1141 (while defaults 1142 (while defaults
1142 (setq default (if (consp defaults) 1143 (setq default (if (consp defaults)
1143 (pop defaults) 1144 (pop defaults)
diff --git a/lisp/gnus/gnus-cloud.el b/lisp/gnus/gnus-cloud.el
index 95ebf7fbe77..3bc94f11e79 100644
--- a/lisp/gnus/gnus-cloud.el
+++ b/lisp/gnus/gnus-cloud.el
@@ -1,4 +1,4 @@
1;;; gnus-cloud.el --- storing and retrieving data via IMAP 1;;; gnus-cloud.el --- storing and retrieving data via IMAP -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 2014-2021 Free Software Foundation, Inc. 3;; Copyright (C) 2014-2021 Free Software Foundation, Inc.
4 4
@@ -128,7 +128,7 @@ easy interactive way to set this from the Server buffer."
128 128
129 ((eq gnus-cloud-storage-method 'epg) 129 ((eq gnus-cloud-storage-method 'epg)
130 (let ((context (epg-make-context 'OpenPGP)) 130 (let ((context (epg-make-context 'OpenPGP))
131 cipher) 131 ) ;; cipher
132 (setf (epg-context-armor context) t) 132 (setf (epg-context-armor context) t)
133 (setf (epg-context-textmode context) t) 133 (setf (epg-context-textmode context) t)
134 (let ((data (epg-encrypt-string context 134 (let ((data (epg-encrypt-string context
@@ -344,15 +344,15 @@ easy interactive way to set this from the Server buffer."
344 (group &optional previous method)) 344 (group &optional previous method))
345 345
346(defun gnus-cloud-ensure-cloud-group () 346(defun gnus-cloud-ensure-cloud-group ()
347 (let ((method (if (stringp gnus-cloud-method) 347 ;; (let ((method (if (stringp gnus-cloud-method)
348 (gnus-server-to-method gnus-cloud-method) 348 ;; (gnus-server-to-method gnus-cloud-method)
349 gnus-cloud-method))) 349 ;; gnus-cloud-method)))
350 (unless (or (gnus-active gnus-cloud-group-name) 350 (unless (or (gnus-active gnus-cloud-group-name)
351 (gnus-activate-group gnus-cloud-group-name nil nil 351 (gnus-activate-group gnus-cloud-group-name nil nil
352 gnus-cloud-method)) 352 gnus-cloud-method))
353 (and (gnus-request-create-group gnus-cloud-group-name gnus-cloud-method) 353 (and (gnus-request-create-group gnus-cloud-group-name gnus-cloud-method)
354 (gnus-activate-group gnus-cloud-group-name nil nil gnus-cloud-method) 354 (gnus-activate-group gnus-cloud-group-name nil nil gnus-cloud-method)
355 (gnus-subscribe-group gnus-cloud-group-name))))) 355 (gnus-subscribe-group gnus-cloud-group-name)))) ;; )
356 356
357(defun gnus-cloud-upload-all-data () 357(defun gnus-cloud-upload-all-data ()
358 "Upload all data (newsrc and files) to the Gnus Cloud." 358 "Upload all data (newsrc and files) to the Gnus Cloud."
diff --git a/lisp/gnus/gnus-cus.el b/lisp/gnus/gnus-cus.el
index a36ef0cbec8..d8f48b19f87 100644
--- a/lisp/gnus/gnus-cus.el
+++ b/lisp/gnus/gnus-cus.el
@@ -1,4 +1,4 @@
1;;; gnus-cus.el --- customization commands for Gnus 1;;; gnus-cus.el --- customization commands for Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1996, 1999-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1996, 1999-2021 Free Software Foundation, Inc.
4 4
@@ -483,7 +483,7 @@ form, but who cares?"
483 (buffer-enable-undo) 483 (buffer-enable-undo)
484 (goto-char (point-min)))) 484 (goto-char (point-min))))
485 485
486(defun gnus-group-customize-done (&rest ignore) 486(defun gnus-group-customize-done (&rest _ignore)
487 "Apply changes and bury the buffer." 487 "Apply changes and bury the buffer."
488 (interactive) 488 (interactive)
489 (let ((params (widget-value gnus-custom-params))) 489 (let ((params (widget-value gnus-custom-params)))
@@ -927,7 +927,7 @@ articles in the thread.
927 (use-local-map widget-keymap) 927 (use-local-map widget-keymap)
928 (widget-setup))) 928 (widget-setup)))
929 929
930(defun gnus-score-customize-done (&rest ignore) 930(defun gnus-score-customize-done (&rest _ignore)
931 "Reset the score alist with the present value." 931 "Reset the score alist with the present value."
932 (let ((alist gnus-custom-score-alist) 932 (let ((alist gnus-custom-score-alist)
933 (value (widget-value gnus-custom-scores))) 933 (value (widget-value gnus-custom-scores)))
@@ -1027,14 +1027,15 @@ articles in the thread.
1027 (widget-create 1027 (widget-create
1028 'push-button 1028 'push-button
1029 :notify 1029 :notify
1030 (lambda (&rest ignore) 1030 (lambda (&rest _ignore)
1031 (let* ((info (assq gnus-agent-cat-name gnus-category-alist)) 1031 (let* ((info (assq gnus-agent-cat-name gnus-category-alist))
1032 (widgets category-fields)) 1032 (widgets category-fields))
1033 (while widgets 1033 (while widgets
1034 (let* ((widget (pop widgets)) 1034 (let* ((widget (pop widgets))
1035 (value (condition-case nil (widget-value widget) (error)))) 1035 (value (condition-case nil (widget-value widget) (error))))
1036 (eval `(setf (,(widget-get widget :accessor) ',info) 1036 (eval `(setf (,(widget-get widget :accessor) ',info)
1037 ',value))))) 1037 ',value)
1038 t))))
1038 (gnus-category-write) 1039 (gnus-category-write)
1039 (gnus-kill-buffer (current-buffer)) 1040 (gnus-kill-buffer (current-buffer))
1040 (when (get-buffer gnus-category-buffer) 1041 (when (get-buffer gnus-category-buffer)
diff --git a/lisp/gnus/gnus-delay.el b/lisp/gnus/gnus-delay.el
index 0699db405c8..0cee01b9428 100644
--- a/lisp/gnus/gnus-delay.el
+++ b/lisp/gnus/gnus-delay.el
@@ -1,4 +1,4 @@
1;;; gnus-delay.el --- Delayed posting of articles 1;;; gnus-delay.el --- Delayed posting of articles -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 2001-2021 Free Software Foundation, Inc. 3;; Copyright (C) 2001-2021 Free Software Foundation, Inc.
4 4
@@ -82,7 +82,7 @@ generated when the article is sent."
82 gnus-delay-default-delay))) 82 gnus-delay-default-delay)))
83 ;; Allow spell checking etc. 83 ;; Allow spell checking etc.
84 (run-hooks 'message-send-hook) 84 (run-hooks 'message-send-hook)
85 (let (num unit days year month day hour minute deadline) 85 (let (num unit year month day hour minute deadline) ;; days
86 (cond ((string-match 86 (cond ((string-match
87 "\\([0-9][0-9][0-9]?[0-9]?\\)-\\([0-9]+\\)-\\([0-9]+\\)" 87 "\\([0-9][0-9][0-9]?[0-9]?\\)-\\([0-9]+\\)-\\([0-9]+\\)"
88 delay) 88 delay)
@@ -167,7 +167,7 @@ generated when the article is sent."
167 (message "Delay header missing for article %d" article))))))) 167 (message "Delay header missing for article %d" article)))))))
168 168
169;;;###autoload 169;;;###autoload
170(defun gnus-delay-initialize (&optional no-keymap no-check) 170(defun gnus-delay-initialize (&optional _no-keymap no-check)
171 "Initialize the gnus-delay package. 171 "Initialize the gnus-delay package.
172This sets up a key binding in `message-mode' to delay a message. 172This sets up a key binding in `message-mode' to delay a message.
173This tells Gnus to look for delayed messages after getting new news. 173This tells Gnus to look for delayed messages after getting new news.
diff --git a/lisp/gnus/gnus-demon.el b/lisp/gnus/gnus-demon.el
index f85d53f70eb..e99247c0ca9 100644
--- a/lisp/gnus/gnus-demon.el
+++ b/lisp/gnus/gnus-demon.el
@@ -1,4 +1,4 @@
1;;; gnus-demon.el --- daemonic Gnus behavior 1;;; gnus-demon.el --- daemonic Gnus behavior -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1995-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1995-2021 Free Software Foundation, Inc.
4 4
diff --git a/lisp/gnus/gnus-diary.el b/lisp/gnus/gnus-diary.el
index ff563d6bf30..52705640bf0 100644
--- a/lisp/gnus/gnus-diary.el
+++ b/lisp/gnus/gnus-diary.el
@@ -1,4 +1,4 @@
1;;; gnus-diary.el --- Wrapper around the NNDiary Gnus back end 1;;; gnus-diary.el --- Wrapper around the NNDiary Gnus back end -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1999-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1999-2021 Free Software Foundation, Inc.
4 4
diff --git a/lisp/gnus/gnus-dired.el b/lisp/gnus/gnus-dired.el
index e412dd01a28..ca2d57de7dc 100644
--- a/lisp/gnus/gnus-dired.el
+++ b/lisp/gnus/gnus-dired.el
@@ -1,4 +1,4 @@
1;;; gnus-dired.el --- utility functions where gnus and dired meet 1;;; gnus-dired.el --- utility functions where gnus and dired meet -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1996-1999, 2001-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1996-1999, 2001-2021 Free Software Foundation, Inc.
4 4
diff --git a/lisp/gnus/gnus-draft.el b/lisp/gnus/gnus-draft.el
index 0752267e216..a4bcae23bd6 100644
--- a/lisp/gnus/gnus-draft.el
+++ b/lisp/gnus/gnus-draft.el
@@ -1,4 +1,4 @@
1;;; gnus-draft.el --- draft message support for Gnus 1;;; gnus-draft.el --- draft message support for Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1997-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1997-2021 Free Software Foundation, Inc.
4 4
diff --git a/lisp/gnus/gnus-eform.el b/lisp/gnus/gnus-eform.el
index 6d0cea7febc..265edf4d612 100644
--- a/lisp/gnus/gnus-eform.el
+++ b/lisp/gnus/gnus-eform.el
@@ -1,4 +1,4 @@
1;;; gnus-eform.el --- a mode for editing forms for Gnus 1;;; gnus-eform.el --- a mode for editing forms for Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1996-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1996-2021 Free Software Foundation, Inc.
4 4
diff --git a/lisp/gnus/gnus-fun.el b/lisp/gnus/gnus-fun.el
index 8ce6990804d..f69c2ed12c2 100644
--- a/lisp/gnus/gnus-fun.el
+++ b/lisp/gnus/gnus-fun.el
@@ -1,4 +1,4 @@
1;;; gnus-fun.el --- various frivolous extension functions to Gnus 1;;; gnus-fun.el --- various frivolous extension functions to Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 2002-2021 Free Software Foundation, Inc. 3;; Copyright (C) 2002-2021 Free Software Foundation, Inc.
4 4
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index 0444b05450b..6d969609c4c 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -1,4 +1,4 @@
1;;; gnus-group.el --- group mode commands for Gnus 1;;; gnus-group.el --- group mode commands for Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1996-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1996-2021 Free Software Foundation, Inc.
4 4
@@ -39,8 +39,9 @@
39(eval-when-compile 39(eval-when-compile
40 (require 'mm-url) 40 (require 'mm-url)
41 (require 'subr-x) 41 (require 'subr-x)
42 (let ((features (cons 'gnus-group features))) 42 (with-suppressed-warnings ((lexical features))
43 (require 'gnus-sum))) 43 (dlet ((features (cons 'gnus-group features)))
44 (require 'gnus-sum))))
44 45
45(defvar gnus-cache-active-hashtb) 46(defvar gnus-cache-active-hashtb)
46 47
@@ -476,6 +477,9 @@ simple manner."
476 477
477(defvar gnus-group-edit-buffer nil) 478(defvar gnus-group-edit-buffer nil)
478 479
480(defvar gnus-tmp-group)
481(defvar gnus-tmp-level)
482(defvar gnus-tmp-marked)
479(defvar gnus-tmp-news-method) 483(defvar gnus-tmp-news-method)
480(defvar gnus-tmp-colon) 484(defvar gnus-tmp-colon)
481(defvar gnus-tmp-news-server) 485(defvar gnus-tmp-news-server)
@@ -1499,11 +1503,15 @@ if it is a string, only list groups matching REGEXP."
1499 (gnus-group-get-new-news 0)))) 1503 (gnus-group-get-new-news 0))))
1500 :type 'boolean) 1504 :type 'boolean)
1501 1505
1502(defun gnus-group-insert-group-line (gnus-tmp-group gnus-tmp-level 1506(defun gnus-group-insert-group-line (group level marked number gnus-tmp-method)
1503 gnus-tmp-marked number
1504 gnus-tmp-method)
1505 "Insert a group line in the group buffer." 1507 "Insert a group line in the group buffer."
1506 (let* ((gnus-tmp-method 1508 (with-suppressed-warnings ((lexical number))
1509 (defvar number)) ;FIXME: Used in `gnus-group-line-format-alist'.
1510 (let* ((number number)
1511 (gnus-tmp-level level)
1512 (gnus-tmp-marked marked)
1513 (gnus-tmp-group group)
1514 (gnus-tmp-method
1507 (gnus-server-get-method gnus-tmp-group gnus-tmp-method)) 1515 (gnus-server-get-method gnus-tmp-group gnus-tmp-method))
1508 (gnus-tmp-active (gnus-active gnus-tmp-group)) 1516 (gnus-tmp-active (gnus-active gnus-tmp-group))
1509 (gnus-tmp-number-total 1517 (gnus-tmp-number-total
@@ -1567,7 +1575,7 @@ if it is a string, only list groups matching REGEXP."
1567 (point) 1575 (point)
1568 (prog1 (1+ (point)) 1576 (prog1 (1+ (point))
1569 ;; Insert the text. 1577 ;; Insert the text.
1570 (eval gnus-group-line-format-spec)) 1578 (eval gnus-group-line-format-spec t))
1571 `(gnus-group ,gnus-tmp-group 1579 `(gnus-group ,gnus-tmp-group
1572 gnus-unread ,(if (numberp number) 1580 gnus-unread ,(if (numberp number)
1573 (string-to-number gnus-tmp-number-of-unread) 1581 (string-to-number gnus-tmp-number-of-unread)
@@ -1738,7 +1746,7 @@ already. If INFO-UNCHANGED is non-nil, dribble buffer is not updated."
1738 (buffer-modified-p gnus-dribble-buffer) 1746 (buffer-modified-p gnus-dribble-buffer)
1739 (with-current-buffer gnus-dribble-buffer 1747 (with-current-buffer gnus-dribble-buffer
1740 (not (zerop (buffer-size)))))) 1748 (not (zerop (buffer-size))))))
1741 (mode-string (eval gformat))) 1749 (mode-string (eval gformat t)))
1742 ;; Say whether the dribble buffer has been modified. 1750 ;; Say whether the dribble buffer has been modified.
1743 (setq mode-line-modified 1751 (setq mode-line-modified
1744 (if modified "**" "--")) 1752 (if modified "**" "--"))
@@ -1934,7 +1942,7 @@ Return nil if the group isn't displayed."
1934 (gnus-group-mark-group 1 nil t)) 1942 (gnus-group-mark-group 1 nil t))
1935 (setq gnus-group-marked (cons group (delete group gnus-group-marked))))) 1943 (setq gnus-group-marked (cons group (delete group gnus-group-marked)))))
1936 1944
1937(defun gnus-group-universal-argument (arg &optional groups func) 1945(defun gnus-group-universal-argument (arg &optional _groups func)
1938 "Perform any command on all groups according to the process/prefix convention." 1946 "Perform any command on all groups according to the process/prefix convention."
1939 (interactive "P") 1947 (interactive "P")
1940 (if (eq (setq func (or func 1948 (if (eq (setq func (or func
@@ -1945,7 +1953,7 @@ Return nil if the group isn't displayed."
1945 'undefined) 1953 'undefined)
1946 (gnus-error 1 "Undefined key") 1954 (gnus-error 1 "Undefined key")
1947 (gnus-group-iterate arg 1955 (gnus-group-iterate arg
1948 (lambda (group) 1956 (lambda (_group)
1949 (command-execute func)))) 1957 (command-execute func))))
1950 (gnus-group-position-point)) 1958 (gnus-group-position-point))
1951 1959
@@ -2054,6 +2062,12 @@ articles in the group."
2054 (forward-line -1)) 2062 (forward-line -1))
2055 (gnus-group-read-group all t)) 2063 (gnus-group-read-group all t))
2056 2064
2065(defvar gnus-visual)
2066(defvar gnus-score-find-score-files-function)
2067(defvar gnus-home-score-file)
2068(defvar gnus-apply-kill-hook)
2069(defvar gnus-summary-expunge-below)
2070
2057(defun gnus-group-quick-select-group (&optional all group) 2071(defun gnus-group-quick-select-group (&optional all group)
2058 "Select the GROUP \"quickly\". 2072 "Select the GROUP \"quickly\".
2059This means that no highlighting or scoring will be performed. If 2073This means that no highlighting or scoring will be performed. If
@@ -2511,7 +2525,7 @@ The arguments have the same meaning as those of
2511 (if (stringp id) (setq id (string-to-number id))) 2525 (if (stringp id) (setq id (string-to-number id)))
2512 (setq-local debbugs-gnu-bug-number id))))) 2526 (setq-local debbugs-gnu-bug-number id)))))
2513 2527
2514(defun gnus-group-jump-to-group (group &optional prompt) 2528(defun gnus-group-jump-to-group (group &optional _prompt)
2515 "Jump to newsgroup GROUP. 2529 "Jump to newsgroup GROUP.
2516 2530
2517If PROMPT (the prefix) is a number, use the prompt specified in 2531If PROMPT (the prefix) is a number, use the prompt specified in
@@ -2985,7 +2999,7 @@ and NEW-NAME will be prompted for."
2985 (setq method (copy-tree method)) 2999 (setq method (copy-tree method))
2986 (let (entry) 3000 (let (entry)
2987 (while (setq entry (memq (assq 'eval method) method)) 3001 (while (setq entry (memq (assq 'eval method) method))
2988 (setcar entry (eval (cadar entry))))) 3002 (setcar entry (eval (cadar entry) t))))
2989 (gnus-group-make-group group method)) 3003 (gnus-group-make-group group method))
2990 3004
2991(defun gnus-group-make-help-group (&optional noerror) 3005(defun gnus-group-make-help-group (&optional noerror)
@@ -4317,9 +4331,9 @@ If FORCE, force saving whether it is necessary or not."
4317 (interactive "P") 4331 (interactive "P")
4318 (gnus-save-newsrc-file force)) 4332 (gnus-save-newsrc-file force))
4319 4333
4320(defun gnus-group-restart (&optional arg) 4334(defun gnus-group-restart (&optional _arg)
4321 "Force Gnus to read the .newsrc file." 4335 "Force Gnus to read the .newsrc file."
4322 (interactive "P") 4336 (interactive)
4323 (when (gnus-yes-or-no-p 4337 (when (gnus-yes-or-no-p
4324 (format "Are you sure you want to restart Gnus? ")) 4338 (format "Are you sure you want to restart Gnus? "))
4325 (gnus-save-newsrc-file) 4339 (gnus-save-newsrc-file)
@@ -4738,9 +4752,9 @@ This command may read the active file."
4738 (forward-char 1)) 4752 (forward-char 1))
4739 groups)) 4753 groups))
4740 4754
4741(defun gnus-group-list-plus (&optional args) 4755(defun gnus-group-list-plus (&optional _args)
4742 "List groups plus the current selection." 4756 "List groups plus the current selection."
4743 (interactive "P") 4757 (interactive)
4744 (let ((gnus-group-listed-groups (gnus-group-listed-groups)) 4758 (let ((gnus-group-listed-groups (gnus-group-listed-groups))
4745 (gnus-group-list-mode gnus-group-list-mode) ;; Save it. 4759 (gnus-group-list-mode gnus-group-list-mode) ;; Save it.
4746 func) 4760 func)
diff --git a/lisp/gnus/gnus-html.el b/lisp/gnus/gnus-html.el
index 6a0cc0b47dc..962d7337ecd 100644
--- a/lisp/gnus/gnus-html.el
+++ b/lisp/gnus/gnus-html.el
@@ -1,4 +1,4 @@
1;;; gnus-html.el --- Render HTML in a buffer. 1;;; gnus-html.el --- Render HTML in a buffer. -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 2010-2021 Free Software Foundation, Inc. 3;; Copyright (C) 2010-2021 Free Software Foundation, Inc.
4 4
@@ -151,8 +151,8 @@ fit these criteria."
151 151
152(defun gnus-html-wash-images () 152(defun gnus-html-wash-images ()
153 "Run through current buffer and replace img tags by images." 153 "Run through current buffer and replace img tags by images."
154 (let (tag parameters string start end images 154 (let ( parameters start end ;; tag string images
155 inhibit-images blocked-images) 155 inhibit-images blocked-images)
156 (if (buffer-live-p gnus-summary-buffer) 156 (if (buffer-live-p gnus-summary-buffer)
157 (with-current-buffer gnus-summary-buffer 157 (with-current-buffer gnus-summary-buffer
158 (setq inhibit-images gnus-inhibit-images 158 (setq inhibit-images gnus-inhibit-images
@@ -229,7 +229,7 @@ fit these criteria."
229 (> width 4))) 229 (> width 4)))
230 (gnus-html-display-image url start end alt-text)))))))))) 230 (gnus-html-display-image url start end alt-text))))))))))
231 231
232(defun gnus-html-display-image (url start end &optional alt-text) 232(defun gnus-html-display-image (url _start _end &optional alt-text)
233 "Display image at URL on text from START to END. 233 "Display image at URL on text from START to END.
234Use ALT-TEXT for the image string." 234Use ALT-TEXT for the image string."
235 (or alt-text (setq alt-text "*")) 235 (or alt-text (setq alt-text "*"))
@@ -248,7 +248,7 @@ Use ALT-TEXT for the image string."
248 (gnus-html-put-image (gnus-html-get-image-data url) url alt-text)))) 248 (gnus-html-put-image (gnus-html-get-image-data url) url alt-text))))
249 249
250(defun gnus-html-wash-tags () 250(defun gnus-html-wash-tags ()
251 (let (tag parameters string start end images url) 251 (let (tag parameters start end url) ;; string images
252 (gnus-html-pre-wash) 252 (gnus-html-pre-wash)
253 (gnus-html-wash-images) 253 (gnus-html-wash-images)
254 254
diff --git a/lisp/gnus/gnus-int.el b/lisp/gnus/gnus-int.el
index 8bad44687b2..64928623e6a 100644
--- a/lisp/gnus/gnus-int.el
+++ b/lisp/gnus/gnus-int.el
@@ -1,4 +1,4 @@
1;;; gnus-int.el --- backend interface functions for Gnus 1;;; gnus-int.el --- backend interface functions for Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1996-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1996-2021 Free Software Foundation, Inc.
4 4
@@ -76,23 +76,25 @@ server denied."
76 "The current method, for the registry.") 76 "The current method, for the registry.")
77 77
78 78
79(defun gnus-server-opened (gnus-command-method) 79(defun gnus-server-opened (command-method)
80 "Check whether a connection to GNUS-COMMAND-METHOD has been opened." 80 "Check whether a connection to COMMAND-METHOD has been opened."
81 (unless (eq (gnus-server-status gnus-command-method) 81 (unless (eq (gnus-server-status command-method)
82 'denied) 82 'denied)
83 (when (stringp gnus-command-method) 83 (let ((gnus-command-method
84 (setq gnus-command-method (gnus-server-to-method gnus-command-method))) 84 (if (stringp command-method)
85 (funcall (inline (gnus-get-function gnus-command-method 'server-opened)) 85 (gnus-server-to-method command-method)
86 (nth 1 gnus-command-method)))) 86 command-method)))
87 87 (funcall (inline (gnus-get-function gnus-command-method 'server-opened))
88(defun gnus-status-message (gnus-command-method) 88 (nth 1 gnus-command-method)))))
89 "Return the status message from GNUS-COMMAND-METHOD. 89
90If GNUS-COMMAND-METHOD is a string, it is interpreted as a group 90(defun gnus-status-message (command-method)
91name. The method this group uses will be queried." 91 "Return the status message from COMMAND-METHOD.
92If COMMAND-METHOD is a string, it is interpreted as a group name.
93The method this group uses will be queried."
92 (let ((gnus-command-method 94 (let ((gnus-command-method
93 (if (stringp gnus-command-method) 95 (if (stringp command-method)
94 (gnus-find-method-for-group gnus-command-method) 96 (gnus-find-method-for-group command-method)
95 gnus-command-method))) 97 command-method)))
96 (funcall (gnus-get-function gnus-command-method 'status-message) 98 (funcall (gnus-get-function gnus-command-method 'status-message)
97 (nth 1 gnus-command-method)))) 99 (nth 1 gnus-command-method))))
98 100
@@ -265,13 +267,14 @@ If it is down, start it up (again)."
265 type form)) 267 type form))
266 (setq gnus-backend-trace-elapsed (float-time))))) 268 (setq gnus-backend-trace-elapsed (float-time)))))
267 269
268(defun gnus-open-server (gnus-command-method) 270(defun gnus-open-server (command-method)
269 "Open a connection to GNUS-COMMAND-METHOD." 271 "Open a connection to COMMAND-METHOD."
270 (when (stringp gnus-command-method)
271 (setq gnus-command-method (gnus-server-to-method gnus-command-method)))
272 (gnus-backend-trace :opening gnus-command-method) 272 (gnus-backend-trace :opening gnus-command-method)
273 (let ((elem (assoc gnus-command-method gnus-opened-servers)) 273 (let* ((gnus-command-method (if (stringp command-method)
274 (server (gnus-method-to-server-name gnus-command-method))) 274 (gnus-server-to-method command-method)
275 command-method))
276 (elem (assoc gnus-command-method gnus-opened-servers))
277 (server (gnus-method-to-server-name gnus-command-method)))
275 ;; If this method was previously denied, we just return nil. 278 ;; If this method was previously denied, we just return nil.
276 (if (eq (nth 1 elem) 'denied) 279 (if (eq (nth 1 elem) 'denied)
277 (progn 280 (progn
@@ -347,23 +350,27 @@ If it is down, start it up (again)."
347 (gnus-backend-trace :opened gnus-command-method) 350 (gnus-backend-trace :opened gnus-command-method)
348 result))))) 351 result)))))
349 352
350(defun gnus-close-server (gnus-command-method) 353(defun gnus-close-server (command-method)
351 "Close the connection to GNUS-COMMAND-METHOD." 354 "Close the connection to COMMAND-METHOD."
352 (when (stringp gnus-command-method) 355 (let ((gnus-command-method
353 (setq gnus-command-method (gnus-server-to-method gnus-command-method))) 356 (if (stringp command-method)
354 (prog1 357 (gnus-server-to-method command-method)
355 (funcall (gnus-get-function gnus-command-method 'close-server) 358 command-method)))
356 (nth 1 gnus-command-method) 359 (prog1
357 (nthcdr 2 gnus-command-method)) 360 (funcall (gnus-get-function gnus-command-method 'close-server)
358 (when-let ((elem (assoc gnus-command-method gnus-opened-servers))) 361 (nth 1 gnus-command-method)
359 (setf (nth 1 elem) 'closed)))) 362 (nthcdr 2 gnus-command-method))
360 363 (when-let ((elem (assoc gnus-command-method gnus-opened-servers)))
361(defun gnus-request-list (gnus-command-method) 364 (setf (nth 1 elem) 'closed)))))
362 "Request the active file from GNUS-COMMAND-METHOD." 365
363 (when (stringp gnus-command-method) 366(defun gnus-request-list (command-method)
364 (setq gnus-command-method (gnus-server-to-method gnus-command-method))) 367 "Request the active file from COMMAND-METHOD."
365 (funcall (gnus-get-function gnus-command-method 'request-list) 368 (let ((gnus-command-method
366 (nth 1 gnus-command-method))) 369 (if (stringp command-method)
370 (gnus-server-to-method command-method)
371 command-method)))
372 (funcall (gnus-get-function gnus-command-method 'request-list)
373 (nth 1 gnus-command-method))))
367 374
368(defun gnus-server-get-active (server &optional ignored) 375(defun gnus-server-get-active (server &optional ignored)
369 "Return the active list for SERVER. 376 "Return the active list for SERVER.
@@ -407,47 +414,57 @@ Groups matching the IGNORED regexp are excluded."
407 (forward-line))))) 414 (forward-line)))))
408 groups)) 415 groups))
409 416
410(defun gnus-finish-retrieve-group-infos (gnus-command-method infos data) 417(defun gnus-finish-retrieve-group-infos (command-method infos data)
411 "Read and update infos from GNUS-COMMAND-METHOD." 418 "Read and update infos from COMMAND-METHOD."
412 (when (stringp gnus-command-method) 419 (let ((gnus-command-method
413 (setq gnus-command-method (gnus-server-to-method gnus-command-method))) 420 (if (stringp command-method)
421 (gnus-server-to-method command-method)
422 command-method)))
414 (gnus-backend-trace :finishing gnus-command-method) 423 (gnus-backend-trace :finishing gnus-command-method)
415 (prog1 424 (prog1
416 (funcall (gnus-get-function gnus-command-method 425 (funcall (gnus-get-function gnus-command-method
417 'finish-retrieve-group-infos) 426 'finish-retrieve-group-infos)
418 (nth 1 gnus-command-method) 427 (nth 1 gnus-command-method)
419 infos data) 428 infos data)
420 (gnus-backend-trace :finished gnus-command-method))) 429 (gnus-backend-trace :finished gnus-command-method))))
421 430
422(defun gnus-retrieve-group-data-early (gnus-command-method infos) 431(defun gnus-retrieve-group-data-early (command-method infos)
423 "Start early async retrieval of data from GNUS-COMMAND-METHOD." 432 "Start early async retrieval of data from COMMAND-METHOD."
424 (when (stringp gnus-command-method) 433 (let ((gnus-command-method
425 (setq gnus-command-method (gnus-server-to-method gnus-command-method))) 434 (if (stringp command-method)
426 (funcall (gnus-get-function gnus-command-method 'retrieve-group-data-early) 435 (gnus-server-to-method command-method)
427 (nth 1 gnus-command-method) 436 command-method)))
428 infos)) 437 (funcall (gnus-get-function gnus-command-method 'retrieve-group-data-early)
429 438 (nth 1 gnus-command-method)
430(defun gnus-request-list-newsgroups (gnus-command-method) 439 infos)))
431 "Request the newsgroups file from GNUS-COMMAND-METHOD." 440
432 (when (stringp gnus-command-method) 441(defun gnus-request-list-newsgroups (command-method)
433 (setq gnus-command-method (gnus-server-to-method gnus-command-method))) 442 "Request the newsgroups file from COMMAND-METHOD."
434 (funcall (gnus-get-function gnus-command-method 'request-list-newsgroups) 443 (let ((gnus-command-method
435 (nth 1 gnus-command-method))) 444 (if (stringp command-method)
436 445 (gnus-server-to-method command-method)
437(defun gnus-request-newgroups (date gnus-command-method) 446 command-method)))
438 "Request all new groups since DATE from GNUS-COMMAND-METHOD." 447 (funcall (gnus-get-function gnus-command-method 'request-list-newsgroups)
439 (when (stringp gnus-command-method) 448 (nth 1 gnus-command-method))))
440 (setq gnus-command-method (gnus-server-to-method gnus-command-method))) 449
441 (let ((func (gnus-get-function gnus-command-method 'request-newgroups t))) 450(defun gnus-request-newgroups (date command-method)
442 (when func 451 "Request all new groups since DATE from COMMAND-METHOD."
443 (funcall func date (nth 1 gnus-command-method))))) 452 (let ((gnus-command-method
444 453 (if (stringp command-method)
445(defun gnus-request-regenerate (gnus-command-method) 454 (gnus-server-to-method command-method)
446 "Request a data generation from GNUS-COMMAND-METHOD." 455 command-method)))
447 (when (stringp gnus-command-method) 456 (let ((func (gnus-get-function gnus-command-method 'request-newgroups t)))
448 (setq gnus-command-method (gnus-server-to-method gnus-command-method))) 457 (when func
449 (funcall (gnus-get-function gnus-command-method 'request-regenerate) 458 (funcall func date (nth 1 gnus-command-method))))))
450 (nth 1 gnus-command-method))) 459
460(defun gnus-request-regenerate (command-method)
461 "Request a data generation from COMMAND-METHOD."
462 (let ((gnus-command-method
463 (if (stringp command-method)
464 (gnus-server-to-method command-method)
465 command-method)))
466 (funcall (gnus-get-function gnus-command-method 'request-regenerate)
467 (nth 1 gnus-command-method))))
451 468
452(defun gnus-request-compact-group (group) 469(defun gnus-request-compact-group (group)
453 (let* ((method (gnus-find-method-for-group group)) 470 (let* ((method (gnus-find-method-for-group group))
@@ -459,17 +476,19 @@ Groups matching the IGNORED regexp are excluded."
459 (nth 1 gnus-command-method) t))) 476 (nth 1 gnus-command-method) t)))
460 result)) 477 result))
461 478
462(defun gnus-request-compact (gnus-command-method) 479(defun gnus-request-compact (command-method)
463 "Request groups compaction from GNUS-COMMAND-METHOD." 480 "Request groups compaction from COMMAND-METHOD."
464 (when (stringp gnus-command-method) 481 (let ((gnus-command-method
465 (setq gnus-command-method (gnus-server-to-method gnus-command-method))) 482 (if (stringp command-method)
466 (funcall (gnus-get-function gnus-command-method 'request-compact) 483 (gnus-server-to-method command-method)
467 (nth 1 gnus-command-method))) 484 command-method)))
485 (funcall (gnus-get-function gnus-command-method 'request-compact)
486 (nth 1 gnus-command-method))))
468 487
469(defun gnus-request-group (group &optional dont-check gnus-command-method info) 488(defun gnus-request-group (group &optional dont-check command-method info)
470 "Request GROUP. If DONT-CHECK, no information is required." 489 "Request GROUP. If DONT-CHECK, no information is required."
471 (let ((gnus-command-method 490 (let ((gnus-command-method
472 (or gnus-command-method (inline (gnus-find-method-for-group group))))) 491 (or command-method (inline (gnus-find-method-for-group group)))))
473 (when (stringp gnus-command-method) 492 (when (stringp gnus-command-method)
474 (setq gnus-command-method 493 (setq gnus-command-method
475 (inline (gnus-server-to-method gnus-command-method)))) 494 (inline (gnus-server-to-method gnus-command-method))))
@@ -522,12 +541,14 @@ If FETCH-OLD, retrieve all headers (or some subset thereof) in the group."
522 articles (gnus-group-real-name group) 541 articles (gnus-group-real-name group)
523 (nth 1 gnus-command-method)))) 542 (nth 1 gnus-command-method))))
524 543
525(defun gnus-retrieve-groups (groups gnus-command-method) 544(defun gnus-retrieve-groups (groups command-method)
526 "Request active information on GROUPS from GNUS-COMMAND-METHOD." 545 "Request active information on GROUPS from COMMAND-METHOD."
527 (when (stringp gnus-command-method) 546 (let ((gnus-command-method
528 (setq gnus-command-method (gnus-server-to-method gnus-command-method))) 547 (if (stringp command-method)
529 (funcall (gnus-get-function gnus-command-method 'retrieve-groups) 548 (gnus-server-to-method command-method)
530 groups (nth 1 gnus-command-method))) 549 command-method)))
550 (funcall (gnus-get-function gnus-command-method 'retrieve-groups)
551 groups (nth 1 gnus-command-method))))
531 552
532(defun gnus-request-type (group &optional article) 553(defun gnus-request-type (group &optional article)
533 "Return the type (`post' or `mail') of GROUP (and ARTICLE)." 554 "Return the type (`post' or `mail') of GROUP (and ARTICLE)."
@@ -715,26 +736,33 @@ from other groups -- for instance, search results and the like."
715 (delete-region (point-min) (1- (point)))))) 736 (delete-region (point-min) (1- (point))))))
716 res)) 737 res))
717 738
718(defun gnus-request-post (gnus-command-method) 739(defun gnus-request-post (command-method)
719 "Post the current buffer using GNUS-COMMAND-METHOD." 740 "Post the current buffer using COMMAND-METHOD."
720 (when (stringp gnus-command-method) 741 (let ((gnus-command-method
721 (setq gnus-command-method (gnus-server-to-method gnus-command-method))) 742 (if (stringp command-method)
722 (funcall (gnus-get-function gnus-command-method 'request-post) 743 (gnus-server-to-method command-method)
723 (nth 1 gnus-command-method))) 744 command-method)))
745 (funcall (gnus-get-function gnus-command-method 'request-post)
746 (nth 1 gnus-command-method))))
724 747
725(defun gnus-request-expunge-group (group gnus-command-method) 748(defun gnus-request-expunge-group (group command-method)
726 "Expunge GROUP, which is removing articles that have been marked as deleted." 749 "Expunge GROUP, which is removing articles that have been marked as deleted."
727 (when (stringp gnus-command-method)
728 (setq gnus-command-method (gnus-server-to-method gnus-command-method)))
729 (funcall (gnus-get-function gnus-command-method 'request-expunge-group)
730 (gnus-group-real-name group)
731 (nth 1 gnus-command-method)))
732
733(defun gnus-request-scan (group gnus-command-method)
734 "Request a SCAN being performed in GROUP from GNUS-COMMAND-METHOD.
735If GROUP is nil, all groups on GNUS-COMMAND-METHOD are scanned."
736 (let ((gnus-command-method 750 (let ((gnus-command-method
737 (if group (gnus-find-method-for-group group) gnus-command-method)) 751 (if (stringp command-method)
752 (gnus-server-to-method command-method)
753 command-method)))
754 (funcall (gnus-get-function gnus-command-method 'request-expunge-group)
755 (gnus-group-real-name group)
756 (nth 1 gnus-command-method))))
757
758(defvar mail-source-plugged)
759(defvar gnus-inhibit-demon)
760
761(defun gnus-request-scan (group command-method)
762 "Request a SCAN being performed in GROUP from COMMAND-METHOD.
763If GROUP is nil, all groups on COMMAND-METHOD are scanned."
764 (let ((gnus-command-method
765 (if group (gnus-find-method-for-group group) command-method))
738 (gnus-inhibit-demon t) 766 (gnus-inhibit-demon t)
739 (mail-source-plugged gnus-plugged)) 767 (mail-source-plugged gnus-plugged))
740 (when (or gnus-plugged 768 (when (or gnus-plugged
@@ -744,36 +772,40 @@ If GROUP is nil, all groups on GNUS-COMMAND-METHOD are scanned."
744 (and group (gnus-group-real-name group)) 772 (and group (gnus-group-real-name group))
745 (nth 1 gnus-command-method))))) 773 (nth 1 gnus-command-method)))))
746 774
747(defun gnus-request-update-info (info gnus-command-method) 775(defun gnus-request-update-info (info command-method)
748 (when (gnus-check-backend-function 776 (when (gnus-check-backend-function
749 'request-update-info (car gnus-command-method)) 777 'request-update-info (car command-method))
750 (when (stringp gnus-command-method) 778 (let ((gnus-command-method
751 (setq gnus-command-method (gnus-server-to-method gnus-command-method))) 779 (if (stringp command-method)
752 (funcall (gnus-get-function gnus-command-method 'request-update-info) 780 (gnus-server-to-method command-method)
753 (gnus-group-real-name (gnus-info-group info)) info 781 command-method)))
754 (nth 1 gnus-command-method)))) 782 (funcall (gnus-get-function gnus-command-method 'request-update-info)
755 783 (gnus-group-real-name (gnus-info-group info)) info
756(defsubst gnus-request-marks (info gnus-command-method) 784 (nth 1 gnus-command-method)))))
757 "Request that GNUS-COMMAND-METHOD update INFO." 785
758 (when (stringp gnus-command-method) 786(defsubst gnus-request-marks (info command-method)
759 (setq gnus-command-method (gnus-server-to-method gnus-command-method))) 787 "Request that COMMAND-METHOD update INFO."
760 (when (gnus-check-backend-function 788 (let ((gnus-command-method
761 'request-marks (car gnus-command-method)) 789 (if (stringp command-method)
762 (let ((group (gnus-info-group info))) 790 (gnus-server-to-method command-method)
763 (and (funcall (gnus-get-function gnus-command-method 'request-marks) 791 command-method)))
764 (gnus-group-real-name group) 792 (when (gnus-check-backend-function
765 info (nth 1 gnus-command-method)) 793 'request-marks (car gnus-command-method))
766 ;; If the minimum article number is greater than 1, then all 794 (let ((group (gnus-info-group info)))
767 ;; smaller article numbers are known not to exist; we'll 795 (and (funcall (gnus-get-function gnus-command-method 'request-marks)
768 ;; artificially add those to the 'read range. 796 (gnus-group-real-name group)
769 (let* ((active (gnus-active group)) 797 info (nth 1 gnus-command-method))
770 (min (car active))) 798 ;; If the minimum article number is greater than 1, then all
771 (when (> min 1) 799 ;; smaller article numbers are known not to exist; we'll
772 (let* ((range (if (= min 2) 1 (cons 1 (1- min)))) 800 ;; artificially add those to the 'read range.
773 (read (gnus-info-read info)) 801 (let* ((active (gnus-active group))
774 (new-read (gnus-range-add read (list range)))) 802 (min (car active)))
775 (setf (gnus-info-read info) new-read))) 803 (when (> min 1)
776 info))))) 804 (let* ((range (if (= min 2) 1 (cons 1 (1- min))))
805 (read (gnus-info-read info))
806 (new-read (gnus-range-add read (list range))))
807 (setf (gnus-info-read info) new-read)))
808 info))))))
777 809
778(defun gnus-request-expire-articles (articles group &optional force) 810(defun gnus-request-expire-articles (articles group &optional force)
779 (let* ((gnus-command-method (gnus-find-method-for-group group)) 811 (let* ((gnus-command-method (gnus-find-method-for-group group))
@@ -794,7 +826,7 @@ If GROUP is nil, all groups on GNUS-COMMAND-METHOD are scanned."
794 (gnus-agent-expire expired-articles group 'force)))) 826 (gnus-agent-expire expired-articles group 'force))))
795 not-deleted)) 827 not-deleted))
796 828
797(defun gnus-request-move-article (article group server accept-function 829(defun gnus-request-move-article (article group _server accept-function
798 &optional last move-is-internal) 830 &optional last move-is-internal)
799 (let* ((gnus-command-method (gnus-find-method-for-group group)) 831 (let* ((gnus-command-method (gnus-find-method-for-group group))
800 (result (funcall (gnus-get-function gnus-command-method 832 (result (funcall (gnus-get-function gnus-command-method
@@ -807,38 +839,40 @@ If GROUP is nil, all groups on GNUS-COMMAND-METHOD are scanned."
807 (gnus-agent-unfetch-articles group (list article))) 839 (gnus-agent-unfetch-articles group (list article)))
808 result)) 840 result))
809 841
810(defun gnus-request-accept-article (group &optional gnus-command-method last 842(defun gnus-request-accept-article (group &optional command-method last
811 no-encode) 843 no-encode)
812 (when (stringp gnus-command-method) 844 (let ((gnus-command-method
813 (setq gnus-command-method (gnus-server-to-method gnus-command-method))) 845 (if (stringp command-method)
814 (when (and (not gnus-command-method) 846 (gnus-server-to-method command-method)
815 (stringp group)) 847 command-method)))
816 (setq gnus-command-method (or (gnus-find-method-for-group group) 848 (when (and (not gnus-command-method)
817 (gnus-group-name-to-method group)))) 849 (stringp group))
818 (goto-char (point-max)) 850 (setq gnus-command-method (or (gnus-find-method-for-group group)
819 ;; Make sure there's a newline at the end of the article. 851 (gnus-group-name-to-method group))))
820 (unless (bolp) 852 (goto-char (point-max))
821 (insert "\n")) 853 ;; Make sure there's a newline at the end of the article.
822 (unless no-encode 854 (unless (bolp)
823 (let ((message-options message-options)) 855 (insert "\n"))
824 (message-options-set-recipient) 856 (unless no-encode
825 (save-restriction 857 (let ((message-options message-options))
826 (message-narrow-to-head) 858 (message-options-set-recipient)
827 (mail-encode-encoded-word-buffer)) 859 (save-restriction
828 (message-encode-message-body))) 860 (message-narrow-to-head)
829 (let ((gnus-command-method (or gnus-command-method 861 (mail-encode-encoded-word-buffer))
830 (gnus-find-method-for-group group))) 862 (message-encode-message-body)))
831 (result 863 (let ((gnus-command-method (or gnus-command-method
832 (funcall 864 (gnus-find-method-for-group group)))
833 (gnus-get-function gnus-command-method 'request-accept-article) 865 (result
834 (if (stringp group) (gnus-group-real-name group) group) 866 (funcall
835 (cadr gnus-command-method) 867 (gnus-get-function gnus-command-method 'request-accept-article)
836 last))) 868 (if (stringp group) (gnus-group-real-name group) group)
837 (when (and gnus-agent 869 (cadr gnus-command-method)
838 (gnus-agent-method-p gnus-command-method) 870 last)))
839 (cdr result)) 871 (when (and gnus-agent
840 (gnus-agent-regenerate-group group (list (cdr result)))) 872 (gnus-agent-method-p gnus-command-method)
841 result)) 873 (cdr result))
874 (gnus-agent-regenerate-group group (list (cdr result))))
875 result)))
842 876
843(defun gnus-request-replace-article (article group buffer &optional no-encode) 877(defun gnus-request-replace-article (article group buffer &optional no-encode)
844 (unless no-encode 878 (unless no-encode
@@ -862,13 +896,14 @@ If GROUP is nil, all groups on GNUS-COMMAND-METHOD are scanned."
862 article (gnus-group-real-name group) 896 article (gnus-group-real-name group)
863 (nth 1 gnus-command-method)))) 897 (nth 1 gnus-command-method))))
864 898
865(defun gnus-request-create-group (group &optional gnus-command-method args) 899(defun gnus-request-create-group (group &optional command-method args)
866 (when (stringp gnus-command-method) 900 (let* ((gnus-command-method
867 (setq gnus-command-method (gnus-server-to-method gnus-command-method))) 901 (or (if (stringp command-method)
868 (let ((gnus-command-method 902 (gnus-server-to-method command-method)
869 (or gnus-command-method (gnus-find-method-for-group group)))) 903 command-method)
904 (gnus-find-method-for-group group))))
870 (funcall (gnus-get-function gnus-command-method 'request-create-group) 905 (funcall (gnus-get-function gnus-command-method 'request-create-group)
871 (gnus-group-real-name group) (nth 1 gnus-command-method) args))) 906 (gnus-group-real-name group) (nth 1 gnus-command-method) args)))
872 907
873(defun gnus-request-delete-group (group &optional force) 908(defun gnus-request-delete-group (group &optional force)
874 (let* ((gnus-command-method (gnus-find-method-for-group group)) 909 (let* ((gnus-command-method (gnus-find-method-for-group group))
@@ -902,15 +937,18 @@ If GROUP is nil, all groups on GNUS-COMMAND-METHOD are scanned."
902 "-request-close")))) 937 "-request-close"))))
903 (funcall func))))) 938 (funcall func)))))
904 939
905(defun gnus-asynchronous-p (gnus-command-method) 940(defun gnus-asynchronous-p (command-method)
906 (let ((func (gnus-get-function gnus-command-method 'asynchronous-p t))) 941 (let ((func (gnus-get-function command-method 'asynchronous-p t)))
907 (when (fboundp func) 942 (when (fboundp func)
908 (funcall func)))) 943 (let ((gnus-command-method command-method))
909 944 (funcall func)))))
910(defun gnus-remove-denial (gnus-command-method) 945
911 (when (stringp gnus-command-method) 946(defun gnus-remove-denial (command-method)
912 (setq gnus-command-method (gnus-server-to-method gnus-command-method))) 947 (let* ((gnus-command-method
913 (let* ((elem (assoc gnus-command-method gnus-opened-servers)) 948 (if (stringp command-method)
949 (gnus-server-to-method command-method)
950 command-method))
951 (elem (assoc gnus-command-method gnus-opened-servers))
914 (status (cadr elem))) 952 (status (cadr elem)))
915 ;; If this hasn't been opened before, we add it to the list. 953 ;; If this hasn't been opened before, we add it to the list.
916 (when (eq status 'denied) 954 (when (eq status 'denied)
diff --git a/lisp/gnus/gnus-kill.el b/lisp/gnus/gnus-kill.el
index 20ea9831052..00a4f11c6c0 100644
--- a/lisp/gnus/gnus-kill.el
+++ b/lisp/gnus/gnus-kill.el
@@ -1,4 +1,4 @@
1;;; gnus-kill.el --- kill commands for Gnus 1;;; gnus-kill.el --- kill commands for Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1995-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1995-2021 Free Software Foundation, Inc.
4 4
@@ -275,7 +275,7 @@ If NEWSGROUP is nil, the global kill file is selected."
275 (save-excursion 275 (save-excursion
276 (save-window-excursion 276 (save-window-excursion
277 (pop-to-buffer gnus-summary-buffer) 277 (pop-to-buffer gnus-summary-buffer)
278 (eval (car (read-from-string string))))))) 278 (eval (car (read-from-string string)) t)))))
279 279
280(defun gnus-kill-file-apply-last-sexp () 280(defun gnus-kill-file-apply-last-sexp ()
281 "Apply sexp before point in current buffer to current newsgroup." 281 "Apply sexp before point in current buffer to current newsgroup."
@@ -289,7 +289,7 @@ If NEWSGROUP is nil, the global kill file is selected."
289 (save-excursion 289 (save-excursion
290 (save-window-excursion 290 (save-window-excursion
291 (pop-to-buffer gnus-summary-buffer) 291 (pop-to-buffer gnus-summary-buffer)
292 (eval (car (read-from-string string)))))) 292 (eval (car (read-from-string string)) t))))
293 (ding) (gnus-message 2 "No newsgroup is selected."))) 293 (ding) (gnus-message 2 "No newsgroup is selected.")))
294 294
295(defun gnus-kill-file-exit () 295(defun gnus-kill-file-exit ()
@@ -403,9 +403,9 @@ Returns the number of articles marked as read."
403 (eq (car form) 'gnus-lower)) 403 (eq (car form) 'gnus-lower))
404 (progn 404 (progn
405 (delete-region beg (point)) 405 (delete-region beg (point))
406 (insert (or (eval form) ""))) 406 (insert (or (eval form t) "")))
407 (with-current-buffer gnus-summary-buffer 407 (with-current-buffer gnus-summary-buffer
408 (ignore-errors (eval form))))) 408 (ignore-errors (eval form t)))))
409 (and (buffer-modified-p) 409 (and (buffer-modified-p)
410 gnus-kill-save-kill-file 410 gnus-kill-save-kill-file
411 (save-buffer)) 411 (save-buffer))
@@ -560,7 +560,7 @@ COMMAND must be a Lisp expression or a string representing a key sequence."
560 ((functionp form) 560 ((functionp form)
561 (funcall form)) 561 (funcall form))
562 (t 562 (t
563 (eval form))))) 563 (eval form t)))))
564 ;; Search article body. 564 ;; Search article body.
565 (let ((gnus-current-article nil) ;Save article pointer. 565 (let ((gnus-current-article nil) ;Save article pointer.
566 (gnus-last-article nil) 566 (gnus-last-article nil)
@@ -578,7 +578,7 @@ COMMAND must be a Lisp expression or a string representing a key sequence."
578 ((functionp form) 578 ((functionp form)
579 (funcall form)) 579 (funcall form))
580 (t 580 (t
581 (eval form))))))) 581 (eval form t)))))))
582 did-kill))) 582 did-kill)))
583 583
584(defun gnus-execute (field regexp form &optional backward unread) 584(defun gnus-execute (field regexp form &optional backward unread)
diff --git a/lisp/gnus/gnus-logic.el b/lisp/gnus/gnus-logic.el
index 105222d6797..cdfdc9b7319 100644
--- a/lisp/gnus/gnus-logic.el
+++ b/lisp/gnus/gnus-logic.el
@@ -1,4 +1,4 @@
1;;; gnus-logic.el --- advanced scoring code for Gnus 1;;; gnus-logic.el --- advanced scoring code for Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1996-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1996-2021 Free Software Foundation, Inc.
4 4
diff --git a/lisp/gnus/gnus-mh.el b/lisp/gnus/gnus-mh.el
index b26b736d055..fc8d9be8d6d 100644
--- a/lisp/gnus/gnus-mh.el
+++ b/lisp/gnus/gnus-mh.el
@@ -1,4 +1,4 @@
1;;; gnus-mh.el --- mh-e interface for Gnus 1;;; gnus-mh.el --- mh-e interface for Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1994-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1994-2021 Free Software Foundation, Inc.
4 4
@@ -95,7 +95,7 @@ Optional argument FOLDER specifies folder name."
95 (kill-buffer errbuf)))) 95 (kill-buffer errbuf))))
96 (setq gnus-newsgroup-last-folder folder))) 96 (setq gnus-newsgroup-last-folder folder)))
97 97
98(defun gnus-Folder-save-name (newsgroup headers &optional last-folder) 98(defun gnus-Folder-save-name (newsgroup _headers &optional last-folder)
99 "Generate folder name from NEWSGROUP, HEADERS, and optional LAST-FOLDER. 99 "Generate folder name from NEWSGROUP, HEADERS, and optional LAST-FOLDER.
100If variable `gnus-use-long-file-name' is nil, it is +News.group. 100If variable `gnus-use-long-file-name' is nil, it is +News.group.
101Otherwise, it is like +news/group." 101Otherwise, it is like +news/group."
@@ -105,7 +105,7 @@ Otherwise, it is like +news/group."
105 (gnus-capitalize-newsgroup newsgroup) 105 (gnus-capitalize-newsgroup newsgroup)
106 (gnus-newsgroup-directory-form newsgroup))))) 106 (gnus-newsgroup-directory-form newsgroup)))))
107 107
108(defun gnus-folder-save-name (newsgroup headers &optional last-folder) 108(defun gnus-folder-save-name (newsgroup _headers &optional last-folder)
109 "Generate folder name from NEWSGROUP, HEADERS, and optional LAST-FOLDER. 109 "Generate folder name from NEWSGROUP, HEADERS, and optional LAST-FOLDER.
110If variable `gnus-use-long-file-name' is nil, it is +news.group. 110If variable `gnus-use-long-file-name' is nil, it is +news.group.
111Otherwise, it is like +news/group." 111Otherwise, it is like +news/group."
diff --git a/lisp/gnus/gnus-ml.el b/lisp/gnus/gnus-ml.el
index a47c15525a3..3b2b5a07c1d 100644
--- a/lisp/gnus/gnus-ml.el
+++ b/lisp/gnus/gnus-ml.el
@@ -1,4 +1,4 @@
1;;; gnus-ml.el --- Mailing list minor mode for Gnus 1;;; gnus-ml.el --- Mailing list minor mode for Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 2000-2021 Free Software Foundation, Inc. 3;; Copyright (C) 2000-2021 Free Software Foundation, Inc.
4 4
diff --git a/lisp/gnus/gnus-mlspl.el b/lisp/gnus/gnus-mlspl.el
index 77816d22eb0..d42f0971259 100644
--- a/lisp/gnus/gnus-mlspl.el
+++ b/lisp/gnus/gnus-mlspl.el
@@ -1,4 +1,4 @@
1;;; gnus-mlspl.el --- a group params-based mail splitting mechanism 1;;; gnus-mlspl.el --- a group params-based mail splitting mechanism -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1998-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1998-2021 Free Software Foundation, Inc.
4 4
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el
index 49be7047855..1bd62516b14 100644
--- a/lisp/gnus/gnus-msg.el
+++ b/lisp/gnus/gnus-msg.el
@@ -1,4 +1,4 @@
1;;; gnus-msg.el --- mail and post interface for Gnus 1;;; gnus-msg.el --- mail and post interface for Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1995-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1995-2021 Free Software Foundation, Inc.
4 4
@@ -517,7 +517,7 @@ instead."
517 switch-action yank-action send-actions return-action)) 517 switch-action yank-action send-actions return-action))
518 (let ((buf (current-buffer)) 518 (let ((buf (current-buffer))
519 ;; Don't use posting styles corresponding to any existing group. 519 ;; Don't use posting styles corresponding to any existing group.
520 (group-name gnus-newsgroup-name) 520 ;; (group-name gnus-newsgroup-name)
521 mail-buf) 521 mail-buf)
522 (let ((gnus-newsgroup-name "")) 522 (let ((gnus-newsgroup-name ""))
523 (gnus-setup-message 523 (gnus-setup-message
@@ -610,10 +610,10 @@ If ARG is 1, prompt for a group name to find the posting style."
610 (interactive "P") 610 (interactive "P")
611 ;; We can't `let' gnus-newsgroup-name here, since that leads 611 ;; We can't `let' gnus-newsgroup-name here, since that leads
612 ;; to local variables leaking. 612 ;; to local variables leaking.
613 (let* ((group gnus-newsgroup-name) 613 (let* (;;(group gnus-newsgroup-name)
614 ;; make sure last viewed article doesn't affect posting styles: 614 ;; make sure last viewed article doesn't affect posting styles:
615 (gnus-article-copy) 615 (gnus-article-copy)
616 (buffer (current-buffer)) 616 ;; (buffer (current-buffer))
617 (gnus-newsgroup-name 617 (gnus-newsgroup-name
618 (if arg 618 (if arg
619 (if (= 1 (prefix-numeric-value arg)) 619 (if (= 1 (prefix-numeric-value arg))
@@ -635,10 +635,10 @@ network. The corresponding back end must have a `request-post' method."
635 (interactive "P") 635 (interactive "P")
636 ;; We can't `let' gnus-newsgroup-name here, since that leads 636 ;; We can't `let' gnus-newsgroup-name here, since that leads
637 ;; to local variables leaking. 637 ;; to local variables leaking.
638 (let* ((group gnus-newsgroup-name) 638 (let* (;;(group gnus-newsgroup-name)
639 ;; make sure last viewed article doesn't affect posting styles: 639 ;; make sure last viewed article doesn't affect posting styles:
640 (gnus-article-copy) 640 (gnus-article-copy)
641 (buffer (current-buffer)) 641 ;; (buffer (current-buffer))
642 (gnus-newsgroup-name 642 (gnus-newsgroup-name
643 (if arg 643 (if arg
644 (if (= 1 (prefix-numeric-value arg)) 644 (if (= 1 (prefix-numeric-value arg))
@@ -678,10 +678,10 @@ posting style."
678 (interactive "P") 678 (interactive "P")
679 ;; We can't `let' gnus-newsgroup-name here, since that leads 679 ;; We can't `let' gnus-newsgroup-name here, since that leads
680 ;; to local variables leaking. 680 ;; to local variables leaking.
681 (let* ((group gnus-newsgroup-name) 681 (let* (;;(group gnus-newsgroup-name)
682 ;; make sure last viewed article doesn't affect posting styles: 682 ;; make sure last viewed article doesn't affect posting styles:
683 (gnus-article-copy) 683 (gnus-article-copy)
684 (buffer (current-buffer)) 684 ;; (buffer (current-buffer))
685 (gnus-newsgroup-name 685 (gnus-newsgroup-name
686 (if arg 686 (if arg
687 (if (= 1 (prefix-numeric-value arg)) 687 (if (= 1 (prefix-numeric-value arg))
@@ -703,10 +703,10 @@ network. The corresponding back end must have a `request-post' method."
703 (interactive "P") 703 (interactive "P")
704 ;; We can't `let' gnus-newsgroup-name here, since that leads 704 ;; We can't `let' gnus-newsgroup-name here, since that leads
705 ;; to local variables leaking. 705 ;; to local variables leaking.
706 (let* ((group gnus-newsgroup-name) 706 (let* (;;(group gnus-newsgroup-name)
707 ;; make sure last viewed article doesn't affect posting styles: 707 ;; make sure last viewed article doesn't affect posting styles:
708 (gnus-article-copy) 708 (gnus-article-copy)
709 (buffer (current-buffer)) 709 ;; (buffer (current-buffer))
710 (gnus-newsgroup-name 710 (gnus-newsgroup-name
711 (if arg 711 (if arg
712 (if (= 1 (prefix-numeric-value arg)) 712 (if (= 1 (prefix-numeric-value arg))
@@ -930,7 +930,7 @@ header line with the old Message-ID."
930 (run-hooks 'gnus-article-decode-hook))))) 930 (run-hooks 'gnus-article-decode-hook)))))
931 gnus-article-copy))) 931 gnus-article-copy)))
932 932
933(defun gnus-post-news (post &optional group header article-buffer yank subject 933(defun gnus-post-news (post &optional group header article-buffer yank _subject
934 force-news) 934 force-news)
935 (when article-buffer 935 (when article-buffer
936 (gnus-copy-article-buffer)) 936 (gnus-copy-article-buffer))
@@ -1732,7 +1732,7 @@ this is a reply."
1732 ;; Function. 1732 ;; Function.
1733 (funcall (car var) group)) 1733 (funcall (car var) group))
1734 (t 1734 (t
1735 (eval (car var))))))) 1735 (eval (car var) t))))))
1736 (setq var (cdr var))) 1736 (setq var (cdr var)))
1737 result))) 1737 result)))
1738 name) 1738 name)
@@ -1789,7 +1789,7 @@ this is a reply."
1789 (with-current-buffer gnus-summary-buffer 1789 (with-current-buffer gnus-summary-buffer
1790 gnus-posting-styles) 1790 gnus-posting-styles)
1791 gnus-posting-styles)) 1791 gnus-posting-styles))
1792 style match attribute value v results matched-string 1792 match value v results matched-string ;; style attribute
1793 filep name address element) 1793 filep name address element)
1794 ;; If the group has a posting-style parameter, add it at the end with a 1794 ;; If the group has a posting-style parameter, add it at the end with a
1795 ;; regexp matching everything, to be sure it takes precedence over all 1795 ;; regexp matching everything, to be sure it takes precedence over all
@@ -1844,7 +1844,7 @@ this is a reply."
1844 (setq matched-string header))))))) 1844 (setq matched-string header)))))))
1845 (t 1845 (t
1846 ;; This is a form to be evalled. 1846 ;; This is a form to be evalled.
1847 (eval match))))) 1847 (eval match t)))))
1848 ;; We have a match, so we set the variables. 1848 ;; We have a match, so we set the variables.
1849 (dolist (attribute style) 1849 (dolist (attribute style)
1850 (setq element (pop attribute) 1850 (setq element (pop attribute)
@@ -1875,7 +1875,7 @@ this is a reply."
1875 ((boundp value) 1875 ((boundp value)
1876 (symbol-value value)))) 1876 (symbol-value value))))
1877 ((listp value) 1877 ((listp value)
1878 (eval value)))) 1878 (eval value t))))
1879 ;; Translate obsolescent value. 1879 ;; Translate obsolescent value.
1880 (cond 1880 (cond
1881 ((eq element 'signature-file) 1881 ((eq element 'signature-file)
diff --git a/lisp/gnus/gnus-notifications.el b/lisp/gnus/gnus-notifications.el
index adf23f36c01..a4d198b46e4 100644
--- a/lisp/gnus/gnus-notifications.el
+++ b/lisp/gnus/gnus-notifications.el
@@ -1,4 +1,4 @@
1;; gnus-notifications.el -- Send notification on new message in Gnus 1;; gnus-notifications.el -- Send notification on new message in Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 2012-2021 Free Software Foundation, Inc. 3;; Copyright (C) 2012-2021 Free Software Foundation, Inc.
4 4
diff --git a/lisp/gnus/gnus-picon.el b/lisp/gnus/gnus-picon.el
index a33316a5267..7927b88c3de 100644
--- a/lisp/gnus/gnus-picon.el
+++ b/lisp/gnus/gnus-picon.el
@@ -1,4 +1,4 @@
1;;; gnus-picon.el --- displaying pretty icons in Gnus 1;;; gnus-picon.el --- displaying pretty icons in Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1996-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1996-2021 Free Software Foundation, Inc.
4 4
@@ -112,7 +112,7 @@ List of pairs (KEY . GLYPH) where KEY is either a filename or an URL.")
112 (let* ((address (gnus-picon-split-address address)) 112 (let* ((address (gnus-picon-split-address address))
113 (user (pop address)) 113 (user (pop address))
114 (faddress address) 114 (faddress address)
115 database directory result instance base) 115 result base) ;; database directory instance
116 (catch 'found 116 (catch 'found
117 (dolist (database gnus-picon-databases) 117 (dolist (database gnus-picon-databases)
118 (dolist (directory directories) 118 (dolist (directory directories)
@@ -249,7 +249,7 @@ replacement is added."
249 (gnus-article-goto-header header) 249 (gnus-article-goto-header header)
250 (mail-header-narrow-to-field) 250 (mail-header-narrow-to-field)
251 (let ((groups (message-tokenize-header (mail-fetch-field header))) 251 (let ((groups (message-tokenize-header (mail-fetch-field header)))
252 spec file point) 252 spec file) ;; point
253 (dolist (group groups) 253 (dolist (group groups)
254 (unless (setq spec (cdr (assoc group gnus-picon-cache))) 254 (unless (setq spec (cdr (assoc group gnus-picon-cache)))
255 (setq spec (nreverse (split-string group "[.]"))) 255 (setq spec (nreverse (split-string group "[.]")))
diff --git a/lisp/gnus/gnus-range.el b/lisp/gnus/gnus-range.el
index 1e5d2a066f6..6cc60cb49b3 100644
--- a/lisp/gnus/gnus-range.el
+++ b/lisp/gnus/gnus-range.el
@@ -1,4 +1,4 @@
1;;; gnus-range.el --- range and sequence functions for Gnus 1;;; gnus-range.el --- range and sequence functions for Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1996-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1996-2021 Free Software Foundation, Inc.
4 4
@@ -87,7 +87,7 @@ Both ranges must be in ascending order."
87 (setq range2 (gnus-range-normalize range2)) 87 (setq range2 (gnus-range-normalize range2))
88 (let* ((new-range (cons nil (copy-sequence range1))) 88 (let* ((new-range (cons nil (copy-sequence range1)))
89 (r new-range) 89 (r new-range)
90 (safe t)) 90 ) ;; (safe t)
91 (while (cdr r) 91 (while (cdr r)
92 (let* ((r1 (cadr r)) 92 (let* ((r1 (cadr r))
93 (r2 (car range2)) 93 (r2 (car range2))
diff --git a/lisp/gnus/gnus-rfc1843.el b/lisp/gnus/gnus-rfc1843.el
index dca55af4605..5697c870888 100644
--- a/lisp/gnus/gnus-rfc1843.el
+++ b/lisp/gnus/gnus-rfc1843.el
@@ -1,4 +1,4 @@
1;;; gnus-rfc1843.el --- HZ (rfc1843) decoding interface functions for Gnus 1;;; gnus-rfc1843.el --- HZ (rfc1843) decoding interface functions for Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1998-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1998-2021 Free Software Foundation, Inc.
4 4
diff --git a/lisp/gnus/gnus-salt.el b/lisp/gnus/gnus-salt.el
index d07d36e5441..e222d24b694 100644
--- a/lisp/gnus/gnus-salt.el
+++ b/lisp/gnus/gnus-salt.el
@@ -1,4 +1,4 @@
1;;; gnus-salt.el --- alternate summary mode interfaces for Gnus 1;;; gnus-salt.el --- alternate summary mode interfaces for Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1996-1999, 2001-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1996-1999, 2001-2021 Free Software Foundation, Inc.
4 4
@@ -609,7 +609,7 @@ Two predefined functions are available:
609 beg end) 609 beg end)
610 (add-text-properties 610 (add-text-properties
611 (setq beg (point)) 611 (setq beg (point))
612 (setq end (progn (eval gnus-tree-line-format-spec) (point))) 612 (setq end (progn (eval gnus-tree-line-format-spec t) (point)))
613 (list 'gnus-number gnus-tmp-number)) 613 (list 'gnus-number gnus-tmp-number))
614 (when (or t (gnus-visual-p 'tree-highlight 'highlight)) 614 (when (or t (gnus-visual-p 'tree-highlight 'highlight))
615 (gnus-tree-highlight-node gnus-tmp-number beg end)))) 615 (gnus-tree-highlight-node gnus-tmp-number beg end))))
diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el
index 254f0e548ce..ade0897a16a 100644
--- a/lisp/gnus/gnus-score.el
+++ b/lisp/gnus/gnus-score.el
@@ -1,4 +1,4 @@
1;;; gnus-score.el --- scoring code for Gnus 1;;; gnus-score.el --- scoring code for Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1995-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1995-2021 Free Software Foundation, Inc.
4 4
@@ -1235,7 +1235,7 @@ If FORMAT, also format the current score file."
1235 (let ((mark (car (gnus-score-get 'mark alist))) 1235 (let ((mark (car (gnus-score-get 'mark alist)))
1236 (expunge (car (gnus-score-get 'expunge alist))) 1236 (expunge (car (gnus-score-get 'expunge alist)))
1237 (mark-and-expunge (car (gnus-score-get 'mark-and-expunge alist))) 1237 (mark-and-expunge (car (gnus-score-get 'mark-and-expunge alist)))
1238 (score-fn (car (gnus-score-get 'score-fn alist))) 1238 ;; (score-fn (car (gnus-score-get 'score-fn alist)))
1239 (files (gnus-score-get 'files alist)) 1239 (files (gnus-score-get 'files alist))
1240 (exclude-files (gnus-score-get 'exclude-files alist)) 1240 (exclude-files (gnus-score-get 'exclude-files alist))
1241 (orphan (car (gnus-score-get 'orphan alist))) 1241 (orphan (car (gnus-score-get 'orphan alist)))
@@ -1263,7 +1263,7 @@ If FORMAT, also format the current score file."
1263 (if adapt-file (cons adapt-file files) 1263 (if adapt-file (cons adapt-file files)
1264 files))))) 1264 files)))))
1265 (when (and eval (not global)) 1265 (when (and eval (not global))
1266 (eval eval)) 1266 (eval eval t))
1267 ;; We then expand any exclude-file directives. 1267 ;; We then expand any exclude-file directives.
1268 (setq gnus-scores-exclude-files 1268 (setq gnus-scores-exclude-files
1269 (nconc 1269 (nconc
@@ -2698,7 +2698,7 @@ the score file and its full name, including the directory.")
2698 2698
2699;;; Finding score files. 2699;;; Finding score files.
2700 2700
2701(defun gnus-score-score-files (group) 2701(defun gnus-score-score-files (_group)
2702 "Return a list of all possible score files." 2702 "Return a list of all possible score files."
2703 ;; Search and set any global score files. 2703 ;; Search and set any global score files.
2704 (when gnus-global-score-files 2704 (when gnus-global-score-files
diff --git a/lisp/gnus/gnus-sieve.el b/lisp/gnus/gnus-sieve.el
index 70b1345ca27..5dcd079fb48 100644
--- a/lisp/gnus/gnus-sieve.el
+++ b/lisp/gnus/gnus-sieve.el
@@ -1,4 +1,4 @@
1;;; gnus-sieve.el --- Utilities to manage sieve scripts for Gnus 1;;; gnus-sieve.el --- Utilities to manage sieve scripts for Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 2001-2021 Free Software Foundation, Inc. 3;; Copyright (C) 2001-2021 Free Software Foundation, Inc.
4 4
diff --git a/lisp/gnus/gnus-spec.el b/lisp/gnus/gnus-spec.el
index a50d9f3a5f4..cb60108ea9c 100644
--- a/lisp/gnus/gnus-spec.el
+++ b/lisp/gnus/gnus-spec.el
@@ -1,4 +1,4 @@
1;;; gnus-spec.el --- format spec functions for Gnus 1;;; gnus-spec.el --- format spec functions for Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1996-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1996-2021 Free Software Foundation, Inc.
4 4
@@ -628,8 +628,8 @@ or to characters when given a pad value."
628If PROPS, insert the result." 628If PROPS, insert the result."
629 (let ((form (gnus-parse-format format alist props))) 629 (let ((form (gnus-parse-format format alist props)))
630 (if props 630 (if props
631 (add-text-properties (point) (progn (eval form) (point)) props) 631 (add-text-properties (point) (progn (eval form t) (point)) props)
632 (eval form)))) 632 (eval form t))))
633 633
634(defun gnus-set-format (type &optional insertable) 634(defun gnus-set-format (type &optional insertable)
635 (set (intern (format "gnus-%s-line-format-spec" type)) 635 (set (intern (format "gnus-%s-line-format-spec" type))
diff --git a/lisp/gnus/gnus-srvr.el b/lisp/gnus/gnus-srvr.el
index deeb28885b8..54b5a7d5fa9 100644
--- a/lisp/gnus/gnus-srvr.el
+++ b/lisp/gnus/gnus-srvr.el
@@ -1,4 +1,4 @@
1;;; gnus-srvr.el --- virtual server support for Gnus 1;;; gnus-srvr.el --- virtual server support for Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1995-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1995-2021 Free Software Foundation, Inc.
4 4
@@ -297,7 +297,7 @@ The following commands are available:
297 (point) 297 (point)
298 (prog1 (1+ (point)) 298 (prog1 (1+ (point))
299 ;; Insert the text. 299 ;; Insert the text.
300 (eval gnus-server-line-format-spec)) 300 (eval gnus-server-line-format-spec t))
301 (list 'gnus-server (intern gnus-tmp-name) 301 (list 'gnus-server (intern gnus-tmp-name)
302 'gnus-named-server (intern (gnus-method-to-server method t)))))) 302 'gnus-named-server (intern (gnus-method-to-server method t))))))
303 303
@@ -626,7 +626,7 @@ The following commands are available:
626 (let ((info (gnus-server-to-method server))) 626 (let ((info (gnus-server-to-method server)))
627 (gnus-edit-form 627 (gnus-edit-form
628 info "Showing the server." 628 info "Showing the server."
629 (lambda (form) 629 (lambda (_form)
630 (gnus-server-position-point)) 630 (gnus-server-position-point))
631 'edit-server))) 631 'edit-server)))
632 632
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 05e49be093d..39110338c33 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -3186,7 +3186,7 @@ The following commands are available:
3186 ;; Copy the global value of the variable. 3186 ;; Copy the global value of the variable.
3187 (symbol-value (car local)) 3187 (symbol-value (car local))
3188 ;; Use the value from the list. 3188 ;; Use the value from the list.
3189 (eval (cdr local))))) 3189 (eval (cdr local) t))))
3190 (set (make-local-variable (car local)) global)) 3190 (set (make-local-variable (car local)) global))
3191 ;; Simple nil-valued local variable. 3191 ;; Simple nil-valued local variable.
3192 (set (make-local-variable local) nil)))) 3192 (set (make-local-variable local) nil))))
@@ -3850,7 +3850,7 @@ buffer that was in action when the last article was fetched."
3850 (condition-case () 3850 (condition-case ()
3851 (put-text-property 3851 (put-text-property
3852 (point) 3852 (point)
3853 (progn (eval gnus-summary-line-format-spec) (point)) 3853 (progn (eval gnus-summary-line-format-spec t) (point))
3854 'gnus-number gnus-tmp-number) 3854 'gnus-number gnus-tmp-number)
3855 (error (gnus-message 5 "Error updating the summary line"))) 3855 (error (gnus-message 5 "Error updating the summary line")))
3856 (when (gnus-visual-p 'summary-highlight 'highlight) 3856 (when (gnus-visual-p 'summary-highlight 'highlight)
@@ -3971,14 +3971,14 @@ Input should look like this: \"Sun, 14 Oct 2001 13:34:39 +0200\"."
3971 (my-format "%b %d '%y")) 3971 (my-format "%b %d '%y"))
3972 (let* ((difference (time-subtract now messy-date)) 3972 (let* ((difference (time-subtract now messy-date))
3973 (templist gnus-user-date-format-alist) 3973 (templist gnus-user-date-format-alist)
3974 (top (eval (caar templist)))) 3974 (top (eval (caar templist) t)))
3975 (while (if (numberp top) (time-less-p top difference) (not top)) 3975 (while (if (numberp top) (time-less-p top difference) (not top))
3976 (progn 3976 (progn
3977 (setq templist (cdr templist)) 3977 (setq templist (cdr templist))
3978 (setq top (eval (caar templist))))) 3978 (setq top (eval (caar templist) t))))
3979 (if (stringp (cdr (car templist))) 3979 (if (stringp (cdr (car templist)))
3980 (setq my-format (cdr (car templist))))) 3980 (setq my-format (cdr (car templist)))))
3981 (format-time-string (eval my-format) messy-date)) 3981 (format-time-string (eval my-format t) messy-date))
3982 (error " ? "))) 3982 (error " ? ")))
3983 3983
3984(defun gnus-summary-set-local-parameters (group) 3984(defun gnus-summary-set-local-parameters (group)
@@ -3997,8 +3997,8 @@ Input should look like this: \"Sun, 14 Oct 2001 13:34:39 +0200\"."
3997 ;; buffer-local, whereas just parameters like `gcc-self', 3997 ;; buffer-local, whereas just parameters like `gcc-self',
3998 ;; `timestamp', etc. should not be bound as variables. 3998 ;; `timestamp', etc. should not be bound as variables.
3999 (if (boundp (car elem)) 3999 (if (boundp (car elem))
4000 (set (make-local-variable (car elem)) (eval (nth 1 elem))) 4000 (set (make-local-variable (car elem)) (eval (nth 1 elem) t))
4001 (eval (nth 1 elem)))))))) 4001 (eval (nth 1 elem) t)))))))
4002 4002
4003(defun gnus-summary-read-group (group &optional show-all no-article 4003(defun gnus-summary-read-group (group &optional show-all no-article
4004 kill-buffer no-display backward 4004 kill-buffer no-display backward
@@ -5557,7 +5557,7 @@ or a straight list of headers."
5557 (setq gnus-tmp-thread thread) 5557 (setq gnus-tmp-thread thread)
5558 (put-text-property 5558 (put-text-property
5559 (point) 5559 (point)
5560 (progn (eval gnus-summary-line-format-spec) (point)) 5560 (progn (eval gnus-summary-line-format-spec t) (point))
5561 'gnus-number number) 5561 'gnus-number number)
5562 (when gnus-visual-p 5562 (when gnus-visual-p
5563 (forward-line -1) 5563 (forward-line -1)
@@ -6265,7 +6265,7 @@ If WHERE is `summary', the summary mode line format will be used."
6265 "")) 6265 ""))
6266 bufname-length max-len 6266 bufname-length max-len
6267 gnus-tmp-header) ;; passed as argument to any user-format-funcs 6267 gnus-tmp-header) ;; passed as argument to any user-format-funcs
6268 (setq mode-string (eval mformat)) 6268 (setq mode-string (eval mformat t))
6269 (setq bufname-length (if (string-match "%b" mode-string) 6269 (setq bufname-length (if (string-match "%b" mode-string)
6270 (- (length 6270 (- (length
6271 (buffer-name 6271 (buffer-name
@@ -7863,7 +7863,7 @@ If BACKWARD, the previous article is selected instead of the next."
7863 (switch-to-buffer gnus-group-buffer) 7863 (switch-to-buffer gnus-group-buffer)
7864 (when group 7864 (when group
7865 (gnus-group-jump-to-group group)) 7865 (gnus-group-jump-to-group group))
7866 (eval (cadr (assq key keystrokes))) 7866 (eval (cadr (assq key keystrokes)) t)
7867 (setq group (gnus-group-group-name)) 7867 (setq group (gnus-group-group-name))
7868 (switch-to-buffer obuf)) 7868 (switch-to-buffer obuf))
7869 (setq ended nil)) 7869 (setq ended nil))
@@ -10617,6 +10617,8 @@ confirmation before the articles are deleted."
10617 (gnus-set-mode-line 'summary) 10617 (gnus-set-mode-line 'summary)
10618 not-deleted)) 10618 not-deleted))
10619 10619
10620(defvar message-options-set-recipient)
10621
10620(defun gnus-summary-edit-article (&optional arg) 10622(defun gnus-summary-edit-article (&optional arg)
10621 "Edit the current article. 10623 "Edit the current article.
10622This will have permanent effect only in mail groups. 10624This will have permanent effect only in mail groups.
@@ -12366,7 +12368,7 @@ save those articles instead."
12366 ;; Form. 12368 ;; Form.
12367 (save-restriction 12369 (save-restriction
12368 (widen) 12370 (widen)
12369 (setq result (eval match))))) 12371 (setq result (eval match t)))))
12370 (setq split-name (cdr method)) 12372 (setq split-name (cdr method))
12371 (cond ((stringp result) 12373 (cond ((stringp result)
12372 (push (expand-file-name 12374 (push (expand-file-name
@@ -12956,7 +12958,7 @@ treated as multipart/mixed."
12956 (nomove "" nil nil ,keystroke))) 12958 (nomove "" nil nil ,keystroke)))
12957 (let ((func (gnus-summary-make-marking-command-1 12959 (let ((func (gnus-summary-make-marking-command-1
12958 mark (car lway) lway name))) 12960 mark (car lway) lway name)))
12959 (setq func (eval func)) 12961 (setq func (eval func t))
12960 (define-key map (nth 4 lway) func))))) 12962 (define-key map (nth 4 lway) func)))))
12961 12963
12962(defun gnus-summary-make-marking-command-1 (mark way lway name) 12964(defun gnus-summary-make-marking-command-1 (mark way lway name)
diff --git a/lisp/gnus/gnus-topic.el b/lisp/gnus/gnus-topic.el
index c4918485272..bbcccfee2f0 100644
--- a/lisp/gnus/gnus-topic.el
+++ b/lisp/gnus/gnus-topic.el
@@ -1,4 +1,4 @@
1;;; gnus-topic.el --- a folding minor mode for Gnus group buffers 1;;; gnus-topic.el --- a folding minor mode for Gnus group buffers -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1995-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1995-2021 Free Software Foundation, Inc.
4 4
@@ -640,7 +640,14 @@ articles in the topic and its subtopics."
640 (add-text-properties 640 (add-text-properties
641 (point) 641 (point)
642 (prog1 (1+ (point)) 642 (prog1 (1+ (point))
643 (eval gnus-topic-line-format-spec)) 643 (eval gnus-topic-line-format-spec
644 `((indentation . ,indentation)
645 (visible . ,visible)
646 (name . ,name)
647 (level . ,level)
648 (number-of-groups . ,number-of-groups)
649 (total-number-of-articles . ,total-number-of-articles)
650 (entries . ,entries))))
644 (list 'gnus-topic name 651 (list 'gnus-topic name
645 'gnus-topic-level level 652 'gnus-topic-level level
646 'gnus-topic-unread unread 653 'gnus-topic-unread unread
diff --git a/lisp/gnus/gnus-undo.el b/lisp/gnus/gnus-undo.el
index 5d2f85af36c..64ed2bbad6b 100644
--- a/lisp/gnus/gnus-undo.el
+++ b/lisp/gnus/gnus-undo.el
@@ -1,4 +1,4 @@
1;;; gnus-undo.el --- minor mode for undoing in Gnus 1;;; gnus-undo.el --- minor mode for undoing in Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1996-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1996-2021 Free Software Foundation, Inc.
4 4
@@ -153,10 +153,10 @@
153 ;; We are not at a boundary... 153 ;; We are not at a boundary...
154 (setq gnus-undo-boundary-inhibit t))) 154 (setq gnus-undo-boundary-inhibit t)))
155 155
156(defun gnus-undo (n) 156(defun gnus-undo (_n)
157 "Undo some previous changes in Gnus buffers. 157 "Undo some previous changes in Gnus buffers.
158Repeat this command to undo more changes. 158Repeat this command to undo more changes."
159A numeric argument serves as a repeat count." 159 ;; FIXME: A numeric argument should serve as a repeat count.
160 (interactive "p") 160 (interactive "p")
161 (unless gnus-undo-mode 161 (unless gnus-undo-mode
162 (error "Undoing is not enabled in this buffer")) 162 (error "Undoing is not enabled in this buffer"))
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el
index 408293f1a16..f8d43253865 100644
--- a/lisp/gnus/gnus-util.el
+++ b/lisp/gnus/gnus-util.el
@@ -1,4 +1,4 @@
1;;; gnus-util.el --- utility functions for Gnus 1;;; gnus-util.el --- utility functions for Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1996-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1996-2021 Free Software Foundation, Inc.
4 4
@@ -681,6 +681,8 @@ yield \"nnimap:yxa\"."
681 (define-key (symbol-value (intern (format "gnus-%s-mode-map" type))) 681 (define-key (symbol-value (intern (format "gnus-%s-mode-map" type)))
682 [menu-bar edit] 'undefined)) 682 [menu-bar edit] 'undefined))
683 683
684(defvar print-string-length)
685
684(defmacro gnus-bind-print-variables (&rest forms) 686(defmacro gnus-bind-print-variables (&rest forms)
685 "Bind print-* variables and evaluate FORMS. 687 "Bind print-* variables and evaluate FORMS.
686This macro is used with `prin1', `pp', etc. in order to ensure 688This macro is used with `prin1', `pp', etc. in order to ensure
@@ -1241,7 +1243,7 @@ sure of changing the value of `foo'."
1241 (setq gnus-info-buffer (current-buffer)) 1243 (setq gnus-info-buffer (current-buffer))
1242 (gnus-configure-windows 'info))) 1244 (gnus-configure-windows 'info)))
1243 1245
1244(defun gnus-not-ignore (&rest args) 1246(defun gnus-not-ignore (&rest _args)
1245 t) 1247 t)
1246 1248
1247(defvar gnus-directory-sep-char-regexp "/" 1249(defvar gnus-directory-sep-char-regexp "/"
@@ -1381,6 +1383,7 @@ SPEC is a predicate specifier that contains stuff like `or', `and',
1381(declare-function iswitchb-minibuffer-setup "iswitchb") 1383(declare-function iswitchb-minibuffer-setup "iswitchb")
1382(defvar iswitchb-temp-buflist) 1384(defvar iswitchb-temp-buflist)
1383(defvar iswitchb-mode) 1385(defvar iswitchb-mode)
1386(defvar iswitchb-make-buflist-hook)
1384 1387
1385(defun gnus-iswitchb-completing-read (prompt collection &optional require-match 1388(defun gnus-iswitchb-completing-read (prompt collection &optional require-match
1386 initial-input history def) 1389 initial-input history def)
@@ -1500,7 +1503,7 @@ Return nil otherwise."
1500 1503
1501(defvar tool-bar-mode) 1504(defvar tool-bar-mode)
1502 1505
1503(defun gnus-tool-bar-update (&rest ignore) 1506(defun gnus-tool-bar-update (&rest _ignore)
1504 "Update the tool bar." 1507 "Update the tool bar."
1505 (when (and (boundp 'tool-bar-mode) 1508 (when (and (boundp 'tool-bar-mode)
1506 tool-bar-mode) 1509 tool-bar-mode)
@@ -1526,7 +1529,7 @@ sequence, this is like `mapcar'. With several, it is like the Common Lisp
1526 (if seqs2_n 1529 (if seqs2_n
1527 (let* ((seqs (cons seq1 seqs2_n)) 1530 (let* ((seqs (cons seq1 seqs2_n))
1528 (cnt 0) 1531 (cnt 0)
1529 (heads (mapcar (lambda (seq) 1532 (heads (mapcar (lambda (_seq)
1530 (make-symbol (concat "head" 1533 (make-symbol (concat "head"
1531 (int-to-string 1534 (int-to-string
1532 (setq cnt (1+ cnt)))))) 1535 (setq cnt (1+ cnt))))))
@@ -1560,7 +1563,7 @@ sequence, this is like `mapcar'. With several, it is like the Common Lisp
1560 ((memq 'type lst) 1563 ((memq 'type lst)
1561 (symbol-name system-type)) 1564 (symbol-name system-type))
1562 (t nil))) 1565 (t nil)))
1563 codename) 1566 ) ;; codename
1564 (cond 1567 (cond
1565 ((not (memq 'emacs lst)) 1568 ((not (memq 'emacs lst))
1566 nil) 1569 nil)
@@ -1576,9 +1579,9 @@ sequence, this is like `mapcar'. With several, it is like the Common Lisp
1576empty directories from OLD-PATH." 1579empty directories from OLD-PATH."
1577 (when (file-exists-p old-path) 1580 (when (file-exists-p old-path)
1578 (let* ((old-dir (file-name-directory old-path)) 1581 (let* ((old-dir (file-name-directory old-path))
1579 (old-name (file-name-nondirectory old-path)) 1582 ;; (old-name (file-name-nondirectory old-path))
1580 (new-dir (file-name-directory new-path)) 1583 (new-dir (file-name-directory new-path))
1581 (new-name (file-name-nondirectory new-path)) 1584 ;; (new-name (file-name-nondirectory new-path))
1582 temp) 1585 temp)
1583 (gnus-make-directory new-dir) 1586 (gnus-make-directory new-dir)
1584 (rename-file old-path new-path t) 1587 (rename-file old-path new-path t)
diff --git a/lisp/gnus/gnus-uu.el b/lisp/gnus/gnus-uu.el
index e4aaf92c89c..32a87851549 100644
--- a/lisp/gnus/gnus-uu.el
+++ b/lisp/gnus/gnus-uu.el
@@ -1,4 +1,4 @@
1;;; gnus-uu.el --- extract (uu)encoded files in Gnus 1;;; gnus-uu.el --- extract (uu)encoded files in Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1985-1987, 1993-1998, 2000-2021 Free Software 3;; Copyright (C) 1985-1987, 1993-1998, 2000-2021 Free Software
4;; Foundation, Inc. 4;; Foundation, Inc.
@@ -977,7 +977,7 @@ When called interactively, prompt for REGEXP."
977(defvar gnus-uu-binhex-end-line 977(defvar gnus-uu-binhex-end-line
978 ":$") 978 ":$")
979 979
980(defun gnus-uu-binhex-article (buffer in-state) 980(defun gnus-uu-binhex-article (buffer _in-state)
981 (let (state start-char) 981 (let (state start-char)
982 (with-current-buffer buffer 982 (with-current-buffer buffer
983 (widen) 983 (widen)
@@ -1014,11 +1014,11 @@ When called interactively, prompt for REGEXP."
1014 1014
1015;; yEnc 1015;; yEnc
1016 1016
1017(defun gnus-uu-yenc-article (buffer in-state) 1017(defun gnus-uu-yenc-article (_buffer _in-state)
1018 (with-current-buffer gnus-original-article-buffer 1018 (with-current-buffer gnus-original-article-buffer
1019 (widen) 1019 (widen)
1020 (let ((file-name (yenc-extract-filename)) 1020 (let ((file-name (yenc-extract-filename))
1021 state start-char) 1021 state) ;; start-char
1022 (when (not file-name) 1022 (when (not file-name)
1023 (setq state (list 'wrong-type))) 1023 (setq state (list 'wrong-type)))
1024 1024
@@ -1046,7 +1046,7 @@ When called interactively, prompt for REGEXP."
1046 1046
1047;; PostScript 1047;; PostScript
1048 1048
1049(defun gnus-uu-decode-postscript-article (process-buffer in-state) 1049(defun gnus-uu-decode-postscript-article (process-buffer _in-state)
1050 (let ((state (list 'ok)) 1050 (let ((state (list 'ok))
1051 start-char end-char file-name) 1051 start-char end-char file-name)
1052 (with-current-buffer process-buffer 1052 (with-current-buffer process-buffer
@@ -1278,13 +1278,15 @@ When called interactively, prompt for REGEXP."
1278 (when dont-unmark-last-article 1278 (when dont-unmark-last-article
1279 (setq gnus-uu-has-been-grabbed (list art)))))) 1279 (setq gnus-uu-has-been-grabbed (list art))))))
1280 1280
1281(defvar gnus-asynchronous)
1282
1281;; This function takes a list of articles and a function to apply to 1283;; This function takes a list of articles and a function to apply to
1282;; each article grabbed. 1284;; each article grabbed.
1283;; 1285;;
1284;; This function returns a list of files decoded if the grabbing and 1286;; This function returns a list of files decoded if the grabbing and
1285;; the process-function has been successful and nil otherwise. 1287;; the process-function has been successful and nil otherwise.
1286(defun gnus-uu-grab-articles (articles process-function 1288(defun gnus-uu-grab-articles (articles process-function
1287 &optional sloppy limit no-errors) 1289 &optional sloppy limit _no-errors)
1288 (require 'gnus-async) 1290 (require 'gnus-async)
1289 (let ((state 'first) 1291 (let ((state 'first)
1290 (gnus-asynchronous nil) 1292 (gnus-asynchronous nil)
@@ -1452,10 +1454,10 @@ When called interactively, prompt for REGEXP."
1452 (setq subject (substring subject (match-end 0))))) 1454 (setq subject (substring subject (match-end 0)))))
1453 (or part ""))) 1455 (or part "")))
1454 1456
1455(defun gnus-uu-uudecode-sentinel (process event) 1457(defun gnus-uu-uudecode-sentinel (process _event)
1456 (delete-process (get-process process))) 1458 (delete-process (get-process process)))
1457 1459
1458(defun gnus-uu-uustrip-article (process-buffer in-state) 1460(defun gnus-uu-uustrip-article (process-buffer _in-state)
1459 ;; Uudecodes a file asynchronously. 1461 ;; Uudecodes a file asynchronously.
1460 (with-current-buffer process-buffer 1462 (with-current-buffer process-buffer
1461 (let ((state (list 'wrong-type)) 1463 (let ((state (list 'wrong-type))
@@ -1576,7 +1578,7 @@ Gnus might fail to display all of it.")
1576 1578
1577;; This function is used by `gnus-uu-grab-articles' to treat 1579;; This function is used by `gnus-uu-grab-articles' to treat
1578;; a shared article. 1580;; a shared article.
1579(defun gnus-uu-unshar-article (process-buffer in-state) 1581(defun gnus-uu-unshar-article (process-buffer _in-state)
1580 (let ((state (list 'ok)) 1582 (let ((state (list 'ok))
1581 start-char) 1583 start-char)
1582 (with-current-buffer process-buffer 1584 (with-current-buffer process-buffer
diff --git a/lisp/gnus/gnus-vm.el b/lisp/gnus/gnus-vm.el
index 533b1e2a580..b7e6b2a8890 100644
--- a/lisp/gnus/gnus-vm.el
+++ b/lisp/gnus/gnus-vm.el
@@ -1,4 +1,4 @@
1;;; gnus-vm.el --- vm interface for Gnus 1;;; gnus-vm.el --- vm interface for Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1994-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1994-2021 Free Software Foundation, Inc.
4 4
diff --git a/lisp/gnus/gnus-win.el b/lisp/gnus/gnus-win.el
index d8b037ebe4e..8ac4e39fa52 100644
--- a/lisp/gnus/gnus-win.el
+++ b/lisp/gnus/gnus-win.el
@@ -1,4 +1,4 @@
1;;; gnus-win.el --- window configuration functions for Gnus 1;;; gnus-win.el --- window configuration functions for Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1996-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1996-2021 Free Software Foundation, Inc.
4 4
@@ -246,7 +246,7 @@ See the Gnus manual for an explanation of the syntax used.")
246 ;; return a new SPLIT. 246 ;; return a new SPLIT.
247 (while (and (not (assq (car split) gnus-window-to-buffer)) 247 (while (and (not (assq (car split) gnus-window-to-buffer))
248 (symbolp (car split)) (fboundp (car split))) 248 (symbolp (car split)) (fboundp (car split)))
249 (setq split (eval split))) 249 (setq split (eval split t)))
250 (let* ((type (car split)) 250 (let* ((type (car split))
251 (subs (cddr split)) 251 (subs (cddr split))
252 (len (if (eq type 'horizontal) (window-width) (window-height))) 252 (len (if (eq type 'horizontal) (window-width) (window-height)))
@@ -323,7 +323,7 @@ See the Gnus manual for an explanation of the syntax used.")
323 (setq sub (append (pop subs) nil)) 323 (setq sub (append (pop subs) nil))
324 (while (and (not (assq (car sub) gnus-window-to-buffer)) 324 (while (and (not (assq (car sub) gnus-window-to-buffer))
325 (symbolp (car sub)) (fboundp (car sub))) 325 (symbolp (car sub)) (fboundp (car sub)))
326 (setq sub (eval sub))) 326 (setq sub (eval sub t)))
327 (when sub 327 (when sub
328 (push sub comp-subs) 328 (push sub comp-subs)
329 (setq size (cadar comp-subs)) 329 (setq size (cadar comp-subs))
@@ -471,7 +471,7 @@ should have point."
471 ;; return a new SPLIT. 471 ;; return a new SPLIT.
472 (while (and (not (assq (car split) gnus-window-to-buffer)) 472 (while (and (not (assq (car split) gnus-window-to-buffer))
473 (symbolp (car split)) (fboundp (car split))) 473 (symbolp (car split)) (fboundp (car split)))
474 (setq split (eval split))) 474 (setq split (eval split t)))
475 475
476 (setq type (elt split 0)) 476 (setq type (elt split 0))
477 (cond 477 (cond
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
index 1eff9a82230..84e53da297b 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -3724,7 +3724,7 @@ just the host name."
3724 depth (+ depth 1))) 3724 depth (+ depth 1)))
3725 depth)))) 3725 depth))))
3726 ;; Separate foreign select method from group name and collapse. 3726 ;; Separate foreign select method from group name and collapse.
3727 ;; If method contains a server, collapse to non-domain server name, 3727 ;; If method contains a server, collapse to non-domain server name,
3728 ;; otherwise collapse to select method. 3728 ;; otherwise collapse to select method.
3729 (let* ((colon (string-match ":" group)) 3729 (let* ((colon (string-match ":" group))
3730 (server (and colon (substring group 0 colon))) 3730 (server (and colon (substring group 0 colon)))
diff --git a/lisp/gnus/gssapi.el b/lisp/gnus/gssapi.el
index 20562fb9ad2..6ff2a4e2851 100644
--- a/lisp/gnus/gssapi.el
+++ b/lisp/gnus/gssapi.el
@@ -1,4 +1,4 @@
1;;; gssapi.el --- GSSAPI/Kerberos 5 interface for Emacs 1;;; gssapi.el --- GSSAPI/Kerberos 5 interface for Emacs -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 2011-2021 Free Software Foundation, Inc. 3;; Copyright (C) 2011-2021 Free Software Foundation, Inc.
4 4
diff --git a/lisp/gnus/legacy-gnus-agent.el b/lisp/gnus/legacy-gnus-agent.el
index b47e69ffa4b..091e3899c26 100644
--- a/lisp/gnus/legacy-gnus-agent.el
+++ b/lisp/gnus/legacy-gnus-agent.el
@@ -1,4 +1,4 @@
1;;; gnus-agent.el --- Legacy unplugged support for Gnus 1;;; gnus-agent.el --- Legacy unplugged support for Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 2004-2021 Free Software Foundation, Inc. 3;; Copyright (C) 2004-2021 Free Software Foundation, Inc.
4 4
@@ -210,7 +210,7 @@ converted to the compressed format."
210;; Therefore, hide the default prompt. 210;; Therefore, hide the default prompt.
211(gnus-convert-mark-converter-prompt 'gnus-agent-unlist-expire-days t) 211(gnus-convert-mark-converter-prompt 'gnus-agent-unlist-expire-days t)
212 212
213(defun gnus-agent-unhook-expire-days (converting-to) 213(defun gnus-agent-unhook-expire-days (_converting-to)
214 "Remove every lambda from `gnus-group-prepare-hook' that mention the 214 "Remove every lambda from `gnus-group-prepare-hook' that mention the
215symbol `gnus-agent-do-once' in their definition. This should NOT be 215symbol `gnus-agent-do-once' in their definition. This should NOT be
216necessary as gnus-agent.el no longer adds them. However, it is 216necessary as gnus-agent.el no longer adds them. However, it is
diff --git a/lisp/gnus/mail-source.el b/lisp/gnus/mail-source.el
index 4f02d86f441..af0a1983766 100644
--- a/lisp/gnus/mail-source.el
+++ b/lisp/gnus/mail-source.el
@@ -1,4 +1,4 @@
1;;; mail-source.el --- functions for fetching mail 1;;; mail-source.el --- functions for fetching mail -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1999-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1999-2021 Free Software Foundation, Inc.
4 4
@@ -403,16 +403,19 @@ of the second `let' form.
403The variables bound and their default values are described by 403The variables bound and their default values are described by
404the `mail-source-keyword-map' variable." 404the `mail-source-keyword-map' variable."
405 (declare (indent 1) (debug (sexp body))) 405 (declare (indent 1) (debug (sexp body)))
406 `(let* ,(mail-source-bind-1 (car type-source)) 406 ;; FIXME: Use lexical vars, i.e. don't initialize the vars inside
407 (mail-source-set-1 ,(cadr type-source)) 407 ;; `mail-source-set-1' via `set'.
408 ,@body)) 408 (let ((bindings (mail-source-bind-1 (car type-source))))
409 409 `(with-suppressed-warnings ((lexical ,@(mapcar #'car bindings)))
410 (dlet ,bindings
411 (mail-source-set-1 ,(cadr type-source))
412 ,@body))))
410 413
411(defun mail-source-set-1 (source) 414(defun mail-source-set-1 (source)
412 (let* ((type (pop source)) 415 (let* ((type (pop source))
413 (defaults (cdr (assq type mail-source-keyword-map))) 416 (defaults (cdr (assq type mail-source-keyword-map)))
414 (search '(:max 1)) 417 (search '(:max 1))
415 found default value keyword auth-info user-auth pass-auth) 418 found default value keyword user-auth pass-auth) ;; auth-info
416 419
417 ;; append to the search the useful info from the source and the defaults: 420 ;; append to the search the useful info from the source and the defaults:
418 ;; user, host, and port 421 ;; user, host, and port
@@ -494,9 +497,13 @@ the `mail-source-keyword-map' variable."
494 "Return a `let' form that binds all common variables. 497 "Return a `let' form that binds all common variables.
495See `mail-source-bind'." 498See `mail-source-bind'."
496 (declare (indent 1) (debug (sexp body))) 499 (declare (indent 1) (debug (sexp body)))
497 `(let ,(mail-source-bind-common-1) 500 ;; FIXME: AFAICT this is a Rube Goldberg'esque way to bind and initialize the
498 (mail-source-set-common-1 ,source) 501 ;; `plugged` variable.
499 ,@body)) 502 (let ((bindings (mail-source-bind-common-1)))
503 `(with-suppressed-warnings ((lexical ,@(mapcar #'car bindings)))
504 (dlet ,bindings
505 (mail-source-set-common-1 ,source)
506 ,@body))))
500 507
501(defun mail-source-value (value) 508(defun mail-source-value (value)
502 "Return the value of VALUE." 509 "Return the value of VALUE."
@@ -506,7 +513,7 @@ See `mail-source-bind'."
506 value) 513 value)
507 ;; Function 514 ;; Function
508 ((and (listp value) (symbolp (car value)) (fboundp (car value))) 515 ((and (listp value) (symbolp (car value)) (fboundp (car value)))
509 (eval value)) 516 (eval value t))
510 ;; Just return the value. 517 ;; Just return the value.
511 (t 518 (t
512 value))) 519 value)))
@@ -721,12 +728,13 @@ Deleting old (> %s day(s)) incoming mail file `%s'." diff bfile)
721(declare-function gnus-get-buffer-create "gnus" (name)) 728(declare-function gnus-get-buffer-create "gnus" (name))
722(defun mail-source-call-script (script) 729(defun mail-source-call-script (script)
723 (require 'gnus) 730 (require 'gnus)
724 (let ((background nil) 731 (let (;; (background nil)
725 (stderr (gnus-get-buffer-create " *mail-source-stderr*")) 732 (stderr (gnus-get-buffer-create " *mail-source-stderr*"))
726 result) 733 result)
727 (when (string-match "& *$" script) 734 (when (string-match "& *$" script)
728 (setq script (substring script 0 (match-beginning 0)) 735 (setq script (substring script 0 (match-beginning 0))
729 background 0)) 736 ;; background 0
737 ))
730 (setq result 738 (setq result
731 (call-process shell-file-name nil stderr nil 739 (call-process shell-file-name nil stderr nil
732 shell-command-switch script)) 740 shell-command-switch script))
@@ -810,14 +818,14 @@ Deleting old (> %s day(s)) incoming mail file `%s'." diff bfile)
810 ;; The default is to use pop3.el. 818 ;; The default is to use pop3.el.
811 (t 819 (t
812 (require 'pop3) 820 (require 'pop3)
813 (let ((pop3-password password) 821 (dlet ((pop3-password password)
814 (pop3-maildrop user) 822 (pop3-maildrop user)
815 (pop3-mailhost server) 823 (pop3-mailhost server)
816 (pop3-port port) 824 (pop3-port port)
817 (pop3-authentication-scheme 825 (pop3-authentication-scheme
818 (if (eq authentication 'apop) 'apop 'pass)) 826 (if (eq authentication 'apop) 'apop 'pass))
819 (pop3-stream-type stream) 827 (pop3-stream-type stream)
820 (pop3-leave-mail-on-server leave)) 828 (pop3-leave-mail-on-server leave))
821 (if (or debug-on-quit debug-on-error) 829 (if (or debug-on-quit debug-on-error)
822 (save-excursion (pop3-movemail mail-source-crash-box)) 830 (save-excursion (pop3-movemail mail-source-crash-box))
823 (condition-case err 831 (condition-case err
@@ -877,12 +885,12 @@ Deleting old (> %s day(s)) incoming mail file `%s'." diff bfile)
877 ;; The default is to use pop3.el. 885 ;; The default is to use pop3.el.
878 (t 886 (t
879 (require 'pop3) 887 (require 'pop3)
880 (let ((pop3-password password) 888 (dlet ((pop3-password password)
881 (pop3-maildrop user) 889 (pop3-maildrop user)
882 (pop3-mailhost server) 890 (pop3-mailhost server)
883 (pop3-port port) 891 (pop3-port port)
884 (pop3-authentication-scheme 892 (pop3-authentication-scheme
885 (if (eq authentication 'apop) 'apop 'pass))) 893 (if (eq authentication 'apop) 'apop 'pass)))
886 (if (or debug-on-quit debug-on-error) 894 (if (or debug-on-quit debug-on-error)
887 (save-excursion (pop3-get-message-count)) 895 (save-excursion (pop3-get-message-count))
888 (condition-case err 896 (condition-case err
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 3f671193a29..d2a0092fde9 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -3675,7 +3675,7 @@ are null."
3675 ((functionp message-signature) 3675 ((functionp message-signature)
3676 (funcall message-signature)) 3676 (funcall message-signature))
3677 ((listp message-signature) 3677 ((listp message-signature)
3678 (eval message-signature)) 3678 (eval message-signature t))
3679 (t message-signature))) 3679 (t message-signature)))
3680 signature-file) 3680 signature-file)
3681 (setq signature 3681 (setq signature
@@ -3992,11 +3992,12 @@ Just \\[universal-argument] as argument means don't indent, insert no
3992prefix, and don't delete any headers." 3992prefix, and don't delete any headers."
3993 (interactive "P") 3993 (interactive "P")
3994 ;; eval the let forms contained in message-cite-style 3994 ;; eval the let forms contained in message-cite-style
3995 (eval 3995 (let ((bindings (if (symbolp message-cite-style)
3996 `(let ,(if (symbolp message-cite-style) 3996 (symbol-value message-cite-style)
3997 (symbol-value message-cite-style) 3997 message-cite-style)))
3998 message-cite-style) 3998 (cl-progv (mapcar #'car bindings)
3999 (message--yank-original-internal ',arg)))) 3999 (mapcar (lambda (binding) (eval (cadr binding) t)) bindings)
4000 (message--yank-original-internal arg))))
4000 4001
4001(defun message-yank-buffer (buffer) 4002(defun message-yank-buffer (buffer)
4002 "Insert BUFFER into the current buffer and quote it." 4003 "Insert BUFFER into the current buffer and quote it."
@@ -4627,7 +4628,7 @@ Valid types are `send', `return', `exit', `kill' and `postpone'."
4627 (funcall action)) 4628 (funcall action))
4628 ;; Something to be evalled. 4629 ;; Something to be evalled.
4629 (t 4630 (t
4630 (eval action)))))) 4631 (eval action t))))))
4631 4632
4632(defun message-send-mail-partially () 4633(defun message-send-mail-partially ()
4633 "Send mail as message/partial." 4634 "Send mail as message/partial."
@@ -4943,7 +4944,7 @@ that instead."
4943 ;; Insert an extra newline if we need it to work around 4944 ;; Insert an extra newline if we need it to work around
4944 ;; Sun's bug that swallows newlines. 4945 ;; Sun's bug that swallows newlines.
4945 (goto-char (1+ delimline)) 4946 (goto-char (1+ delimline))
4946 (when (eval message-mailer-swallows-blank-line) 4947 (when (eval message-mailer-swallows-blank-line t)
4947 (newline)) 4948 (newline))
4948 (when message-interactive 4949 (when message-interactive
4949 (with-current-buffer errbuf 4950 (with-current-buffer errbuf
diff --git a/lisp/gnus/mm-archive.el b/lisp/gnus/mm-archive.el
index 6173d86327a..d550045e0a2 100644
--- a/lisp/gnus/mm-archive.el
+++ b/lisp/gnus/mm-archive.el
@@ -1,4 +1,4 @@
1;;; mm-archive.el --- Functions for parsing archive files as MIME 1;;; mm-archive.el --- Functions for parsing archive files as MIME -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 2012-2021 Free Software Foundation, Inc. 3;; Copyright (C) 2012-2021 Free Software Foundation, Inc.
4 4
diff --git a/lisp/gnus/mm-bodies.el b/lisp/gnus/mm-bodies.el
index f35ba3a0b91..d6b71f15e54 100644
--- a/lisp/gnus/mm-bodies.el
+++ b/lisp/gnus/mm-bodies.el
@@ -1,4 +1,4 @@
1;;; mm-bodies.el --- Functions for decoding MIME things 1;;; mm-bodies.el --- Functions for decoding MIME things -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1998-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1998-2021 Free Software Foundation, Inc.
4 4
diff --git a/lisp/gnus/mm-encode.el b/lisp/gnus/mm-encode.el
index 31d613146b3..84a3b0a8d1c 100644
--- a/lisp/gnus/mm-encode.el
+++ b/lisp/gnus/mm-encode.el
@@ -1,4 +1,4 @@
1;;; mm-encode.el --- Functions for encoding MIME things 1;;; mm-encode.el --- Functions for encoding MIME things -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1998-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1998-2021 Free Software Foundation, Inc.
4 4
diff --git a/lisp/gnus/mm-partial.el b/lisp/gnus/mm-partial.el
index 8d4913e6fbd..8f5d45d67d8 100644
--- a/lisp/gnus/mm-partial.el
+++ b/lisp/gnus/mm-partial.el
@@ -1,4 +1,4 @@
1;;; mm-partial.el --- showing message/partial 1;;; mm-partial.el --- showing message/partial -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 2000-2021 Free Software Foundation, Inc. 3;; Copyright (C) 2000-2021 Free Software Foundation, Inc.
4 4
@@ -50,6 +50,8 @@
50 (push nhandles phandles)))))))) 50 (push nhandles phandles))))))))
51 phandles)) 51 phandles))
52 52
53(defvar gnus-displaying-mime)
54
53;;;###autoload 55;;;###autoload
54(defun mm-inline-partial (handle &optional no-display) 56(defun mm-inline-partial (handle &optional no-display)
55 "Show the partial part of HANDLE. 57 "Show the partial part of HANDLE.
@@ -60,7 +62,7 @@ If NO-DISPLAY is nil, display it. Otherwise, do nothing after replacing."
60 phandles 62 phandles
61 (b (point)) (n 1) total 63 (b (point)) (n 1) total
62 phandle nn ntotal 64 phandle nn ntotal
63 gnus-displaying-mime handles buffer) 65 gnus-displaying-mime handles) ;; buffer
64 (unless (mm-handle-cache handle) 66 (unless (mm-handle-cache handle)
65 (unless id 67 (unless id
66 (error "Can not find message/partial id")) 68 (error "Can not find message/partial id"))
diff --git a/lisp/gnus/mm-url.el b/lisp/gnus/mm-url.el
index 01d25ac61e4..3d58738d637 100644
--- a/lisp/gnus/mm-url.el
+++ b/lisp/gnus/mm-url.el
@@ -1,4 +1,4 @@
1;;; mm-url.el --- a wrapper of url functions/commands for Gnus 1;;; mm-url.el --- a wrapper of url functions/commands for Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 2001-2021 Free Software Foundation, Inc. 3;; Copyright (C) 2001-2021 Free Software Foundation, Inc.
4 4
diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el
index be279b6cf1f..92e04f9d2ee 100644
--- a/lisp/gnus/mm-util.el
+++ b/lisp/gnus/mm-util.el
@@ -160,7 +160,7 @@ is not available."
160 form 160 form
161 (prog2 161 (prog2
162 ;; Avoid errors... 162 ;; Avoid errors...
163 (condition-case nil (eval form) (error nil)) 163 (condition-case nil (eval form t) (error nil))
164 ;; (message "Failed to eval `%s'" form)) 164 ;; (message "Failed to eval `%s'" form))
165 (mm-coding-system-p cs) 165 (mm-coding-system-p cs)
166 (message "Added charset `%s' via `mm-charset-eval-alist'" cs)) 166 (message "Added charset `%s' via `mm-charset-eval-alist'" cs))
diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el
index 266f471a3fd..f4c1cf9a6c8 100644
--- a/lisp/gnus/mm-view.el
+++ b/lisp/gnus/mm-view.el
@@ -1,4 +1,4 @@
1;;; mm-view.el --- functions for viewing MIME objects 1;;; mm-view.el --- functions for viewing MIME objects -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1998-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1998-2021 Free Software Foundation, Inc.
4 4
@@ -137,7 +137,7 @@ This is only used if `mm-inline-large-images' is set to
137 (equal "multipart" (mm-handle-media-supertype elem))) 137 (equal "multipart" (mm-handle-media-supertype elem)))
138 (mm-w3m-cid-retrieve-1 url elem))))) 138 (mm-w3m-cid-retrieve-1 url elem)))))
139 139
140(defun mm-w3m-cid-retrieve (url &rest args) 140(defun mm-w3m-cid-retrieve (url &rest _args)
141 "Insert a content pointed by URL if it has the cid: scheme." 141 "Insert a content pointed by URL if it has the cid: scheme."
142 (when (string-match "\\`cid:" url) 142 (when (string-match "\\`cid:" url)
143 (or (catch 'found-handle 143 (or (catch 'found-handle
@@ -149,6 +149,9 @@ This is only used if `mm-inline-large-images' is set to
149 nil 149 nil
150 (message "Failed to find \"Content-ID: %s\"" url))))) 150 (message "Failed to find \"Content-ID: %s\"" url)))))
151 151
152(defvar w3m-force-redisplay)
153(defvar w3m-safe-url-regexp)
154
152(defun mm-inline-text-html-render-with-w3m (handle) 155(defun mm-inline-text-html-render-with-w3m (handle)
153 "Render a text/html part using emacs-w3m." 156 "Render a text/html part using emacs-w3m."
154 (mm-setup-w3m) 157 (mm-setup-w3m)
@@ -396,7 +399,7 @@ This is only used if `mm-inline-large-images' is set to
396 (delete-region ,(copy-marker b t) 399 (delete-region ,(copy-marker b t)
397 ,(point-marker))))))) 400 ,(point-marker)))))))
398 401
399(defun mm-inline-audio (handle) 402(defun mm-inline-audio (_handle)
400 (message "Not implemented")) 403 (message "Not implemented"))
401 404
402(defun mm-view-message () 405(defun mm-view-message ()
@@ -413,6 +416,10 @@ This is only used if `mm-inline-large-images' is set to
413 (fundamental-mode) 416 (fundamental-mode)
414 (goto-char (point-min))) 417 (goto-char (point-min)))
415 418
419(defvar gnus-original-article-buffer)
420(defvar gnus-article-prepare-hook)
421(defvar gnus-displaying-mime)
422
416(defun mm-inline-message (handle) 423(defun mm-inline-message (handle)
417 (let ((b (point)) 424 (let ((b (point))
418 (bolp (bolp)) 425 (bolp (bolp))
diff --git a/lisp/gnus/mml-sec.el b/lisp/gnus/mml-sec.el
index a050fe04e1b..8d01d15ca01 100644
--- a/lisp/gnus/mml-sec.el
+++ b/lisp/gnus/mml-sec.el
@@ -1,4 +1,4 @@
1;;; mml-sec.el --- A package with security functions for MML documents 1;;; mml-sec.el --- A package with security functions for MML documents -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 2000-2021 Free Software Foundation, Inc. 3;; Copyright (C) 2000-2021 Free Software Foundation, Inc.
4 4
@@ -622,7 +622,7 @@ Passphrase caching in Emacs is NOT recommended. Use gpg-agent instead."
622 mml-smime-passphrase-cache-expiry) 622 mml-smime-passphrase-cache-expiry)
623 mml-secure-passphrase-cache-expiry)))) 623 mml-secure-passphrase-cache-expiry))))
624 624
625(defun mml-secure-passphrase-callback (context key-id standard) 625(defun mml-secure-passphrase-callback (context key-id _standard)
626 "Ask for passphrase in CONTEXT for KEY-ID for STANDARD. 626 "Ask for passphrase in CONTEXT for KEY-ID for STANDARD.
627The passphrase is read and cached." 627The passphrase is read and cached."
628 ;; Based on mml2015-epg-passphrase-callback. 628 ;; Based on mml2015-epg-passphrase-callback.
@@ -906,7 +906,7 @@ If no one is selected, symmetric encryption will be performed. "
906 (error "No recipient specified"))) 906 (error "No recipient specified")))
907 recipients)) 907 recipients))
908 908
909(defun mml-secure-epg-encrypt (protocol cont &optional sign) 909(defun mml-secure-epg-encrypt (protocol _cont &optional sign)
910 ;; Based on code appearing inside mml2015-epg-encrypt. 910 ;; Based on code appearing inside mml2015-epg-encrypt.
911 (let* ((context (epg-make-context protocol)) 911 (let* ((context (epg-make-context protocol))
912 (config (epg-find-configuration 'OpenPGP)) 912 (config (epg-find-configuration 'OpenPGP))
diff --git a/lisp/gnus/mml-smime.el b/lisp/gnus/mml-smime.el
index eabb56b3038..5c133e680af 100644
--- a/lisp/gnus/mml-smime.el
+++ b/lisp/gnus/mml-smime.el
@@ -1,4 +1,4 @@
1;;; mml-smime.el --- S/MIME support for MML 1;;; mml-smime.el --- S/MIME support for MML -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 2000-2021 Free Software Foundation, Inc. 3;; Copyright (C) 2000-2021 Free Software Foundation, Inc.
4 4
@@ -129,7 +129,7 @@ Whether the passphrase is cached at all is controlled by
129 (if func 129 (if func
130 (funcall func handle ctl)))) 130 (funcall func handle ctl))))
131 131
132(defun mml-smime-openssl-sign (cont) 132(defun mml-smime-openssl-sign (_cont)
133 (when (null smime-keys) 133 (when (null smime-keys)
134 (customize-variable 'smime-keys) 134 (customize-variable 'smime-keys)
135 (error "No S/MIME keys configured, use customize to add your key")) 135 (error "No S/MIME keys configured, use customize to add your key"))
@@ -309,7 +309,7 @@ Whether the passphrase is cached at all is controlled by
309 (buffer-string) "\n"))))) 309 (buffer-string) "\n")))))
310 handle) 310 handle)
311 311
312(defun mml-smime-openssl-verify-test (handle ctl) 312(defun mml-smime-openssl-verify-test (_handle _ctl)
313 smime-openssl-program) 313 smime-openssl-program)
314 314
315(defvar epg-user-id-alist) 315(defvar epg-user-id-alist)
@@ -370,7 +370,7 @@ Content-Disposition: attachment; filename=smime.p7s
370 370
371(defun mml-smime-epg-encrypt (cont) 371(defun mml-smime-epg-encrypt (cont)
372 (let* ((inhibit-redisplay t) ;FIXME: Why? 372 (let* ((inhibit-redisplay t) ;FIXME: Why?
373 (boundary (mml-compute-boundary cont)) 373 ;; (boundary (mml-compute-boundary cont))
374 (cipher (mml-secure-epg-encrypt 'CMS cont))) 374 (cipher (mml-secure-epg-encrypt 'CMS cont)))
375 (delete-region (point-min) (point-max)) 375 (delete-region (point-min) (point-max))
376 (goto-char (point-min)) 376 (goto-char (point-min))
@@ -388,7 +388,7 @@ Content-Disposition: attachment; filename=smime.p7m
388(defun mml-smime-epg-verify (handle ctl) 388(defun mml-smime-epg-verify (handle ctl)
389 (catch 'error 389 (catch 'error
390 (let ((inhibit-redisplay t) 390 (let ((inhibit-redisplay t)
391 context plain signature-file part signature) 391 context part signature) ;; plain signature-file
392 (when (or (null (setq part (mm-find-raw-part-by-type 392 (when (or (null (setq part (mm-find-raw-part-by-type
393 ctl (or (mm-handle-multipart-ctl-parameter 393 ctl (or (mm-handle-multipart-ctl-parameter
394 ctl 'protocol) 394 ctl 'protocol)
@@ -407,7 +407,8 @@ Content-Disposition: attachment; filename=smime.p7m
407 (setq part (replace-regexp-in-string "\n" "\r\n" part) 407 (setq part (replace-regexp-in-string "\n" "\r\n" part)
408 context (epg-make-context 'CMS)) 408 context (epg-make-context 'CMS))
409 (condition-case error 409 (condition-case error
410 (setq plain (epg-verify-string context (mm-get-part signature) part)) 410 ;; (setq plain
411 (epg-verify-string context (mm-get-part signature) part) ;;)
411 (error 412 (error
412 (mm-sec-error 'gnus-info "Failed") 413 (mm-sec-error 'gnus-info "Failed")
413 (mm-sec-status 'gnus-details (if (eq (car error) 'quit) 414 (mm-sec-status 'gnus-details (if (eq (car error) 'quit)
@@ -419,7 +420,7 @@ Content-Disposition: attachment; filename=smime.p7m
419 (epg-verify-result-to-string (epg-context-result-for context 'verify))) 420 (epg-verify-result-to-string (epg-context-result-for context 'verify)))
420 handle))) 421 handle)))
421 422
422(defun mml-smime-epg-verify-test (handle ctl) 423(defun mml-smime-epg-verify-test (_handle _ctl)
423 t) 424 t)
424 425
425(provide 'mml-smime) 426(provide 'mml-smime)
diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el
index 54f8715baf0..f77e5c6434e 100644
--- a/lisp/gnus/mml.el
+++ b/lisp/gnus/mml.el
@@ -1,4 +1,4 @@
1;;; mml.el --- A package for parsing and validating MML documents 1;;; mml.el --- A package for parsing and validating MML documents -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1998-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1998-2021 Free Software Foundation, Inc.
4 4
@@ -259,18 +259,19 @@ part. This is for the internal use, you should never modify the value.")
259 (list "sign" method "encrypt" method)) 259 (list "sign" method "encrypt" method))
260 (t 260 (t
261 (error "Unknown secure mode %s" mode)))) 261 (error "Unknown secure mode %s" mode))))
262 (eval `(mml-insert-tag ,secure-mode 262 (apply #'mml-insert-tag
263 ,@tags 263 secure-mode
264 ,(if keyfile "keyfile") 264 `(,@tags
265 ,keyfile 265 ,(if keyfile "keyfile")
266 ,@(apply #'append 266 ,keyfile
267 (mapcar (lambda (certfile) 267 ,@(apply #'append
268 (list "certfile" certfile)) 268 (mapcar (lambda (certfile)
269 certfiles)) 269 (list "certfile" certfile))
270 ,(if recipients "recipients") 270 certfiles))
271 ,recipients 271 ,(if recipients "recipients")
272 ,(if sender "sender") 272 ,recipients
273 ,sender)) 273 ,(if sender "sender")
274 ,sender))
274 ;; restart the parse 275 ;; restart the parse
275 (goto-char location))) 276 (goto-char location)))
276 ((looking-at "<#multipart") 277 ((looking-at "<#multipart")
@@ -1458,7 +1459,7 @@ will be computed and used."
1458 (file-name-nondirectory file))) 1459 (file-name-nondirectory file)))
1459 (goto-char head)))) 1460 (goto-char head))))
1460 1461
1461(defun mml-dnd-attach-file (uri action) 1462(defun mml-dnd-attach-file (uri _action)
1462 "Attach a drag and drop file. 1463 "Attach a drag and drop file.
1463 1464
1464Ask for type, description or disposition according to 1465Ask for type, description or disposition according to
@@ -1589,6 +1590,16 @@ Should be adopted if code in `message-send-mail' is changed."
1589(declare-function message-generate-headers "message" (headers)) 1590(declare-function message-generate-headers "message" (headers))
1590(declare-function message-sort-headers "message" ()) 1591(declare-function message-sort-headers "message" ())
1591 1592
1593(defvar gnus-newsgroup-name)
1594(defvar gnus-displaying-mime)
1595(defvar gnus-newsgroup-name)
1596(defvar gnus-article-prepare-hook)
1597(defvar gnus-newsgroup-charset)
1598(defvar gnus-original-article-buffer)
1599(defvar gnus-message-buffer)
1600(defvar message-this-is-news)
1601(defvar message-this-is-mail)
1602
1592(defun mml-preview (&optional raw) 1603(defun mml-preview (&optional raw)
1593 "Display current buffer with Gnus, in a new buffer. 1604 "Display current buffer with Gnus, in a new buffer.
1594If RAW, display a raw encoded MIME message. 1605If RAW, display a raw encoded MIME message.
@@ -1708,7 +1719,7 @@ or the `pop-to-buffer' function."
1708 cont) 1719 cont)
1709 (let ((alist mml-tweak-sexp-alist)) 1720 (let ((alist mml-tweak-sexp-alist))
1710 (while alist 1721 (while alist
1711 (if (eval (caar alist)) 1722 (if (eval (caar alist) t)
1712 (funcall (cdar alist) cont)) 1723 (funcall (cdar alist) cont))
1713 (setq alist (cdr alist))))) 1724 (setq alist (cdr alist)))))
1714 cont) 1725 cont)
diff --git a/lisp/gnus/mml1991.el b/lisp/gnus/mml1991.el
index a87e642c07d..05f44a1cbd8 100644
--- a/lisp/gnus/mml1991.el
+++ b/lisp/gnus/mml1991.el
@@ -1,4 +1,4 @@
1;;; mml1991.el --- Old PGP message format (RFC 1991) support for MML 1;;; mml1991.el --- Old PGP message format (RFC 1991) support for MML -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1998-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1998-2021 Free Software Foundation, Inc.
4 4
@@ -82,7 +82,7 @@ Whether the passphrase is cached at all is controlled by
82(defvar mml1991-decrypt-function 'mailcrypt-decrypt) 82(defvar mml1991-decrypt-function 'mailcrypt-decrypt)
83(defvar mml1991-verify-function 'mailcrypt-verify) 83(defvar mml1991-verify-function 'mailcrypt-verify)
84 84
85(defun mml1991-mailcrypt-sign (cont) 85(defun mml1991-mailcrypt-sign (_cont)
86 (let ((text (current-buffer)) 86 (let ((text (current-buffer))
87 headers signature 87 headers signature
88 (result-buffer (get-buffer-create "*GPG Result*"))) 88 (result-buffer (get-buffer-create "*GPG Result*")))
@@ -118,7 +118,7 @@ Whether the passphrase is cached at all is controlled by
118(declare-function mc-encrypt-generic "ext:mc-toplev" 118(declare-function mc-encrypt-generic "ext:mc-toplev"
119 (&optional recipients scheme start end from sign)) 119 (&optional recipients scheme start end from sign))
120 120
121(defun mml1991-mailcrypt-encrypt (cont &optional sign) 121(defun mml1991-mailcrypt-encrypt (_cont &optional sign)
122 (let ((text (current-buffer)) 122 (let ((text (current-buffer))
123 (mc-pgp-always-sign 123 (mc-pgp-always-sign
124 (or mc-pgp-always-sign 124 (or mc-pgp-always-sign
@@ -171,8 +171,9 @@ Whether the passphrase is cached at all is controlled by
171(defvar pgg-default-user-id) 171(defvar pgg-default-user-id)
172(defvar pgg-errors-buffer) 172(defvar pgg-errors-buffer)
173(defvar pgg-output-buffer) 173(defvar pgg-output-buffer)
174(defvar pgg-text-mode)
174 175
175(defun mml1991-pgg-sign (cont) 176(defun mml1991-pgg-sign (_cont)
176 (let ((pgg-text-mode t) 177 (let ((pgg-text-mode t)
177 (pgg-default-user-id (or (message-options-get 'mml-sender) 178 (pgg-default-user-id (or (message-options-get 'mml-sender)
178 pgg-default-user-id)) 179 pgg-default-user-id))
@@ -209,7 +210,7 @@ Whether the passphrase is cached at all is controlled by
209 (buffer-string))) 210 (buffer-string)))
210 t)) 211 t))
211 212
212(defun mml1991-pgg-encrypt (cont &optional sign) 213(defun mml1991-pgg-encrypt (_cont &optional sign)
213 (goto-char (point-min)) 214 (goto-char (point-min))
214 (when (re-search-forward "^$" nil t) 215 (when (re-search-forward "^$" nil t)
215 (let ((cte (save-restriction 216 (let ((cte (save-restriction
@@ -257,7 +258,7 @@ Whether the passphrase is cached at all is controlled by
257(autoload 'epg-configuration "epg-config") 258(autoload 'epg-configuration "epg-config")
258(autoload 'epg-expand-group "epg-config") 259(autoload 'epg-expand-group "epg-config")
259 260
260(defun mml1991-epg-sign (cont) 261(defun mml1991-epg-sign (_cont)
261 (let ((inhibit-redisplay t) 262 (let ((inhibit-redisplay t)
262 headers cte) 263 headers cte)
263 ;; Don't sign headers. 264 ;; Don't sign headers.
diff --git a/lisp/gnus/mml2015.el b/lisp/gnus/mml2015.el
index 53454bf16d8..1af7d10d055 100644
--- a/lisp/gnus/mml2015.el
+++ b/lisp/gnus/mml2015.el
@@ -1,4 +1,4 @@
1;;; mml2015.el --- MIME Security with Pretty Good Privacy (PGP) 1;;; mml2015.el --- MIME Security with Pretty Good Privacy (PGP) -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 2000-2021 Free Software Foundation, Inc. 3;; Copyright (C) 2000-2021 Free Software Foundation, Inc.
4 4
@@ -185,7 +185,7 @@ If set, it overrides the setting of `mml2015-sign-with-sender'."
185 (cadr err) 185 (cadr err)
186 (format "%S" (cdr err)))) 186 (format "%S" (cdr err))))
187 187
188(defun mml2015-mailcrypt-decrypt (handle ctl) 188(defun mml2015-mailcrypt-decrypt (handle _ctl)
189 (catch 'error 189 (catch 'error
190 (let (child handles result) 190 (let (child handles result)
191 (unless (setq child (mm-find-part-by-type 191 (unless (setq child (mm-find-part-by-type
@@ -479,6 +479,7 @@ If set, it overrides the setting of `mml2015-sign-with-sender'."
479(defvar pgg-default-user-id) 479(defvar pgg-default-user-id)
480(defvar pgg-errors-buffer) 480(defvar pgg-errors-buffer)
481(defvar pgg-output-buffer) 481(defvar pgg-output-buffer)
482(defvar pgg-text-mode)
482 483
483(autoload 'pgg-decrypt-region "pgg") 484(autoload 'pgg-decrypt-region "pgg")
484(autoload 'pgg-verify-region "pgg") 485(autoload 'pgg-verify-region "pgg")
@@ -486,10 +487,10 @@ If set, it overrides the setting of `mml2015-sign-with-sender'."
486(autoload 'pgg-encrypt-region "pgg") 487(autoload 'pgg-encrypt-region "pgg")
487(autoload 'pgg-parse-armor "pgg-parse") 488(autoload 'pgg-parse-armor "pgg-parse")
488 489
489(defun mml2015-pgg-decrypt (handle ctl) 490(defun mml2015-pgg-decrypt (handle _ctl)
490 (catch 'error 491 (catch 'error
491 (let ((pgg-errors-buffer mml2015-result-buffer) 492 (let ((pgg-errors-buffer mml2015-result-buffer)
492 child handles result decrypt-status) 493 child handles decrypt-status) ;; result
493 (unless (setq child (mm-find-part-by-type 494 (unless (setq child (mm-find-part-by-type
494 (cdr handle) 495 (cdr handle)
495 "application/octet-stream" nil t)) 496 "application/octet-stream" nil t))
@@ -751,7 +752,7 @@ If set, it overrides the setting of `mml2015-sign-with-sender'."
751 (let ((key-image (mml2015-epg-key-image key-id))) 752 (let ((key-image (mml2015-epg-key-image key-id)))
752 (if (not key-image) 753 (if (not key-image)
753 "" 754 ""
754 (condition-case error 755 (condition-case nil
755 (let ((result " ")) 756 (let ((result " "))
756 (put-text-property 757 (put-text-property
757 1 2 'display 758 1 2 'display
@@ -770,10 +771,10 @@ If set, it overrides the setting of `mml2015-sign-with-sender'."
770(defun mml2015-epg-verify-result-to-string (verify-result) 771(defun mml2015-epg-verify-result-to-string (verify-result)
771 (mapconcat #'mml2015-epg-signature-to-string verify-result "\n")) 772 (mapconcat #'mml2015-epg-signature-to-string verify-result "\n"))
772 773
773(defun mml2015-epg-decrypt (handle ctl) 774(defun mml2015-epg-decrypt (handle _ctl)
774 (catch 'error 775 (catch 'error
775 (let ((inhibit-redisplay t) 776 (let ((inhibit-redisplay t)
776 context plain child handles result decrypt-status) 777 context plain child handles) ;; decrypt-status result
777 (unless (setq child (mm-find-part-by-type 778 (unless (setq child (mm-find-part-by-type
778 (cdr handle) 779 (cdr handle)
779 "application/octet-stream" nil t)) 780 "application/octet-stream" nil t))
@@ -851,7 +852,7 @@ If set, it overrides the setting of `mml2015-sign-with-sender'."
851(defun mml2015-epg-verify (handle ctl) 852(defun mml2015-epg-verify (handle ctl)
852 (catch 'error 853 (catch 'error
853 (let ((inhibit-redisplay t) 854 (let ((inhibit-redisplay t)
854 context plain signature-file part signature) 855 context part signature) ;; plain signature-file
855 (when (or (null (setq part (mm-find-raw-part-by-type 856 (when (or (null (setq part (mm-find-raw-part-by-type
856 ctl (or (mm-handle-multipart-ctl-parameter 857 ctl (or (mm-handle-multipart-ctl-parameter
857 ctl 'protocol) 858 ctl 'protocol)
@@ -866,7 +867,8 @@ If set, it overrides the setting of `mml2015-sign-with-sender'."
866 signature (mm-get-part signature) 867 signature (mm-get-part signature)
867 context (epg-make-context)) 868 context (epg-make-context))
868 (condition-case error 869 (condition-case error
869 (setq plain (epg-verify-string context signature part)) 870 ;; (setq plain
871 (epg-verify-string context signature part) ;;)
870 (error 872 (error
871 (mm-sec-error 'gnus-info "Failed") 873 (mm-sec-error 'gnus-info "Failed")
872 (mm-sec-status 'gnus-details (if (eq (car error) 'quit) 874 (mm-sec-status 'gnus-details (if (eq (car error) 'quit)
@@ -978,7 +980,7 @@ If set, it overrides the setting of `mml2015-sign-with-sender'."
978 handle))) 980 handle)))
979 981
980;;;###autoload 982;;;###autoload
981(defun mml2015-decrypt-test (handle ctl) 983(defun mml2015-decrypt-test (_handle _ctl)
982 mml2015-use) 984 mml2015-use)
983 985
984;;;###autoload 986;;;###autoload
@@ -990,7 +992,7 @@ If set, it overrides the setting of `mml2015-sign-with-sender'."
990 handle))) 992 handle)))
991 993
992;;;###autoload 994;;;###autoload
993(defun mml2015-verify-test (handle ctl) 995(defun mml2015-verify-test (_handle _ctl)
994 mml2015-use) 996 mml2015-use)
995 997
996;;;###autoload 998;;;###autoload
diff --git a/lisp/gnus/nnagent.el b/lisp/gnus/nnagent.el
index 1f21eee8680..76a7e21567a 100644
--- a/lisp/gnus/nnagent.el
+++ b/lisp/gnus/nnagent.el
@@ -1,4 +1,4 @@
1;;; nnagent.el --- offline backend for Gnus 1;;; nnagent.el --- offline backend for Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1997-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1997-2021 Free Software Foundation, Inc.
4 4
@@ -86,7 +86,7 @@
86 server dir) 86 server dir)
87 t)))) 87 t))))
88 88
89(deffoo nnagent-retrieve-groups (groups &optional server) 89(deffoo nnagent-retrieve-groups (_groups &optional _server)
90 (save-excursion 90 (save-excursion
91 (cond 91 (cond
92 ((file-exists-p (gnus-agent-lib-file "groups")) 92 ((file-exists-p (gnus-agent-lib-file "groups"))
@@ -106,13 +106,13 @@
106 (funcall (gnus-get-function gnus-command-method 'request-type) 106 (funcall (gnus-get-function gnus-command-method 'request-type)
107 (gnus-group-real-name group) article))))) 107 (gnus-group-real-name group) article)))))
108 108
109(deffoo nnagent-request-newgroups (date server) 109(deffoo nnagent-request-newgroups (_date _server)
110 nil) 110 nil)
111 111
112(deffoo nnagent-request-update-info (group info &optional server) 112(deffoo nnagent-request-update-info (_group _info &optional _server)
113 nil) 113 nil)
114 114
115(deffoo nnagent-request-post (&optional server) 115(deffoo nnagent-request-post (&optional _server)
116 (gnus-agent-insert-meta-information 'news gnus-command-method) 116 (gnus-agent-insert-meta-information 'news gnus-command-method)
117 (gnus-request-accept-article "nndraft:queue" nil t t)) 117 (gnus-request-accept-article "nndraft:queue" nil t t))
118 118
@@ -184,7 +184,7 @@
184 t) 184 t)
185 'nov))) 185 'nov)))
186 186
187(deffoo nnagent-request-expire-articles (articles group &optional server force) 187(deffoo nnagent-request-expire-articles (articles _group &optional _server _force)
188 articles) 188 articles)
189 189
190(deffoo nnagent-request-group (group &optional server dont-check info) 190(deffoo nnagent-request-group (group &optional server dont-check info)
@@ -249,7 +249,7 @@
249 (nnoo-parent-function 'nnagent 'nnml-request-regenerate 249 (nnoo-parent-function 'nnagent 'nnml-request-regenerate
250 (list (nnagent-server server)))) 250 (list (nnagent-server server))))
251 251
252(deffoo nnagent-retrieve-group-data-early (server infos) 252(deffoo nnagent-retrieve-group-data-early (_server _infos)
253 nil) 253 nil)
254 254
255;; Use nnml functions for just about everything. 255;; Use nnml functions for just about everything.
diff --git a/lisp/gnus/nnbabyl.el b/lisp/gnus/nnbabyl.el
index 41f7f62fae6..3e6f9e88eea 100644
--- a/lisp/gnus/nnbabyl.el
+++ b/lisp/gnus/nnbabyl.el
@@ -1,4 +1,4 @@
1;;; nnbabyl.el --- rmail mbox access for Gnus 1;;; nnbabyl.el --- rmail mbox access for Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1995-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1995-2021 Free Software Foundation, Inc.
4 4
@@ -70,7 +70,7 @@
70 70
71(nnoo-define-basics nnbabyl) 71(nnoo-define-basics nnbabyl)
72 72
73(deffoo nnbabyl-retrieve-headers (articles &optional group server fetch-old) 73(deffoo nnbabyl-retrieve-headers (articles &optional group server _fetch-old)
74 (with-current-buffer nntp-server-buffer 74 (with-current-buffer nntp-server-buffer
75 (erase-buffer) 75 (erase-buffer)
76 (let ((number (length articles)) 76 (let ((number (length articles))
@@ -185,7 +185,7 @@
185 (cons nnbabyl-current-group article) 185 (cons nnbabyl-current-group article)
186 (nnbabyl-article-group-number))))))) 186 (nnbabyl-article-group-number)))))))
187 187
188(deffoo nnbabyl-request-group (group &optional server dont-check info) 188(deffoo nnbabyl-request-group (group &optional server dont-check _info)
189 (let ((active (cadr (assoc group nnbabyl-group-alist)))) 189 (let ((active (cadr (assoc group nnbabyl-group-alist))))
190 (save-excursion 190 (save-excursion
191 (cond 191 (cond
@@ -224,10 +224,10 @@
224 (insert-buffer-substring in-buf))) 224 (insert-buffer-substring in-buf)))
225 (nnmail-save-active nnbabyl-group-alist nnbabyl-active-file)))) 225 (nnmail-save-active nnbabyl-group-alist nnbabyl-active-file))))
226 226
227(deffoo nnbabyl-close-group (group &optional server) 227(deffoo nnbabyl-close-group (_group &optional _server)
228 t) 228 t)
229 229
230(deffoo nnbabyl-request-create-group (group &optional server args) 230(deffoo nnbabyl-request-create-group (group &optional _server _args)
231 (nnmail-activate 'nnbabyl) 231 (nnmail-activate 'nnbabyl)
232 (unless (assoc group nnbabyl-group-alist) 232 (unless (assoc group nnbabyl-group-alist)
233 (push (list group (cons 1 0)) 233 (push (list group (cons 1 0))
@@ -235,18 +235,20 @@
235 (nnmail-save-active nnbabyl-group-alist nnbabyl-active-file)) 235 (nnmail-save-active nnbabyl-group-alist nnbabyl-active-file))
236 t) 236 t)
237 237
238(deffoo nnbabyl-request-list (&optional server) 238(deffoo nnbabyl-request-list (&optional _server)
239 (save-excursion 239 (save-excursion
240 (nnmail-find-file nnbabyl-active-file) 240 (nnmail-find-file nnbabyl-active-file)
241 (setq nnbabyl-group-alist (nnmail-get-active)) 241 (setq nnbabyl-group-alist (nnmail-get-active))
242 t)) 242 t))
243 243
244(deffoo nnbabyl-request-newgroups (date &optional server) 244(deffoo nnbabyl-request-newgroups (_date &optional server)
245 (nnbabyl-request-list server)) 245 (nnbabyl-request-list server))
246 246
247(deffoo nnbabyl-request-list-newsgroups (&optional server) 247(deffoo nnbabyl-request-list-newsgroups (&optional _server)
248 (nnheader-report 'nnbabyl "nnbabyl: LIST NEWSGROUPS is not implemented.")) 248 (nnheader-report 'nnbabyl "nnbabyl: LIST NEWSGROUPS is not implemented."))
249 249
250(defvar nnml-current-directory)
251
250(deffoo nnbabyl-request-expire-articles 252(deffoo nnbabyl-request-expire-articles
251 (articles newsgroup &optional server force) 253 (articles newsgroup &optional server force)
252 (nnbabyl-possibly-change-newsgroup newsgroup server) 254 (nnbabyl-possibly-change-newsgroup newsgroup server)
@@ -293,7 +295,7 @@
293 (nconc rest articles)))) 295 (nconc rest articles))))
294 296
295(deffoo nnbabyl-request-move-article 297(deffoo nnbabyl-request-move-article
296 (article group server accept-form &optional last move-is-internal) 298 (article group server accept-form &optional last _move-is-internal)
297 (let ((buf (gnus-get-buffer-create " *nnbabyl move*")) 299 (let ((buf (gnus-get-buffer-create " *nnbabyl move*"))
298 result) 300 result)
299 (and 301 (and
@@ -305,7 +307,7 @@
305 "^X-Gnus-Newsgroup:" 307 "^X-Gnus-Newsgroup:"
306 (save-excursion (search-forward "\n\n" nil t) (point)) t) 308 (save-excursion (search-forward "\n\n" nil t) (point)) t)
307 (delete-region (point-at-bol) (progn (forward-line 1) (point)))) 309 (delete-region (point-at-bol) (progn (forward-line 1) (point))))
308 (setq result (eval accept-form)) 310 (setq result (eval accept-form t))
309 (kill-buffer (current-buffer)) 311 (kill-buffer (current-buffer))
310 result) 312 result)
311 (save-excursion 313 (save-excursion
diff --git a/lisp/gnus/nndiary.el b/lisp/gnus/nndiary.el
index 60ef6e9b8ed..15003fabcd2 100644
--- a/lisp/gnus/nndiary.el
+++ b/lisp/gnus/nndiary.el
@@ -1,4 +1,4 @@
1;;; nndiary.el --- A diary back end for Gnus 1;;; nndiary.el --- A diary back end for Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1999-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1999-2021 Free Software Foundation, Inc.
4 4
@@ -469,7 +469,7 @@ all. This may very well take some time.")
469 (cons (if group-num (car group-num) group) 469 (cons (if group-num (car group-num) group)
470 (string-to-number (file-name-nondirectory path))))))) 470 (string-to-number (file-name-nondirectory path)))))))
471 471
472(deffoo nndiary-request-group (group &optional server dont-check info) 472(deffoo nndiary-request-group (group &optional server dont-check _info)
473 (let ((file-name-coding-system nnmail-pathname-coding-system)) 473 (let ((file-name-coding-system nnmail-pathname-coding-system))
474 (cond 474 (cond
475 ((not (nndiary-possibly-change-directory group server)) 475 ((not (nndiary-possibly-change-directory group server))
@@ -503,11 +503,11 @@ all. This may very well take some time.")
503 (nndiary-possibly-change-directory group server) 503 (nndiary-possibly-change-directory group server)
504 (nnmail-get-new-mail 'nndiary 'nndiary-save-nov nndiary-directory group))) 504 (nnmail-get-new-mail 'nndiary 'nndiary-save-nov nndiary-directory group)))
505 505
506(deffoo nndiary-close-group (group &optional server) 506(deffoo nndiary-close-group (_group &optional _server)
507 (setq nndiary-article-file-alist nil) 507 (setq nndiary-article-file-alist nil)
508 t) 508 t)
509 509
510(deffoo nndiary-request-create-group (group &optional server args) 510(deffoo nndiary-request-create-group (group &optional server _args)
511 (nndiary-possibly-change-directory nil server) 511 (nndiary-possibly-change-directory nil server)
512 (nnmail-activate 'nndiary) 512 (nnmail-activate 'nndiary)
513 (cond 513 (cond
@@ -535,7 +535,7 @@ all. This may very well take some time.")
535 t)) 535 t))
536 )) 536 ))
537 537
538(deffoo nndiary-request-list (&optional server) 538(deffoo nndiary-request-list (&optional _server)
539 (save-excursion 539 (save-excursion
540 (let ((nnmail-file-coding-system nnmail-active-file-coding-system) 540 (let ((nnmail-file-coding-system nnmail-active-file-coding-system)
541 (file-name-coding-system nnmail-pathname-coding-system)) 541 (file-name-coding-system nnmail-pathname-coding-system))
@@ -543,10 +543,10 @@ all. This may very well take some time.")
543 (setq nndiary-group-alist (nnmail-get-active)) 543 (setq nndiary-group-alist (nnmail-get-active))
544 t)) 544 t))
545 545
546(deffoo nndiary-request-newgroups (date &optional server) 546(deffoo nndiary-request-newgroups (_date &optional server)
547 (nndiary-request-list server)) 547 (nndiary-request-list server))
548 548
549(deffoo nndiary-request-list-newsgroups (&optional server) 549(deffoo nndiary-request-list-newsgroups (&optional _server)
550 (save-excursion 550 (save-excursion
551 (nnmail-find-file nndiary-newsgroups-file))) 551 (nnmail-find-file nndiary-newsgroups-file)))
552 552
@@ -590,7 +590,7 @@ all. This may very well take some time.")
590 (nconc rest articles))) 590 (nconc rest articles)))
591 591
592(deffoo nndiary-request-move-article 592(deffoo nndiary-request-move-article
593 (article group server accept-form &optional last move-is-internal) 593 (article group server accept-form &optional last _move-is-internal)
594 (let ((buf (gnus-get-buffer-create " *nndiary move*")) 594 (let ((buf (gnus-get-buffer-create " *nndiary move*"))
595 result) 595 result)
596 (nndiary-possibly-change-directory group server) 596 (nndiary-possibly-change-directory group server)
@@ -603,7 +603,7 @@ all. This may very well take some time.")
603 nndiary-article-file-alist) 603 nndiary-article-file-alist)
604 (with-current-buffer buf 604 (with-current-buffer buf
605 (insert-buffer-substring nntp-server-buffer) 605 (insert-buffer-substring nntp-server-buffer)
606 (setq result (eval accept-form)) 606 (setq result (eval accept-form t))
607 (kill-buffer (current-buffer)) 607 (kill-buffer (current-buffer))
608 result)) 608 result))
609 (progn 609 (progn
@@ -766,7 +766,7 @@ all. This may very well take some time.")
766 766
767;;; Interface optional functions ============================================ 767;;; Interface optional functions ============================================
768 768
769(deffoo nndiary-request-update-info (group info &optional server) 769(deffoo nndiary-request-update-info (group info &optional _server)
770 (nndiary-possibly-change-directory group) 770 (nndiary-possibly-change-directory group)
771 (let ((timestamp (gnus-group-parameter-value (gnus-info-params info) 771 (let ((timestamp (gnus-group-parameter-value (gnus-info-params info)
772 'timestamp t))) 772 'timestamp t)))
@@ -1033,6 +1033,8 @@ all. This may very well take some time.")
1033 ;; Save the active file. 1033 ;; Save the active file.
1034 (nnmail-save-active nndiary-group-alist nndiary-active-file)) 1034 (nnmail-save-active nndiary-group-alist nndiary-active-file))
1035 1035
1036(defvar nndiary-files) ; dynamically bound in nndiary-generate-nov-databases-1
1037
1036(defun nndiary-generate-nov-databases-1 (dir &optional seen no-active) 1038(defun nndiary-generate-nov-databases-1 (dir &optional seen no-active)
1037 "Regenerate the NOV database in DIR." 1039 "Regenerate the NOV database in DIR."
1038 (interactive "DRegenerate NOV in: ") 1040 (interactive "DRegenerate NOV in: ")
@@ -1062,7 +1064,6 @@ all. This may very well take some time.")
1062 (unless no-active 1064 (unless no-active
1063 (nnmail-save-active nndiary-group-alist nndiary-active-file)))))) 1065 (nnmail-save-active nndiary-group-alist nndiary-active-file))))))
1064 1066
1065(defvar nndiary-files) ; dynamically bound in nndiary-generate-nov-databases-1
1066(defun nndiary-generate-active-info (dir) 1067(defun nndiary-generate-active-info (dir)
1067 ;; Update the active info for this group. 1068 ;; Update the active info for this group.
1068 (let* ((group (nnheader-file-to-group 1069 (let* ((group (nnheader-file-to-group
diff --git a/lisp/gnus/nndir.el b/lisp/gnus/nndir.el
index 46351d0004f..bfc22836583 100644
--- a/lisp/gnus/nndir.el
+++ b/lisp/gnus/nndir.el
@@ -1,4 +1,4 @@
1;;; nndir.el --- single directory newsgroup access for Gnus 1;;; nndir.el --- single directory newsgroup access for Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1995-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1995-2021 Free Software Foundation, Inc.
4 4
diff --git a/lisp/gnus/nndoc.el b/lisp/gnus/nndoc.el
index dccf6c1ffb7..172433ef3b8 100644
--- a/lisp/gnus/nndoc.el
+++ b/lisp/gnus/nndoc.el
@@ -1,4 +1,4 @@
1;;; nndoc.el --- single file access for Gnus 1;;; nndoc.el --- single file access for Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1995-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1995-2021 Free Software Foundation, Inc.
4 4
@@ -225,7 +225,7 @@ from the document.")
225 225
226(nnoo-define-basics nndoc) 226(nnoo-define-basics nndoc)
227 227
228(deffoo nndoc-retrieve-headers (articles &optional newsgroup server fetch-old) 228(deffoo nndoc-retrieve-headers (articles &optional newsgroup server _fetch-old)
229 (when (nndoc-possibly-change-buffer newsgroup server) 229 (when (nndoc-possibly-change-buffer newsgroup server)
230 (with-current-buffer nntp-server-buffer 230 (with-current-buffer nntp-server-buffer
231 (erase-buffer) 231 (erase-buffer)
@@ -280,7 +280,7 @@ from the document.")
280 (funcall nndoc-article-transform-function article)) 280 (funcall nndoc-article-transform-function article))
281 t)))))) 281 t))))))
282 282
283(deffoo nndoc-request-group (group &optional server dont-check info) 283(deffoo nndoc-request-group (group &optional server dont-check _info)
284 "Select news GROUP." 284 "Select news GROUP."
285 (let (number) 285 (let (number)
286 (cond 286 (cond
@@ -301,7 +301,7 @@ from the document.")
301 (nndoc-request-group group server)) 301 (nndoc-request-group group server))
302 t) 302 t)
303 303
304(deffoo nndoc-request-type (group &optional article) 304(deffoo nndoc-request-type (_group &optional article)
305 (cond ((not article) 'unknown) 305 (cond ((not article) 'unknown)
306 (nndoc-post-type nndoc-post-type) 306 (nndoc-post-type nndoc-post-type)
307 (t 'unknown))) 307 (t 'unknown)))
@@ -317,19 +317,19 @@ from the document.")
317 (setq nndoc-dissection-alist nil) 317 (setq nndoc-dissection-alist nil)
318 t) 318 t)
319 319
320(deffoo nndoc-request-list (&optional server) 320(deffoo nndoc-request-list (&optional _server)
321 t) 321 t)
322 322
323(deffoo nndoc-request-newgroups (date &optional server) 323(deffoo nndoc-request-newgroups (_date &optional _server)
324 nil) 324 nil)
325 325
326(deffoo nndoc-request-list-newsgroups (&optional server) 326(deffoo nndoc-request-list-newsgroups (&optional _server)
327 nil) 327 nil)
328 328
329 329
330;;; Internal functions. 330;;; Internal functions.
331 331
332(defun nndoc-possibly-change-buffer (group source) 332(defun nndoc-possibly-change-buffer (group _source)
333 (let (buf) 333 (let (buf)
334 (cond 334 (cond
335 ;; The current buffer is this group's buffer. 335 ;; The current buffer is this group's buffer.
@@ -677,7 +677,7 @@ from the document.")
677 (search-forward "\ncommit " nil t) 677 (search-forward "\ncommit " nil t)
678 (search-forward "\nAuthor: " nil t))) 678 (search-forward "\nAuthor: " nil t)))
679 679
680(defun nndoc-transform-git-article (article) 680(defun nndoc-transform-git-article (_article)
681 (goto-char (point-min)) 681 (goto-char (point-min))
682 (when (re-search-forward "^Author: " nil t) 682 (when (re-search-forward "^Author: " nil t)
683 (replace-match "From: " t t))) 683 (replace-match "From: " t t)))
@@ -701,7 +701,7 @@ from the document.")
701 (re-search-forward "^\\\\\\\\\n\\(Paper\\( (\\*cross-listing\\*)\\)?: [a-zA-Z\\.-]+/[0-9]+\\|arXiv:\\)" nil t)) 701 (re-search-forward "^\\\\\\\\\n\\(Paper\\( (\\*cross-listing\\*)\\)?: [a-zA-Z\\.-]+/[0-9]+\\|arXiv:\\)" nil t))
702 t)) 702 t))
703 703
704(defun nndoc-transform-lanl-gov-announce (article) 704(defun nndoc-transform-lanl-gov-announce (_article)
705 (let ((case-fold-search nil)) 705 (let ((case-fold-search nil))
706 (goto-char (point-max)) 706 (goto-char (point-max))
707 (when (re-search-backward "^\\\\\\\\ +( *\\([^ ]*\\) , *\\([^ ]*\\))" nil t) 707 (when (re-search-backward "^\\\\\\\\ +( *\\([^ ]*\\) , *\\([^ ]*\\))" nil t)
@@ -858,7 +858,7 @@ from the document.")
858 nil) 858 nil)
859 (goto-char point)))) 859 (goto-char point))))
860 860
861(deffoo nndoc-request-accept-article (group &optional server last) 861(deffoo nndoc-request-accept-article (_group &optional _server _last)
862 nil) 862 nil)
863 863
864;;; 864;;;
diff --git a/lisp/gnus/nndraft.el b/lisp/gnus/nndraft.el
index e636636a174..394b6fcc4fc 100644
--- a/lisp/gnus/nndraft.el
+++ b/lisp/gnus/nndraft.el
@@ -1,4 +1,4 @@
1;;; nndraft.el --- draft article access for Gnus 1;;; nndraft.el --- draft article access for Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1995-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1995-2021 Free Software Foundation, Inc.
4 4
@@ -79,7 +79,7 @@ are generated if and only if they are also in `message-draft-headers'."
79 server nndraft-directory) 79 server nndraft-directory)
80 t))) 80 t)))
81 81
82(deffoo nndraft-retrieve-headers (articles &optional group server fetch-old) 82(deffoo nndraft-retrieve-headers (articles &optional group server _fetch-old)
83 (nndraft-possibly-change-group group) 83 (nndraft-possibly-change-group group)
84 (with-current-buffer nntp-server-buffer 84 (with-current-buffer nntp-server-buffer
85 (erase-buffer) 85 (erase-buffer)
@@ -108,7 +108,7 @@ are generated if and only if they are also in `message-draft-headers'."
108 (nnheader-fold-continuation-lines) 108 (nnheader-fold-continuation-lines)
109 'headers)))) 109 'headers))))
110 110
111(deffoo nndraft-request-article (id &optional group server buffer) 111(deffoo nndraft-request-article (id &optional group _server buffer)
112 (nndraft-possibly-change-group group) 112 (nndraft-possibly-change-group group)
113 (when (numberp id) 113 (when (numberp id)
114 ;; We get the newest file of the auto-saved file and the 114 ;; We get the newest file of the auto-saved file and the
@@ -145,7 +145,7 @@ are generated if and only if they are also in `message-draft-headers'."
145 ;;(message-remove-header "date") 145 ;;(message-remove-header "date")
146 t)) 146 t))
147 147
148(deffoo nndraft-request-update-info (group info &optional server) 148(deffoo nndraft-request-update-info (group info &optional _server)
149 (nndraft-possibly-change-group group) 149 (nndraft-possibly-change-group group)
150 (setf (gnus-info-read info) 150 (setf (gnus-info-read info)
151 (gnus-update-read-articles 151 (gnus-update-read-articles
@@ -210,7 +210,7 @@ are generated if and only if they are also in `message-draft-headers'."
210 'exit 'postpone 'kill) 210 'exit 'postpone 'kill)
211 article)) 211 article))
212 212
213(deffoo nndraft-request-group (group &optional server dont-check info) 213(deffoo nndraft-request-group (group &optional server dont-check _info)
214 (nndraft-possibly-change-group group) 214 (nndraft-possibly-change-group group)
215 (unless dont-check 215 (unless dont-check
216 (let* ((pathname (nnmail-group-pathname group nndraft-directory)) 216 (let* ((pathname (nnmail-group-pathname group nndraft-directory))
@@ -229,7 +229,7 @@ are generated if and only if they are also in `message-draft-headers'."
229 (list group server dont-check))) 229 (list group server dont-check)))
230 230
231(deffoo nndraft-request-move-article (article group server accept-form 231(deffoo nndraft-request-move-article (article group server accept-form
232 &optional last move-is-internal) 232 &optional _last _move-is-internal)
233 (nndraft-possibly-change-group group) 233 (nndraft-possibly-change-group group)
234 (let ((buf (gnus-get-buffer-create " *nndraft move*")) 234 (let ((buf (gnus-get-buffer-create " *nndraft move*"))
235 result) 235 result)
@@ -238,7 +238,7 @@ are generated if and only if they are also in `message-draft-headers'."
238 (with-current-buffer buf 238 (with-current-buffer buf
239 (erase-buffer) 239 (erase-buffer)
240 (insert-buffer-substring nntp-server-buffer) 240 (insert-buffer-substring nntp-server-buffer)
241 (setq result (eval accept-form)) 241 (setq result (eval accept-form t))
242 (kill-buffer (current-buffer)) 242 (kill-buffer (current-buffer))
243 result) 243 result)
244 (null (nndraft-request-expire-articles (list article) group server 'force)) 244 (null (nndraft-request-expire-articles (list article) group server 'force))
@@ -292,7 +292,7 @@ are generated if and only if they are also in `message-draft-headers'."
292 (nnoo-parent-function 'nndraft 'nnmh-request-replace-article 292 (nnoo-parent-function 'nndraft 'nnmh-request-replace-article
293 (list article group buffer)))) 293 (list article group buffer))))
294 294
295(deffoo nndraft-request-create-group (group &optional server args) 295(deffoo nndraft-request-create-group (group &optional _server _args)
296 (nndraft-possibly-change-group group) 296 (nndraft-possibly-change-group group)
297 (if (file-exists-p nndraft-current-directory) 297 (if (file-exists-p nndraft-current-directory)
298 (if (file-directory-p nndraft-current-directory) 298 (if (file-directory-p nndraft-current-directory)
diff --git a/lisp/gnus/nneething.el b/lisp/gnus/nneething.el
index 014ad3adfb1..d881d6ce055 100644
--- a/lisp/gnus/nneething.el
+++ b/lisp/gnus/nneething.el
@@ -1,4 +1,4 @@
1;;; nneething.el --- arbitrary file access for Gnus 1;;; nneething.el --- arbitrary file access for Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1995-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1995-2021 Free Software Foundation, Inc.
4 4
@@ -77,7 +77,7 @@ included.")
77 77
78(nnoo-define-basics nneething) 78(nnoo-define-basics nneething)
79 79
80(deffoo nneething-retrieve-headers (articles &optional group server fetch-old) 80(deffoo nneething-retrieve-headers (articles &optional group _server _fetch-old)
81 (nneething-possibly-change-directory group) 81 (nneething-possibly-change-directory group)
82 82
83 (with-current-buffer nntp-server-buffer 83 (with-current-buffer nntp-server-buffer
@@ -114,7 +114,7 @@ included.")
114 (nnheader-fold-continuation-lines) 114 (nnheader-fold-continuation-lines)
115 'headers)))) 115 'headers))))
116 116
117(deffoo nneething-request-article (id &optional group server buffer) 117(deffoo nneething-request-article (id &optional group _server buffer)
118 (nneething-possibly-change-directory group) 118 (nneething-possibly-change-directory group)
119 (let ((file (unless (stringp id) 119 (let ((file (unless (stringp id)
120 (nneething-file-name id))) 120 (nneething-file-name id)))
@@ -143,7 +143,7 @@ included.")
143 (insert "\n")) 143 (insert "\n"))
144 t)))) 144 t))))
145 145
146(deffoo nneething-request-group (group &optional server dont-check info) 146(deffoo nneething-request-group (group &optional server dont-check _info)
147 (nneething-possibly-change-directory group server) 147 (nneething-possibly-change-directory group server)
148 (unless dont-check 148 (unless dont-check
149 (nneething-create-mapping) 149 (nneething-create-mapping)
@@ -156,16 +156,16 @@ included.")
156 group))) 156 group)))
157 t) 157 t)
158 158
159(deffoo nneething-request-list (&optional server dir) 159(deffoo nneething-request-list (&optional _server _dir)
160 (nnheader-report 'nneething "LIST is not implemented.")) 160 (nnheader-report 'nneething "LIST is not implemented."))
161 161
162(deffoo nneething-request-newgroups (date &optional server) 162(deffoo nneething-request-newgroups (_date &optional _server)
163 (nnheader-report 'nneething "NEWSGROUPS is not implemented.")) 163 (nnheader-report 'nneething "NEWSGROUPS is not implemented."))
164 164
165(deffoo nneething-request-type (group &optional article) 165(deffoo nneething-request-type (_group &optional _article)
166 'unknown) 166 'unknown)
167 167
168(deffoo nneething-close-group (group &optional server) 168(deffoo nneething-close-group (_group &optional _server)
169 (setq nneething-current-directory nil) 169 (setq nneething-current-directory nil)
170 t) 170 t)
171 171
diff --git a/lisp/gnus/nnfolder.el b/lisp/gnus/nnfolder.el
index 70e15c57130..1dd784d5a5b 100644
--- a/lisp/gnus/nnfolder.el
+++ b/lisp/gnus/nnfolder.el
@@ -1,4 +1,4 @@
1;;; nnfolder.el --- mail folder access for Gnus 1;;; nnfolder.el --- mail folder access for Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1995-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1995-2021 Free Software Foundation, Inc.
4 4
@@ -261,7 +261,7 @@ all. This may very well take some time.")
261 (point) (point-at-eol))) 261 (point) (point-at-eol)))
262 -1)))))))) 262 -1))))))))
263 263
264(deffoo nnfolder-request-group (group &optional server dont-check info) 264(deffoo nnfolder-request-group (group &optional server dont-check _info)
265 (nnfolder-possibly-change-group group server t) 265 (nnfolder-possibly-change-group group server t)
266 (save-excursion 266 (save-excursion
267 (cond ((not (assoc group nnfolder-group-alist)) 267 (cond ((not (assoc group nnfolder-group-alist))
@@ -314,7 +314,7 @@ all. This may very well take some time.")
314;; over the buffer again unless we add new mail to it or modify it in some 314;; over the buffer again unless we add new mail to it or modify it in some
315;; way. 315;; way.
316 316
317(deffoo nnfolder-close-group (group &optional server force) 317(deffoo nnfolder-close-group (group &optional _server _force)
318 ;; Make sure we _had_ the group open. 318 ;; Make sure we _had_ the group open.
319 (when (or (assoc group nnfolder-buffer-alist) 319 (when (or (assoc group nnfolder-buffer-alist)
320 (equal group nnfolder-current-group)) 320 (equal group nnfolder-current-group))
@@ -342,7 +342,7 @@ all. This may very well take some time.")
342 nnfolder-current-buffer nil) 342 nnfolder-current-buffer nil)
343 t) 343 t)
344 344
345(deffoo nnfolder-request-create-group (group &optional server args) 345(deffoo nnfolder-request-create-group (group &optional server _args)
346 (nnfolder-possibly-change-group nil server) 346 (nnfolder-possibly-change-group nil server)
347 (nnmail-activate 'nnfolder) 347 (nnmail-activate 'nnfolder)
348 (cond ((zerop (length group)) 348 (cond ((zerop (length group))
@@ -369,7 +369,7 @@ all. This may very well take some time.")
369 (setq nnfolder-group-alist (nnmail-get-active))) 369 (setq nnfolder-group-alist (nnmail-get-active)))
370 t)) 370 t))
371 371
372(deffoo nnfolder-request-newgroups (date &optional server) 372(deffoo nnfolder-request-newgroups (_date &optional server)
373 (nnfolder-possibly-change-group nil server) 373 (nnfolder-possibly-change-group nil server)
374 (nnfolder-request-list server)) 374 (nnfolder-request-list server))
375 375
@@ -394,12 +394,13 @@ all. This may very well take some time.")
394 (let ((newnum (string-to-number (match-string 0)))) 394 (let ((newnum (string-to-number (match-string 0))))
395 (if (nnmail-within-headers-p) 395 (if (nnmail-within-headers-p)
396 (push newnum numbers)))) 396 (push newnum numbers))))
397 ;; The article numbers are increasing, so this result is sorted. 397 ;; The article numbers are increasing, so this result is sorted.
398 (nreverse numbers))))) 398 (nreverse numbers)))))
399 399
400(autoload 'gnus-request-group "gnus-int") 400(autoload 'gnus-request-group "gnus-int")
401(declare-function gnus-request-create-group "gnus-int" 401(declare-function gnus-request-create-group "gnus-int"
402 (group &optional gnus-command-method args)) 402 (group &optional gnus-command-method args))
403(defvar nnfolder-current-directory)
403 404
404(deffoo nnfolder-request-expire-articles (articles newsgroup 405(deffoo nnfolder-request-expire-articles (articles newsgroup
405 &optional server force) 406 &optional server force)
@@ -462,7 +463,7 @@ all. This may very well take some time.")
462 (gnus-sorted-difference articles (nreverse deleted-articles))))) 463 (gnus-sorted-difference articles (nreverse deleted-articles)))))
463 464
464(deffoo nnfolder-request-move-article (article group server accept-form 465(deffoo nnfolder-request-move-article (article group server accept-form
465 &optional last move-is-internal) 466 &optional last _move-is-internal)
466 (save-excursion 467 (save-excursion
467 (let ((buf (gnus-get-buffer-create " *nnfolder move*")) 468 (let ((buf (gnus-get-buffer-create " *nnfolder move*"))
468 result) 469 result)
@@ -477,7 +478,7 @@ all. This may very well take some time.")
477 (save-excursion (and (search-forward "\n\n" nil t) (point))) 478 (save-excursion (and (search-forward "\n\n" nil t) (point)))
478 t) 479 t)
479 (gnus-delete-line)) 480 (gnus-delete-line))
480 (setq result (eval accept-form)) 481 (setq result (eval accept-form t))
481 (kill-buffer buf) 482 (kill-buffer buf)
482 result) 483 result)
483 (save-excursion 484 (save-excursion
@@ -498,7 +499,7 @@ all. This may very well take some time.")
498 (save-excursion 499 (save-excursion
499 (nnfolder-possibly-change-group group server) 500 (nnfolder-possibly-change-group group server)
500 (nnmail-check-syntax) 501 (nnmail-check-syntax)
501 (let ((buf (current-buffer)) 502 (let (;; (buf (current-buffer))
502 result art-group) 503 result art-group)
503 (goto-char (point-min)) 504 (goto-char (point-min))
504 (when (looking-at "X-From-Line: ") 505 (when (looking-at "X-From-Line: ")
diff --git a/lisp/gnus/nngateway.el b/lisp/gnus/nngateway.el
index 15e4876642c..c10989aa1e9 100644
--- a/lisp/gnus/nngateway.el
+++ b/lisp/gnus/nngateway.el
@@ -1,4 +1,4 @@
1;;; nngateway.el --- posting news via mail gateways 1;;; nngateway.el --- posting news via mail gateways -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1996-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1996-2021 Free Software Foundation, Inc.
4 4
diff --git a/lisp/gnus/nnheader.el b/lisp/gnus/nnheader.el
index ae8506c5c20..708887cb9c7 100644
--- a/lisp/gnus/nnheader.el
+++ b/lisp/gnus/nnheader.el
@@ -1,4 +1,4 @@
1;;; nnheader.el --- header access macros for Gnus and its backends 1;;; nnheader.el --- header access macros for Gnus and its backends -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1987-1990, 1993-1998, 2000-2021 Free Software 3;; Copyright (C) 1987-1990, 1993-1998, 2000-2021 Free Software
4;; Foundation, Inc. 4;; Foundation, Inc.
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el
index 4a50f1127b9..f4f4ef89a9e 100644
--- a/lisp/gnus/nnimap.el
+++ b/lisp/gnus/nnimap.el
@@ -1,4 +1,4 @@
1;;; nnimap.el --- IMAP interface for Gnus 1;;; nnimap.el --- IMAP interface for Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 2010-2021 Free Software Foundation, Inc. 3;; Copyright (C) 2010-2021 Free Software Foundation, Inc.
4 4
@@ -1004,7 +1004,7 @@ during splitting, which may be slow."
1004 internal-move-group server message-id 1004 internal-move-group server message-id
1005 nnimap-request-articles-find-limit))))) 1005 nnimap-request-articles-find-limit)))))
1006 ;; Move the article to a different method. 1006 ;; Move the article to a different method.
1007 (when-let* ((result (eval accept-form))) 1007 (when-let* ((result (eval accept-form t)))
1008 (nnimap-change-group group server) 1008 (nnimap-change-group group server)
1009 (nnimap-delete-article article) 1009 (nnimap-delete-article article)
1010 result)))))) 1010 result))))))
@@ -1165,7 +1165,7 @@ If LIMIT, first try to limit the search to the N last articles."
1165 7 "Article marked for deletion, but not expunged.") 1165 7 "Article marked for deletion, but not expunged.")
1166 nil)))) 1166 nil))))
1167 1167
1168(deffoo nnimap-request-scan (&optional group server) 1168(deffoo nnimap-request-scan (&optional _group server)
1169 (when (and (nnimap-change-group nil server) 1169 (when (and (nnimap-change-group nil server)
1170 nnimap-inbox 1170 nnimap-inbox
1171 nnimap-split-methods) 1171 nnimap-split-methods)
diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el
index 251ae657bbf..ac56e8f4b9b 100644
--- a/lisp/gnus/nnmail.el
+++ b/lisp/gnus/nnmail.el
@@ -1,4 +1,4 @@
1;;; nnmail.el --- mail support functions for the Gnus mail backends 1;;; nnmail.el --- mail support functions for the Gnus mail backends -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1995-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1995-2021 Free Software Foundation, Inc.
4 4
@@ -598,7 +598,7 @@ These will be logged to the \"*nnmail split*\" buffer."
598 598
599 599
600 600
601(defun nnmail-request-post (&optional server) 601(defun nnmail-request-post (&optional _server)
602 (mail-send-and-exit nil)) 602 (mail-send-and-exit nil))
603 603
604(defvar nnmail-file-coding-system 'raw-text 604(defvar nnmail-file-coding-system 'raw-text
@@ -664,7 +664,7 @@ nn*-request-list should have been called before calling this function."
664 (let ((buffer (current-buffer)) 664 (let ((buffer (current-buffer))
665 group-assoc group max min) 665 group-assoc group max min)
666 (while (not (eobp)) 666 (while (not (eobp))
667 (condition-case err 667 (condition-case nil
668 (progn 668 (progn
669 (narrow-to-region (point) (point-at-eol)) 669 (narrow-to-region (point) (point-at-eol))
670 (setq group (read buffer) 670 (setq group (read buffer)
@@ -1332,7 +1332,7 @@ Eudora has a broken References line, but an OK In-Reply-To."
1332(declare-function gnus-activate-group "gnus-start" 1332(declare-function gnus-activate-group "gnus-start"
1333 (group &optional scan dont-check method dont-sub-check)) 1333 (group &optional scan dont-check method dont-sub-check))
1334 1334
1335(defun nnmail-do-request-post (accept-func &optional server) 1335(defun nnmail-do-request-post (accept-func &optional _server)
1336 "Utility function to directly post a message to an nnmail-derived group. 1336 "Utility function to directly post a message to an nnmail-derived group.
1337Calls ACCEPT-FUNC (which should be `nnchoke-request-accept-article') 1337Calls ACCEPT-FUNC (which should be `nnchoke-request-accept-article')
1338to actually put the message in the right group." 1338to actually put the message in the right group."
@@ -1397,7 +1397,7 @@ See the documentation for the variable `nnmail-split-fancy' for details."
1397 ;; Builtin : operation. 1397 ;; Builtin : operation.
1398 ((eq (car split) ':) 1398 ((eq (car split) ':)
1399 (nnmail-log-split split) 1399 (nnmail-log-split split)
1400 (nnmail-split-it (save-excursion (eval (cdr split))))) 1400 (nnmail-split-it (save-excursion (eval (cdr split) t))))
1401 1401
1402 ;; Builtin ! operation. 1402 ;; Builtin ! operation.
1403 ((eq (car split) '!) 1403 ((eq (car split) '!)
@@ -1783,7 +1783,7 @@ be called once per group or once for all groups."
1783 (assq 'directory mail-sources))) 1783 (assq 'directory mail-sources)))
1784 1784
1785(defun nnmail-get-new-mail-1 (method exit-func temp 1785(defun nnmail-get-new-mail-1 (method exit-func temp
1786 group in-group spool-func) 1786 group _in-group spool-func)
1787 (let* ((sources mail-sources) 1787 (let* ((sources mail-sources)
1788 fetching-sources 1788 fetching-sources
1789 (i 0) 1789 (i 0)
@@ -1918,7 +1918,7 @@ If TIME is nil, then return the cutoff time for oldness instead."
1918 (cdr group-art)) 1918 (cdr group-art))
1919 (gnus-group-mark-article-read target (cdr group-art)))))))) 1919 (gnus-group-mark-article-read target (cdr group-art))))))))
1920 1920
1921(defun nnmail-fancy-expiry-target (group) 1921(defun nnmail-fancy-expiry-target (_group)
1922 "Return a target expiry group determined by `nnmail-fancy-expiry-targets'." 1922 "Return a target expiry group determined by `nnmail-fancy-expiry-targets'."
1923 (let* (header 1923 (let* (header
1924 (case-fold-search nil) 1924 (case-fold-search nil)
diff --git a/lisp/gnus/nnmairix.el b/lisp/gnus/nnmairix.el
index 8b3ab40e225..a2de5e061e0 100644
--- a/lisp/gnus/nnmairix.el
+++ b/lisp/gnus/nnmairix.el
@@ -1,4 +1,4 @@
1;;; nnmairix.el --- Mairix back end for Gnus, the Emacs newsreader 1;;; nnmairix.el --- Mairix back end for Gnus, the Emacs newsreader -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 2007-2021 Free Software Foundation, Inc. 3;; Copyright (C) 2007-2021 Free Software Foundation, Inc.
4 4
@@ -404,7 +404,7 @@ Other back ends might or might not work.")
404 (setq nnmairix-current-server server) 404 (setq nnmairix-current-server server)
405 (nnoo-change-server 'nnmairix server definitions)) 405 (nnoo-change-server 'nnmairix server definitions))
406 406
407(deffoo nnmairix-request-group (group &optional server fast info) 407(deffoo nnmairix-request-group (group &optional server fast _info)
408 ;; Call mairix and request group on back end server 408 ;; Call mairix and request group on back end server
409 (when server (nnmairix-open-server server)) 409 (when server (nnmairix-open-server server))
410 (let* ((qualgroup (if server 410 (let* ((qualgroup (if server
@@ -417,7 +417,7 @@ Other back ends might or might not work.")
417 (backendmethod (gnus-server-to-method 417 (backendmethod (gnus-server-to-method
418 (format "%s:%s" (symbol-name nnmairix-backend) 418 (format "%s:%s" (symbol-name nnmairix-backend)
419 nnmairix-backend-server))) 419 nnmairix-backend-server)))
420 rval mfolder folderpath args) 420 rval mfolder folderpath) ;; args
421 (cond 421 (cond
422 ((not folder) 422 ((not folder)
423 ;; No folder parameter -> error 423 ;; No folder parameter -> error
@@ -497,12 +497,12 @@ Other back ends might or might not work.")
497 nil)))))) 497 nil))))))
498 498
499 499
500(deffoo nnmairix-request-create-group (group &optional server args) 500(deffoo nnmairix-request-create-group (group &optional server _args)
501 (let ((qualgroup (if server (gnus-group-prefixed-name group (list 'nnmairix server)) 501 (let ((qualgroup (if server (gnus-group-prefixed-name group (list 'nnmairix server))
502 group)) 502 group))
503 (exist t) 503 (exist t)
504 (count 0) 504 (count 0)
505 groupname info) 505 groupname) ;; info
506 (when server (nnmairix-open-server server)) 506 (when server (nnmairix-open-server server))
507 (gnus-group-add-parameter qualgroup '(query . nil)) 507 (gnus-group-add-parameter qualgroup '(query . nil))
508 (gnus-group-add-parameter qualgroup '(threads . nil)) 508 (gnus-group-add-parameter qualgroup '(threads . nil))
@@ -561,7 +561,7 @@ Other back ends might or might not work.")
561(deffoo nnmairix-request-list (&optional server) 561(deffoo nnmairix-request-list (&optional server)
562 (when server (nnmairix-open-server server)) 562 (when server (nnmairix-open-server server))
563 (if (nnmairix-call-backend "request-list" nnmairix-backend-server) 563 (if (nnmairix-call-backend "request-list" nnmairix-backend-server)
564 (let (cpoint cur qualgroup folder) 564 (let (cpoint cur qualgroup) ;; folder
565 (with-current-buffer nntp-server-buffer 565 (with-current-buffer nntp-server-buffer
566 (goto-char (point-min)) 566 (goto-char (point-min))
567 (setq cpoint (point)) 567 (setq cpoint (point))
@@ -590,7 +590,7 @@ Other back ends might or might not work.")
590 (nnmairix-open-server server)) 590 (nnmairix-open-server server))
591 (let* ((qualgroup (gnus-group-prefixed-name group (list 'nnmairix nnmairix-current-server))) 591 (let* ((qualgroup (gnus-group-prefixed-name group (list 'nnmairix nnmairix-current-server)))
592 (propmarks (gnus-group-get-parameter qualgroup 'propmarks)) 592 (propmarks (gnus-group-get-parameter qualgroup 'propmarks))
593 (propto (gnus-group-get-parameter qualgroup 'propto t)) 593 ;; (propto (gnus-group-get-parameter qualgroup 'propto t))
594 (corr (nnmairix-get-numcorr group server)) 594 (corr (nnmairix-get-numcorr group server))
595 (folder (nnmairix-get-backend-folder group server))) 595 (folder (nnmairix-get-backend-folder group server)))
596 (save-excursion 596 (save-excursion
@@ -598,7 +598,7 @@ Other back ends might or might not work.")
598 (let ((type (nth 1 cur)) 598 (let ((type (nth 1 cur))
599 (cmdmarks (nth 2 cur)) 599 (cmdmarks (nth 2 cur))
600 (range (gnus-uncompress-range (nth 0 cur))) 600 (range (gnus-uncompress-range (nth 0 cur)))
601 mid ogroup number method temp) 601 mid ogroup temp) ;; number method
602 (when (and corr 602 (when (and corr
603 (not (zerop (cadr corr)))) 603 (not (zerop (cadr corr))))
604 (setq range (mapcar (lambda (arg) 604 (setq range (mapcar (lambda (arg)
@@ -661,7 +661,7 @@ Other back ends might or might not work.")
661 (nnmairix-open-server server)) 661 (nnmairix-open-server server))
662 (let* ((qualgroup (gnus-group-prefixed-name group (list 'nnmairix nnmairix-current-server))) 662 (let* ((qualgroup (gnus-group-prefixed-name group (list 'nnmairix nnmairix-current-server)))
663 (propmarks (gnus-group-get-parameter qualgroup 'propmarks)) 663 (propmarks (gnus-group-get-parameter qualgroup 'propmarks))
664 method) 664 ) ;; method
665 (when (and propmarks 665 (when (and propmarks
666 nnmairix-marks-cache) 666 nnmairix-marks-cache)
667 (when (or (eq nnmairix-propagate-marks-upon-close t) 667 (when (or (eq nnmairix-propagate-marks-upon-close t)
@@ -690,7 +690,7 @@ Other back ends might or might not work.")
690 (corr (nnmairix-get-numcorr group server)) 690 (corr (nnmairix-get-numcorr group server))
691 (docorr (and corr (not (zerop (cadr corr))))) 691 (docorr (and corr (not (zerop (cadr corr)))))
692 (folderinfo `(,group 1 ((1 . 1)))) 692 (folderinfo `(,group 1 ((1 . 1))))
693 readrange marks) 693 ) ;; readrange marks
694 (when (and propmarks 694 (when (and propmarks
695 nnmairix-propagate-marks-to-nnmairix-groups) 695 nnmairix-propagate-marks-to-nnmairix-groups)
696 ;; these groups are not subscribed, so we have to ask the back end directly 696 ;; these groups are not subscribed, so we have to ask the back end directly
@@ -778,7 +778,7 @@ called interactively, user will be asked for parameters."
778 (interactive) 778 (interactive)
779 (let ((char-header nnmairix-interactive-query-parameters) 779 (let ((char-header nnmairix-interactive-query-parameters)
780 (server (nnmairix-backend-to-server gnus-current-select-method)) 780 (server (nnmairix-backend-to-server gnus-current-select-method))
781 query achar header finished group threads cq) 781 query achar header finished group threads) ;; cq
782 (when (or (not (gnus-buffer-live-p gnus-article-buffer)) 782 (when (or (not (gnus-buffer-live-p gnus-article-buffer))
783 (not (gnus-buffer-live-p gnus-summary-buffer))) 783 (not (gnus-buffer-live-p gnus-summary-buffer)))
784 (error "No article or summary buffer")) 784 (error "No article or summary buffer"))
@@ -796,7 +796,8 @@ called interactively, user will be asked for parameters."
796 (setq achar nil))) 796 (setq achar nil)))
797 (set-buffer gnus-article-buffer) 797 (set-buffer gnus-article-buffer)
798 (setq header nil) 798 (setq header nil)
799 (when (setq cq (nth 1 (assoc achar char-header))) 799 (when ;; (setq cq
800 (nth 1 (assoc achar char-header)) ;;)
800 (setq header 801 (setq header
801 (nnmairix-replace-illegal-chars 802 (nnmairix-replace-illegal-chars
802 (gnus-fetch-field (nth 1 (assoc achar char-header)))))) 803 (gnus-fetch-field (nth 1 (assoc achar char-header))))))
@@ -827,7 +828,7 @@ All necessary information will be queried from the user."
827 (hidden (and (string-match "^nn\\(imap\\|maildir\\)$" backend) 828 (hidden (and (string-match "^nn\\(imap\\|maildir\\)$" backend)
828 (y-or-n-p 829 (y-or-n-p
829 "Does the back end server work with maildir++ (i.e. hidden directories)? "))) 830 "Does the back end server work with maildir++ (i.e. hidden directories)? ")))
830 create) 831 ) ;; create
831 832
832 (apply (intern (format "%s-%s" backend "open-server")) 833 (apply (intern (format "%s-%s" backend "open-server"))
833 (list servername)) 834 (list servername))
@@ -1009,7 +1010,7 @@ before deleting a group on the back end. SERVER specifies nnmairix server."
1009 (if (nnmairix-open-server (nth 1 server)) 1010 (if (nnmairix-open-server (nth 1 server))
1010 (when (nnmairix-call-backend 1011 (when (nnmairix-call-backend
1011 "request-list" nnmairix-backend-server) 1012 "request-list" nnmairix-backend-server)
1012 (let (cur qualgroup folder) 1013 (let (cur qualgroup) ;; folder
1013 (with-current-buffer nntp-server-buffer 1014 (with-current-buffer nntp-server-buffer
1014 (goto-char (point-min)) 1015 (goto-char (point-min))
1015 (while (re-search-forward nnmairix-group-regexp (point-max) t) 1016 (while (re-search-forward nnmairix-group-regexp (point-max) t)
@@ -1172,7 +1173,7 @@ Marks propagation has to be enabled for this to work."
1172 (error "Not in a nnmairix group")) 1173 (error "Not in a nnmairix group"))
1173 (save-excursion 1174 (save-excursion
1174 (let ((mid (mail-header-message-id (gnus-summary-article-header))) 1175 (let ((mid (mail-header-message-id (gnus-summary-article-header)))
1175 groups cur) 1176 groups) ;; cur
1176 (when mid 1177 (when mid
1177 (setq groups (nnmairix-determine-original-group-from-registry mid)) 1178 (setq groups (nnmairix-determine-original-group-from-registry mid))
1178 (unless (or groups 1179 (unless (or groups
@@ -1299,7 +1300,7 @@ If ALL is t, return also the unopened/failed ones."
1299 "Return list of valid back end servers for nnmairix groups." 1300 "Return list of valid back end servers for nnmairix groups."
1300 (let ((alist gnus-opened-servers) 1301 (let ((alist gnus-opened-servers)
1301 (mairixservers (nnmairix-get-nnmairix-servers t)) 1302 (mairixservers (nnmairix-get-nnmairix-servers t))
1302 server mserver openedserver occ cur) 1303 server mserver openedserver occ) ;; cur
1303 ;; Get list of all nnmairix backends (i.e. backends which are 1304 ;; Get list of all nnmairix backends (i.e. backends which are
1304 ;; already occupied) 1305 ;; already occupied)
1305 (dolist (cur mairixservers) 1306 (dolist (cur mairixservers)
@@ -1393,7 +1394,7 @@ TYPE is either `nov' or `headers'."
1393 (let ((buf (gnus-get-buffer-create " *nnmairix buffer*")) 1394 (let ((buf (gnus-get-buffer-create " *nnmairix buffer*"))
1394 (corr (not (zerop numc))) 1395 (corr (not (zerop numc)))
1395 (name (buffer-name nntp-server-buffer)) 1396 (name (buffer-name nntp-server-buffer))
1396 header cur xref) 1397 cur xref) ;; header
1397 (with-current-buffer buf 1398 (with-current-buffer buf
1398 (erase-buffer) 1399 (erase-buffer)
1399 (set-buffer nntp-server-buffer) 1400 (set-buffer nntp-server-buffer)
@@ -1586,7 +1587,7 @@ search in raw mode."
1586 (when (not (gnus-buffer-live-p gnus-article-buffer)) 1587 (when (not (gnus-buffer-live-p gnus-article-buffer))
1587 (error "No article buffer available")) 1588 (error "No article buffer available"))
1588 (let ((server (nth 1 gnus-current-select-method)) 1589 (let ((server (nth 1 gnus-current-select-method))
1589 mid rval group allgroups) 1590 mid group allgroups) ;; rval
1590 ;; get message id 1591 ;; get message id
1591 (with-current-buffer gnus-article-buffer 1592 (with-current-buffer gnus-article-buffer
1592 (gnus-summary-toggle-header 1) 1593 (gnus-summary-toggle-header 1)
@@ -1817,10 +1818,10 @@ MVALUES may contain values from current article."
1817 (widget-create 'push-button 1818 (widget-create 'push-button
1818 :notify 1819 :notify
1819 (if mvalues 1820 (if mvalues
1820 (lambda (&rest ignore) 1821 (lambda (&rest _ignore)
1821 (nnmairix-widget-send-query nnmairix-widgets 1822 (nnmairix-widget-send-query nnmairix-widgets
1822 t)) 1823 t))
1823 (lambda (&rest ignore) 1824 (lambda (&rest _ignore)
1824 (nnmairix-widget-send-query nnmairix-widgets 1825 (nnmairix-widget-send-query nnmairix-widgets
1825 nil))) 1826 nil)))
1826 "Send Query") 1827 "Send Query")
@@ -1828,16 +1829,16 @@ MVALUES may contain values from current article."
1828 (widget-create 'push-button 1829 (widget-create 'push-button
1829 :notify 1830 :notify
1830 (if mvalues 1831 (if mvalues
1831 (lambda (&rest ignore) 1832 (lambda (&rest _ignore)
1832 (nnmairix-widget-create-group nnmairix-widgets 1833 (nnmairix-widget-create-group nnmairix-widgets
1833 t)) 1834 t))
1834 (lambda (&rest ignore) 1835 (lambda (&rest _ignore)
1835 (nnmairix-widget-create-group nnmairix-widgets 1836 (nnmairix-widget-create-group nnmairix-widgets
1836 nil))) 1837 nil)))
1837 "Create permanent group") 1838 "Create permanent group")
1838 (widget-insert " ") 1839 (widget-insert " ")
1839 (widget-create 'push-button 1840 (widget-create 'push-button
1840 :notify (lambda (&rest ignore) 1841 :notify (lambda (&rest _ignore)
1841 (kill-buffer nnmairix-customize-query-buffer)) 1842 (kill-buffer nnmairix-customize-query-buffer))
1842 "Cancel") 1843 "Cancel")
1843 (use-local-map widget-keymap) 1844 (use-local-map widget-keymap)
@@ -1912,7 +1913,7 @@ If WITHVALUES is t, query is based on current article."
1912(defun nnmairix-widget-create-query (&optional values) 1913(defun nnmairix-widget-create-query (&optional values)
1913 "Create widgets for creating mairix queries. 1914 "Create widgets for creating mairix queries.
1914Fill in VALUES if based on an article." 1915Fill in VALUES if based on an article."
1915 (let (allwidgets) 1916 ;;(let (allwidgets)
1916 (when (get-buffer nnmairix-customize-query-buffer) 1917 (when (get-buffer nnmairix-customize-query-buffer)
1917 (kill-buffer nnmairix-customize-query-buffer)) 1918 (kill-buffer nnmairix-customize-query-buffer))
1918 (switch-to-buffer nnmairix-customize-query-buffer) 1919 (switch-to-buffer nnmairix-customize-query-buffer)
@@ -1943,7 +1944,7 @@ Fill in VALUES if based on an article."
1943 (when (member 'threads nnmairix-widget-other) 1944 (when (member 'threads nnmairix-widget-other)
1944 (widget-insert "\n") 1945 (widget-insert "\n")
1945 (nnmairix-widget-add "Threads" 'checkbox nil)) 1946 (nnmairix-widget-add "Threads" 'checkbox nil))
1946 (widget-insert " Show full threads\n\n"))) 1947 (widget-insert " Show full threads\n\n")) ;; )
1947 1948
1948(defun nnmairix-widget-build-editable-fields (values) 1949(defun nnmairix-widget-build-editable-fields (values)
1949 "Build editable field widgets in `nnmairix-widget-fields-list'. 1950 "Build editable field widgets in `nnmairix-widget-fields-list'.
@@ -1960,7 +1961,7 @@ VALUES may contain values for editable fields from current article."
1960 (concat "c" field) 1961 (concat "c" field)
1961 (widget-create 'checkbox 1962 (widget-create 'checkbox
1962 :tag field 1963 :tag field
1963 :notify (lambda (widget &rest ignore) 1964 :notify (lambda (widget &rest _ignore)
1964 (nnmairix-widget-toggle-activate widget)) 1965 (nnmairix-widget-toggle-activate widget))
1965 nil))) 1966 nil)))
1966 (list 1967 (list
diff --git a/lisp/gnus/nnmbox.el b/lisp/gnus/nnmbox.el
index 92c7dde9c8f..66c22670b23 100644
--- a/lisp/gnus/nnmbox.el
+++ b/lisp/gnus/nnmbox.el
@@ -1,4 +1,4 @@
1;;; nnmbox.el --- mail mbox access for Gnus 1;;; nnmbox.el --- mail mbox access for Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1995-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1995-2021 Free Software Foundation, Inc.
4 4
@@ -76,7 +76,7 @@
76 76
77(nnoo-define-basics nnmbox) 77(nnoo-define-basics nnmbox)
78 78
79(deffoo nnmbox-retrieve-headers (sequence &optional newsgroup server fetch-old) 79(deffoo nnmbox-retrieve-headers (sequence &optional newsgroup server _fetch-old)
80 (with-current-buffer nntp-server-buffer 80 (with-current-buffer nntp-server-buffer
81 (erase-buffer) 81 (erase-buffer)
82 (let ((number (length sequence)) 82 (let ((number (length sequence))
@@ -168,7 +168,7 @@
168 (cons nnmbox-current-group article) 168 (cons nnmbox-current-group article)
169 (nnmbox-article-group-number nil)))))))) 169 (nnmbox-article-group-number nil))))))))
170 170
171(deffoo nnmbox-request-group (group &optional server dont-check info) 171(deffoo nnmbox-request-group (group &optional server dont-check _info)
172 (nnmbox-possibly-change-newsgroup nil server) 172 (nnmbox-possibly-change-newsgroup nil server)
173 (let ((active (cadr (assoc group nnmbox-group-alist)))) 173 (let ((active (cadr (assoc group nnmbox-group-alist))))
174 (cond 174 (cond
@@ -213,10 +213,10 @@
213 (insert-buffer-substring in-buf))) 213 (insert-buffer-substring in-buf)))
214 (nnmbox-save-active nnmbox-group-alist nnmbox-active-file)))) 214 (nnmbox-save-active nnmbox-group-alist nnmbox-active-file))))
215 215
216(deffoo nnmbox-close-group (group &optional server) 216(deffoo nnmbox-close-group (_group &optional _server)
217 t) 217 t)
218 218
219(deffoo nnmbox-request-create-group (group &optional server args) 219(deffoo nnmbox-request-create-group (group &optional _server _args)
220 (nnmail-activate 'nnmbox) 220 (nnmail-activate 'nnmbox)
221 (unless (assoc group nnmbox-group-alist) 221 (unless (assoc group nnmbox-group-alist)
222 (push (list group (cons 1 0)) 222 (push (list group (cons 1 0))
@@ -224,7 +224,7 @@
224 (nnmbox-save-active nnmbox-group-alist nnmbox-active-file)) 224 (nnmbox-save-active nnmbox-group-alist nnmbox-active-file))
225 t) 225 t)
226 226
227(deffoo nnmbox-request-list (&optional server) 227(deffoo nnmbox-request-list (&optional _server)
228 (save-excursion 228 (save-excursion
229 (let ((nnmail-file-coding-system 229 (let ((nnmail-file-coding-system
230 nnmbox-active-file-coding-system)) 230 nnmbox-active-file-coding-system))
@@ -232,12 +232,14 @@
232 (setq nnmbox-group-alist (nnmail-get-active)) 232 (setq nnmbox-group-alist (nnmail-get-active))
233 t)) 233 t))
234 234
235(deffoo nnmbox-request-newgroups (date &optional server) 235(deffoo nnmbox-request-newgroups (_date &optional server)
236 (nnmbox-request-list server)) 236 (nnmbox-request-list server))
237 237
238(deffoo nnmbox-request-list-newsgroups (&optional server) 238(deffoo nnmbox-request-list-newsgroups (&optional _server)
239 (nnheader-report 'nnmbox "LIST NEWSGROUPS is not implemented.")) 239 (nnheader-report 'nnmbox "LIST NEWSGROUPS is not implemented."))
240 240
241(defvar nnml-current-directory)
242
241(deffoo nnmbox-request-expire-articles 243(deffoo nnmbox-request-expire-articles
242 (articles newsgroup &optional server force) 244 (articles newsgroup &optional server force)
243 (nnmbox-possibly-change-newsgroup newsgroup server) 245 (nnmbox-possibly-change-newsgroup newsgroup server)
@@ -278,7 +280,7 @@
278 (nconc rest articles)))) 280 (nconc rest articles))))
279 281
280(deffoo nnmbox-request-move-article 282(deffoo nnmbox-request-move-article
281 (article group server accept-form &optional last move-is-internal) 283 (article group server accept-form &optional last _move-is-internal)
282 (let ((buf (gnus-get-buffer-create " *nnmbox move*")) 284 (let ((buf (gnus-get-buffer-create " *nnmbox move*"))
283 result) 285 result)
284 (and 286 (and
@@ -291,7 +293,7 @@
291 "^X-Gnus-Newsgroup:" 293 "^X-Gnus-Newsgroup:"
292 (save-excursion (search-forward "\n\n" nil t) (point)) t) 294 (save-excursion (search-forward "\n\n" nil t) (point)) t)
293 (gnus-delete-line)) 295 (gnus-delete-line))
294 (setq result (eval accept-form)) 296 (setq result (eval accept-form t))
295 (kill-buffer buf) 297 (kill-buffer buf)
296 result) 298 result)
297 (save-excursion 299 (save-excursion
diff --git a/lisp/gnus/nnmh.el b/lisp/gnus/nnmh.el
index 46abf46ce75..231583fae83 100644
--- a/lisp/gnus/nnmh.el
+++ b/lisp/gnus/nnmh.el
@@ -1,4 +1,4 @@
1;;; nnmh.el --- mhspool access for Gnus 1;;; nnmh.el --- mhspool access for Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1995-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1995-2021 Free Software Foundation, Inc.
4 4
@@ -72,7 +72,7 @@ as unread by Gnus.")
72 72
73(nnoo-define-basics nnmh) 73(nnoo-define-basics nnmh)
74 74
75(deffoo nnmh-retrieve-headers (articles &optional newsgroup server fetch-old) 75(deffoo nnmh-retrieve-headers (articles &optional newsgroup server _fetch-old)
76 (with-current-buffer nntp-server-buffer 76 (with-current-buffer nntp-server-buffer
77 (erase-buffer) 77 (erase-buffer)
78 (let* ((file nil) 78 (let* ((file nil)
@@ -147,7 +147,7 @@ as unread by Gnus.")
147 (save-excursion (nnmail-find-file file)) 147 (save-excursion (nnmail-find-file file))
148 (string-to-number (file-name-nondirectory file))))) 148 (string-to-number (file-name-nondirectory file)))))
149 149
150(deffoo nnmh-request-group (group &optional server dont-check info) 150(deffoo nnmh-request-group (group &optional server dont-check _info)
151 (nnheader-init-server-buffer) 151 (nnheader-init-server-buffer)
152 (nnmh-possibly-change-directory group server) 152 (nnmh-possibly-change-directory group server)
153 (let ((pathname (nnmail-group-pathname group nnmh-directory)) 153 (let ((pathname (nnmail-group-pathname group nnmh-directory))
@@ -188,9 +188,11 @@ as unread by Gnus.")
188 (nnheader-report 'nnmh "Empty group %s" group) 188 (nnheader-report 'nnmh "Empty group %s" group)
189 (nnheader-insert (format "211 0 1 0 %s\n" group)))))))))) 189 (nnheader-insert (format "211 0 1 0 %s\n" group))))))))))
190 190
191(deffoo nnmh-request-scan (&optional group server) 191(deffoo nnmh-request-scan (&optional group _server)
192 (nnmail-get-new-mail 'nnmh nil nnmh-directory group)) 192 (nnmail-get-new-mail 'nnmh nil nnmh-directory group))
193 193
194(defvar nnmh-toplev)
195
194(deffoo nnmh-request-list (&optional server dir) 196(deffoo nnmh-request-list (&optional server dir)
195 (nnheader-insert "") 197 (nnheader-insert "")
196 (nnmh-possibly-change-directory nil server) 198 (nnmh-possibly-change-directory nil server)
@@ -201,13 +203,12 @@ as unread by Gnus.")
201 (setq nnmh-group-alist (nnmail-get-active)) 203 (setq nnmh-group-alist (nnmail-get-active))
202 t) 204 t)
203 205
204(defvar nnmh-toplev)
205(defun nnmh-request-list-1 (dir) 206(defun nnmh-request-list-1 (dir)
206 (setq dir (expand-file-name dir)) 207 (setq dir (expand-file-name dir))
207 ;; Recurse down all directories. 208 ;; Recurse down all directories.
208 (let ((files (nnheader-directory-files dir t nil t)) 209 (let ((files (nnheader-directory-files dir t nil t))
209 (max 0) 210 (max 0)
210 min rdir num subdirectoriesp file) 211 min num subdirectoriesp file) ;; rdir
211 ;; Recurse down directories. 212 ;; Recurse down directories.
212 (setq subdirectoriesp 213 (setq subdirectoriesp
213 ;; link number always 1 on MS Windows :( 214 ;; link number always 1 on MS Windows :(
@@ -252,7 +253,7 @@ as unread by Gnus.")
252 (or min 1)))))) 253 (or min 1))))))
253 t) 254 t)
254 255
255(deffoo nnmh-request-newgroups (date &optional server) 256(deffoo nnmh-request-newgroups (_date &optional server)
256 (nnmh-request-list server)) 257 (nnmh-request-list server))
257 258
258(deffoo nnmh-request-expire-articles (articles newsgroup 259(deffoo nnmh-request-expire-articles (articles newsgroup
@@ -291,11 +292,11 @@ as unread by Gnus.")
291 (nnheader-message 5 "") 292 (nnheader-message 5 "")
292 (nconc rest articles))) 293 (nconc rest articles)))
293 294
294(deffoo nnmh-close-group (group &optional server) 295(deffoo nnmh-close-group (_group &optional _server)
295 t) 296 t)
296 297
297(deffoo nnmh-request-move-article (article group server accept-form 298(deffoo nnmh-request-move-article ( article group server accept-form
298 &optional last move-is-internal) 299 &optional _last _move-is-internal)
299 (let ((buf (gnus-get-buffer-create " *nnmh move*")) 300 (let ((buf (gnus-get-buffer-create " *nnmh move*"))
300 result) 301 result)
301 (and 302 (and
@@ -304,7 +305,7 @@ as unread by Gnus.")
304 (with-current-buffer buf 305 (with-current-buffer buf
305 (erase-buffer) 306 (erase-buffer)
306 (insert-buffer-substring nntp-server-buffer) 307 (insert-buffer-substring nntp-server-buffer)
307 (setq result (eval accept-form)) 308 (setq result (eval accept-form t))
308 (kill-buffer (current-buffer)) 309 (kill-buffer (current-buffer))
309 result) 310 result)
310 (progn 311 (progn
@@ -350,7 +351,7 @@ as unread by Gnus.")
350 nil (if (nnheader-be-verbose 5) nil 'nomesg)) 351 nil (if (nnheader-be-verbose 5) nil 'nomesg))
351 t))) 352 t)))
352 353
353(deffoo nnmh-request-create-group (group &optional server args) 354(deffoo nnmh-request-create-group (group &optional server _args)
354 (nnheader-init-server-buffer) 355 (nnheader-init-server-buffer)
355 (unless (assoc group nnmh-group-alist) 356 (unless (assoc group nnmh-group-alist)
356 (let (active) 357 (let (active)
diff --git a/lisp/gnus/nnml.el b/lisp/gnus/nnml.el
index eaa2004272f..7bd295399cc 100644
--- a/lisp/gnus/nnml.el
+++ b/lisp/gnus/nnml.el
@@ -1,4 +1,4 @@
1;;; nnml.el --- mail spool access for Gnus 1;;; nnml.el --- mail spool access for Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1995-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1995-2021 Free Software Foundation, Inc.
4 4
@@ -111,7 +111,7 @@ non-nil.")
111 111
112(nnoo-define-basics nnml) 112(nnoo-define-basics nnml)
113 113
114(defun nnml-group-pathname (group &optional file server) 114(defun nnml-group-pathname (group &optional file _server)
115 "Return an absolute file name of FILE for GROUP on SERVER." 115 "Return an absolute file name of FILE for GROUP on SERVER."
116 (nnmail-group-pathname group nnml-directory file)) 116 (nnmail-group-pathname group nnml-directory file))
117 117
@@ -215,7 +215,7 @@ non-nil.")
215 (cons (if group-num (car group-num) group) 215 (cons (if group-num (car group-num) group)
216 (string-to-number (file-name-nondirectory path))))))) 216 (string-to-number (file-name-nondirectory path)))))))
217 217
218(deffoo nnml-request-group (group &optional server dont-check info) 218(deffoo nnml-request-group (group &optional server dont-check _info)
219 (let ((file-name-coding-system nnmail-pathname-coding-system)) 219 (let ((file-name-coding-system nnmail-pathname-coding-system))
220 (cond 220 (cond
221 ((not (nnml-possibly-change-directory group server)) 221 ((not (nnml-possibly-change-directory group server))
@@ -252,11 +252,11 @@ non-nil.")
252 (t 252 (t
253 (nnmail-get-new-mail 'nnml 'nnml-save-incremental-nov nnml-directory nil)))) 253 (nnmail-get-new-mail 'nnml 'nnml-save-incremental-nov nnml-directory nil))))
254 254
255(deffoo nnml-close-group (group &optional server) 255(deffoo nnml-close-group (_group &optional _server)
256 (setq nnml-article-file-alist nil) 256 (setq nnml-article-file-alist nil)
257 t) 257 t)
258 258
259(deffoo nnml-request-create-group (group &optional server args) 259(deffoo nnml-request-create-group (group &optional server _args)
260 (nnml-possibly-change-directory nil server) 260 (nnml-possibly-change-directory nil server)
261 (nnmail-activate 'nnml) 261 (nnmail-activate 'nnml)
262 (cond 262 (cond
@@ -283,7 +283,7 @@ non-nil.")
283 (nnmail-save-active nnml-group-alist nnml-active-file) 283 (nnmail-save-active nnml-group-alist nnml-active-file)
284 t)))) 284 t))))
285 285
286(deffoo nnml-request-list (&optional server) 286(deffoo nnml-request-list (&optional _server)
287 (save-excursion 287 (save-excursion
288 (let ((nnmail-file-coding-system nnmail-active-file-coding-system) 288 (let ((nnmail-file-coding-system nnmail-active-file-coding-system)
289 (file-name-coding-system nnmail-pathname-coding-system)) 289 (file-name-coding-system nnmail-pathname-coding-system))
@@ -291,10 +291,10 @@ non-nil.")
291 (setq nnml-group-alist (nnmail-get-active)) 291 (setq nnml-group-alist (nnmail-get-active))
292 t)) 292 t))
293 293
294(deffoo nnml-request-newgroups (date &optional server) 294(deffoo nnml-request-newgroups (_date &optional server)
295 (nnml-request-list server)) 295 (nnml-request-list server))
296 296
297(deffoo nnml-request-list-newsgroups (&optional server) 297(deffoo nnml-request-list-newsgroups (&optional _server)
298 (save-excursion 298 (save-excursion
299 (nnmail-find-file nnml-newsgroups-file))) 299 (nnmail-find-file nnml-newsgroups-file)))
300 300
@@ -360,7 +360,7 @@ non-nil.")
360 (nconc rest articles))) 360 (nconc rest articles)))
361 361
362(deffoo nnml-request-move-article 362(deffoo nnml-request-move-article
363 (article group server accept-form &optional last move-is-internal) 363 (article group server accept-form &optional last _move-is-internal)
364 (let ((buf (gnus-get-buffer-create " *nnml move*")) 364 (let ((buf (gnus-get-buffer-create " *nnml move*"))
365 (file-name-coding-system nnmail-pathname-coding-system) 365 (file-name-coding-system nnmail-pathname-coding-system)
366 result) 366 result)
@@ -374,7 +374,7 @@ non-nil.")
374 nnml-article-file-alist) 374 nnml-article-file-alist)
375 (with-current-buffer buf 375 (with-current-buffer buf
376 (insert-buffer-substring nntp-server-buffer) 376 (insert-buffer-substring nntp-server-buffer)
377 (setq result (eval accept-form)) 377 (setq result (eval accept-form t))
378 (kill-buffer (current-buffer)) 378 (kill-buffer (current-buffer))
379 result)) 379 result))
380 (progn 380 (progn
@@ -889,7 +889,7 @@ Unless no-active is non-nil, update the active file too."
889 (let* ((dir (file-name-as-directory dir)) 889 (let* ((dir (file-name-as-directory dir))
890 (nov (concat dir nnml-nov-file-name)) 890 (nov (concat dir nnml-nov-file-name))
891 (nov-buffer (gnus-get-buffer-create " *nov*")) 891 (nov-buffer (gnus-get-buffer-create " *nov*"))
892 chars file headers) 892 chars headers) ;; file
893 (with-current-buffer nov-buffer 893 (with-current-buffer nov-buffer
894 ;; Init the nov buffer. 894 ;; Init the nov buffer.
895 (buffer-disable-undo) 895 (buffer-disable-undo)
diff --git a/lisp/gnus/nnnil.el b/lisp/gnus/nnnil.el
index 7d400791fa2..36a8bc4581b 100644
--- a/lisp/gnus/nnnil.el
+++ b/lisp/gnus/nnnil.el
@@ -1,4 +1,4 @@
1;;; nnnil.el --- empty backend for Gnus 1;;; nnnil.el --- empty backend for Gnus -*- lexical-binding: t; -*-
2 2
3;; This file is in the public domain. 3;; This file is in the public domain.
4 4
@@ -32,31 +32,31 @@
32 32
33(defvar nnnil-status-string "") 33(defvar nnnil-status-string "")
34 34
35(defun nnnil-retrieve-headers (articles &optional group server fetch-old) 35(defun nnnil-retrieve-headers (_articles &optional _group _server _fetch-old)
36 (with-current-buffer nntp-server-buffer 36 (with-current-buffer nntp-server-buffer
37 (erase-buffer)) 37 (erase-buffer))
38 'nov) 38 'nov)
39 39
40(defun nnnil-open-server (server &optional definitions) 40(defun nnnil-open-server (_server &optional _definitions)
41 t) 41 t)
42 42
43(defun nnnil-close-server (&optional server) 43(defun nnnil-close-server (&optional _server)
44 t) 44 t)
45 45
46(defun nnnil-request-close () 46(defun nnnil-request-close ()
47 t) 47 t)
48 48
49(defun nnnil-server-opened (&optional server) 49(defun nnnil-server-opened (&optional _server)
50 t) 50 t)
51 51
52(defun nnnil-status-message (&optional server) 52(defun nnnil-status-message (&optional _server)
53 nnnil-status-string) 53 nnnil-status-string)
54 54
55(defun nnnil-request-article (article &optional group server to-buffer) 55(defun nnnil-request-article (_article &optional _group _server _to-buffer)
56 (setq nnnil-status-string "No such group") 56 (setq nnnil-status-string "No such group")
57 nil) 57 nil)
58 58
59(defun nnnil-request-group (group &optional server fast info) 59(defun nnnil-request-group (_group &optional _server _fast _info)
60 (let (deactivate-mark) 60 (let (deactivate-mark)
61 (with-current-buffer nntp-server-buffer 61 (with-current-buffer nntp-server-buffer
62 (erase-buffer) 62 (erase-buffer)
@@ -64,15 +64,15 @@
64 (setq nnnil-status-string "No such group") 64 (setq nnnil-status-string "No such group")
65 nil) 65 nil)
66 66
67(defun nnnil-close-group (group &optional server) 67(defun nnnil-close-group (_group &optional _server)
68 t) 68 t)
69 69
70(defun nnnil-request-list (&optional server) 70(defun nnnil-request-list (&optional _server)
71 (with-current-buffer nntp-server-buffer 71 (with-current-buffer nntp-server-buffer
72 (erase-buffer)) 72 (erase-buffer))
73 t) 73 t)
74 74
75(defun nnnil-request-post (&optional server) 75(defun nnnil-request-post (&optional _server)
76 (setq nnnil-status-string "Read-only server") 76 (setq nnnil-status-string "Read-only server")
77 nil) 77 nil)
78 78
diff --git a/lisp/gnus/nnoo.el b/lisp/gnus/nnoo.el
index 39469d140d9..2260fd694e4 100644
--- a/lisp/gnus/nnoo.el
+++ b/lisp/gnus/nnoo.el
@@ -1,4 +1,4 @@
1;;; nnoo.el --- OO Gnus Backends 1;;; nnoo.el --- OO Gnus Backends -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1996-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1996-2021 Free Software Foundation, Inc.
4 4
@@ -257,7 +257,7 @@
257 nnoo-state-alist)) 257 nnoo-state-alist))
258 t) 258 t)
259 259
260(defun nnoo-status-message (backend server) 260(defun nnoo-status-message (backend _server)
261 (nnheader-get-report backend)) 261 (nnheader-get-report backend))
262 262
263(defun nnoo-server-opened (backend server) 263(defun nnoo-server-opened (backend server)
diff --git a/lisp/gnus/nnregistry.el b/lisp/gnus/nnregistry.el
index e78f93d829a..15e41e9d425 100644
--- a/lisp/gnus/nnregistry.el
+++ b/lisp/gnus/nnregistry.el
@@ -1,5 +1,4 @@
1;;; nnregistry.el --- access to articles via Gnus' message-id registry 1;;; nnregistry.el --- access to articles via Gnus' message-id registry -*- lexical-binding: t; -*-
2;;; -*- coding: utf-8 -*-
3 2
4;; Copyright (C) 2010-2021 Free Software Foundation, Inc. 3;; Copyright (C) 2010-2021 Free Software Foundation, Inc.
5 4
@@ -36,21 +35,21 @@
36 35
37(nnoo-declare nnregistry) 36(nnoo-declare nnregistry)
38 37
39(deffoo nnregistry-server-opened (server) 38(deffoo nnregistry-server-opened (_server)
40 gnus-registry-enabled) 39 gnus-registry-enabled)
41 40
42(deffoo nnregistry-close-server (server &optional defs) 41(deffoo nnregistry-close-server (_server &optional _defs)
43 t) 42 t)
44 43
45(deffoo nnregistry-status-message (server) 44(deffoo nnregistry-status-message (_server)
46 nil) 45 nil)
47 46
48(deffoo nnregistry-open-server (server &optional defs) 47(deffoo nnregistry-open-server (_server &optional _defs)
49 gnus-registry-enabled) 48 gnus-registry-enabled)
50 49
51(defvar nnregistry-within-nnregistry nil) 50(defvar nnregistry-within-nnregistry nil)
52 51
53(deffoo nnregistry-request-article (id &optional group server buffer) 52(deffoo nnregistry-request-article (id &optional _group _server buffer)
54 (and (not nnregistry-within-nnregistry) 53 (and (not nnregistry-within-nnregistry)
55 (let* ((nnregistry-within-nnregistry t) 54 (let* ((nnregistry-within-nnregistry t)
56 (group (nth 0 (gnus-registry-get-id-key id 'group))) 55 (group (nth 0 (gnus-registry-get-id-key id 'group)))
diff --git a/lisp/gnus/nnrss.el b/lisp/gnus/nnrss.el
index b62a6412e5d..aa7c8e584a5 100644
--- a/lisp/gnus/nnrss.el
+++ b/lisp/gnus/nnrss.el
@@ -1,4 +1,4 @@
1;;; nnrss.el --- interfacing with RSS 1;;; nnrss.el --- interfacing with RSS -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 2001-2021 Free Software Foundation, Inc. 3;; Copyright (C) 2001-2021 Free Software Foundation, Inc.
4 4
@@ -125,7 +125,7 @@ for decoding when the cdr that the data specify is not available.")
125 (setq group (decode-coding-string group 'utf-8)) 125 (setq group (decode-coding-string group 'utf-8))
126 group)) 126 group))
127 127
128(deffoo nnrss-retrieve-headers (articles &optional group server fetch-old) 128(deffoo nnrss-retrieve-headers (articles &optional group server _fetch-old)
129 (setq group (nnrss-decode-group-name group)) 129 (setq group (nnrss-decode-group-name group))
130 (nnrss-possibly-change-group group server) 130 (nnrss-possibly-change-group group server)
131 (let (e) 131 (let (e)
@@ -173,7 +173,7 @@ for decoding when the cdr that the data specify is not available.")
173 "\n"))))) 173 "\n")))))
174 'nov) 174 'nov)
175 175
176(deffoo nnrss-request-group (group &optional server dont-check info) 176(deffoo nnrss-request-group (group &optional server dont-check _info)
177 (setq group (nnrss-decode-group-name group)) 177 (setq group (nnrss-decode-group-name group))
178 (nnheader-message 6 "nnrss: Requesting %s..." group) 178 (nnheader-message 6 "nnrss: Requesting %s..." group)
179 (nnrss-possibly-change-group group server) 179 (nnrss-possibly-change-group group server)
@@ -188,7 +188,7 @@ for decoding when the cdr that the data specify is not available.")
188 t)) 188 t))
189 (nnheader-message 6 "nnrss: Requesting %s...done" group))) 189 (nnheader-message 6 "nnrss: Requesting %s...done" group)))
190 190
191(deffoo nnrss-close-group (group &optional server) 191(deffoo nnrss-close-group (_group &optional _server)
192 t) 192 t)
193 193
194(deffoo nnrss-request-article (article &optional group server buffer) 194(deffoo nnrss-request-article (article &optional group server buffer)
@@ -200,7 +200,7 @@ for decoding when the cdr that the data specify is not available.")
200 (nnrss-possibly-change-group group server) 200 (nnrss-possibly-change-group group server)
201 (let ((e (assq article nnrss-group-data)) 201 (let ((e (assq article nnrss-group-data))
202 (nntp-server-buffer (or buffer nntp-server-buffer)) 202 (nntp-server-buffer (or buffer nntp-server-buffer))
203 post err) 203 err) ;; post
204 (when e 204 (when e
205 (with-current-buffer nntp-server-buffer 205 (with-current-buffer nntp-server-buffer
206 (erase-buffer) 206 (erase-buffer)
@@ -222,7 +222,7 @@ for decoding when the cdr that the data specify is not available.")
222 (cons '("Newsgroups" . utf-8) 222 (cons '("Newsgroups" . utf-8)
223 rfc2047-header-encoding-alist) 223 rfc2047-header-encoding-alist)
224 rfc2047-header-encoding-alist)) 224 rfc2047-header-encoding-alist))
225 rfc2047-encode-encoded-words body fn) 225 rfc2047-encode-encoded-words body) ;; fn
226 (when (or text link enclosure comments) 226 (when (or text link enclosure comments)
227 (insert "\n") 227 (insert "\n")
228 (insert "<#multipart type=alternative>\n" 228 (insert "<#multipart type=alternative>\n"
@@ -311,7 +311,7 @@ for decoding when the cdr that the data specify is not available.")
311 ;; we return the article number. 311 ;; we return the article number.
312 (cons nnrss-group (car e)))))) 312 (cons nnrss-group (car e))))))
313 313
314(deffoo nnrss-open-server (server &optional defs connectionless) 314(deffoo nnrss-open-server (server &optional defs _connectionless)
315 (nnrss-read-server-data server) 315 (nnrss-read-server-data server)
316 (nnoo-change-server 'nnrss server defs) 316 (nnoo-change-server 'nnrss server defs)
317 t) 317 t)
@@ -335,7 +335,7 @@ for decoding when the cdr that the data specify is not available.")
335 (nnrss-save-group-data group server)) 335 (nnrss-save-group-data group server))
336 not-expirable)) 336 not-expirable))
337 337
338(deffoo nnrss-request-delete-group (group &optional force server) 338(deffoo nnrss-request-delete-group (group &optional _force server)
339 (setq group (nnrss-decode-group-name group)) 339 (setq group (nnrss-decode-group-name group))
340 (nnrss-possibly-change-group group server) 340 (nnrss-possibly-change-group group server)
341 (let (elem) 341 (let (elem)
@@ -561,7 +561,7 @@ which RSS 2.0 allows."
561 561
562;;; URL interface 562;;; URL interface
563 563
564(defun nnrss-no-cache (url) 564(defun nnrss-no-cache (_url)
565 "") 565 "")
566 566
567(defun nnrss-insert (url) 567(defun nnrss-insert (url)
@@ -613,7 +613,7 @@ which RSS 2.0 allows."
613 613
614(defun nnrss-check-group (group server) 614(defun nnrss-check-group (group server)
615 (let (file xml subject url extra changed author date feed-subject 615 (let (file xml subject url extra changed author date feed-subject
616 enclosure comments rss-ns rdf-ns content-ns dc-ns 616 enclosure comments rss-ns content-ns dc-ns ;; rdf-ns
617 hash-index) 617 hash-index)
618 (if (and nnrss-use-local 618 (if (and nnrss-use-local
619 (file-exists-p (setq file (expand-file-name 619 (file-exists-p (setq file (expand-file-name
@@ -637,7 +637,7 @@ which RSS 2.0 allows."
637 (setq changed t)) 637 (setq changed t))
638 (setq xml (nnrss-fetch url))) 638 (setq xml (nnrss-fetch url)))
639 (setq dc-ns (nnrss-get-namespace-prefix xml "http://purl.org/dc/elements/1.1/") 639 (setq dc-ns (nnrss-get-namespace-prefix xml "http://purl.org/dc/elements/1.1/")
640 rdf-ns (nnrss-get-namespace-prefix xml "http://www.w3.org/1999/02/22-rdf-syntax-ns#") 640 ;; rdf-ns (nnrss-get-namespace-prefix xml "http://www.w3.org/1999/02/22-rdf-syntax-ns#")
641 rss-ns (nnrss-get-namespace-prefix xml "http://purl.org/rss/1.0/") 641 rss-ns (nnrss-get-namespace-prefix xml "http://purl.org/rss/1.0/")
642 content-ns (nnrss-get-namespace-prefix xml "http://purl.org/rss/1.0/modules/content/")) 642 content-ns (nnrss-get-namespace-prefix xml "http://purl.org/rss/1.0/modules/content/"))
643 (dolist (item (nreverse (nnrss-find-el (intern (concat rss-ns "item")) xml))) 643 (dolist (item (nreverse (nnrss-find-el (intern (concat rss-ns "item")) xml)))
diff --git a/lisp/gnus/nnspool.el b/lisp/gnus/nnspool.el
index cb854178564..ce9ab3c53c1 100644
--- a/lisp/gnus/nnspool.el
+++ b/lisp/gnus/nnspool.el
@@ -1,4 +1,4 @@
1;;; nnspool.el --- spool access for GNU Emacs 1;;; nnspool.el --- spool access for GNU Emacs -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1988-1990, 1993-1998, 2000-2021 Free Software 3;; Copyright (C) 1988-1990, 1993-1998, 2000-2021 Free Software
4;; Foundation, Inc. 4;; Foundation, Inc.
@@ -126,7 +126,7 @@ there.")
126 126
127(nnoo-define-basics nnspool) 127(nnoo-define-basics nnspool)
128 128
129(deffoo nnspool-retrieve-headers (articles &optional group server fetch-old) 129(deffoo nnspool-retrieve-headers (articles &optional group _server fetch-old)
130 "Retrieve the headers of ARTICLES." 130 "Retrieve the headers of ARTICLES."
131 (with-current-buffer nntp-server-buffer 131 (with-current-buffer nntp-server-buffer
132 (erase-buffer) 132 (erase-buffer)
@@ -203,7 +203,7 @@ there.")
203 server nnspool-spool-directory) 203 server nnspool-spool-directory)
204 t))) 204 t)))
205 205
206(deffoo nnspool-request-article (id &optional group server buffer) 206(deffoo nnspool-request-article (id &optional group _server buffer)
207 "Select article by message ID (or number)." 207 "Select article by message ID (or number)."
208 (nnspool-possibly-change-directory group) 208 (nnspool-possibly-change-directory group)
209 (let ((nntp-server-buffer (or buffer nntp-server-buffer)) 209 (let ((nntp-server-buffer (or buffer nntp-server-buffer))
@@ -222,7 +222,7 @@ there.")
222 (cons nnspool-current-group id) 222 (cons nnspool-current-group id)
223 ag)))) 223 ag))))
224 224
225(deffoo nnspool-request-body (id &optional group server) 225(deffoo nnspool-request-body (id &optional group _server)
226 "Select article body by message ID (or number)." 226 "Select article body by message ID (or number)."
227 (nnspool-possibly-change-directory group) 227 (nnspool-possibly-change-directory group)
228 (let ((res (nnspool-request-article id))) 228 (let ((res (nnspool-request-article id)))
@@ -233,7 +233,7 @@ there.")
233 (delete-region (point-min) (point))) 233 (delete-region (point-min) (point)))
234 res)))) 234 res))))
235 235
236(deffoo nnspool-request-head (id &optional group server) 236(deffoo nnspool-request-head (id &optional group _server)
237 "Select article head by message ID (or number)." 237 "Select article head by message ID (or number)."
238 (nnspool-possibly-change-directory group) 238 (nnspool-possibly-change-directory group)
239 (let ((res (nnspool-request-article id))) 239 (let ((res (nnspool-request-article id)))
@@ -245,7 +245,7 @@ there.")
245 (nnheader-fold-continuation-lines))) 245 (nnheader-fold-continuation-lines)))
246 res)) 246 res))
247 247
248(deffoo nnspool-request-group (group &optional server dont-check info) 248(deffoo nnspool-request-group (group &optional _server dont-check _info)
249 "Select news GROUP." 249 "Select news GROUP."
250 (let ((pathname (nnspool-article-pathname group)) 250 (let ((pathname (nnspool-article-pathname group))
251 dir) 251 dir)
@@ -269,26 +269,26 @@ there.")
269 (nnheader-report 'nnspool "Empty group %s" group) 269 (nnheader-report 'nnspool "Empty group %s" group)
270 (nnheader-insert "211 0 0 0 %s\n" group)))))) 270 (nnheader-insert "211 0 0 0 %s\n" group))))))
271 271
272(deffoo nnspool-request-type (group &optional article) 272(deffoo nnspool-request-type (_group &optional _article)
273 'news) 273 'news)
274 274
275(deffoo nnspool-close-group (group &optional server) 275(deffoo nnspool-close-group (_group &optional _server)
276 t) 276 t)
277 277
278(deffoo nnspool-request-list (&optional server) 278(deffoo nnspool-request-list (&optional _server)
279 "List active newsgroups." 279 "List active newsgroups."
280 (save-excursion 280 (save-excursion
281 (or (nnspool-find-file nnspool-active-file) 281 (or (nnspool-find-file nnspool-active-file)
282 (nnheader-report 'nnspool (nnheader-file-error nnspool-active-file))))) 282 (nnheader-report 'nnspool (nnheader-file-error nnspool-active-file)))))
283 283
284(deffoo nnspool-request-list-newsgroups (&optional server) 284(deffoo nnspool-request-list-newsgroups (&optional _server)
285 "List newsgroups (defined in NNTP2)." 285 "List newsgroups (defined in NNTP2)."
286 (save-excursion 286 (save-excursion
287 (or (nnspool-find-file nnspool-newsgroups-file) 287 (or (nnspool-find-file nnspool-newsgroups-file)
288 (nnheader-report 'nnspool (nnheader-file-error 288 (nnheader-report 'nnspool (nnheader-file-error
289 nnspool-newsgroups-file))))) 289 nnspool-newsgroups-file)))))
290 290
291(deffoo nnspool-request-list-distributions (&optional server) 291(deffoo nnspool-request-list-distributions (&optional _server)
292 "List distributions (defined in NNTP2)." 292 "List distributions (defined in NNTP2)."
293 (save-excursion 293 (save-excursion
294 (or (nnspool-find-file nnspool-distributions-file) 294 (or (nnspool-find-file nnspool-distributions-file)
@@ -296,7 +296,7 @@ there.")
296 nnspool-distributions-file))))) 296 nnspool-distributions-file)))))
297 297
298;; Suggested by Hallvard B Furuseth <h.b.furuseth@usit.uio.no>. 298;; Suggested by Hallvard B Furuseth <h.b.furuseth@usit.uio.no>.
299(deffoo nnspool-request-newgroups (date &optional server) 299(deffoo nnspool-request-newgroups (date &optional _server)
300 "List groups created after DATE." 300 "List groups created after DATE."
301 (if (nnspool-find-file nnspool-active-times-file) 301 (if (nnspool-find-file nnspool-active-times-file)
302 (save-excursion 302 (save-excursion
@@ -323,7 +323,7 @@ there.")
323 t) 323 t)
324 nil)) 324 nil))
325 325
326(deffoo nnspool-request-post (&optional server) 326(deffoo nnspool-request-post (&optional _server)
327 "Post a new news in current buffer." 327 "Post a new news in current buffer."
328 (save-excursion 328 (save-excursion
329 (let* ((process-connection-type nil) ; t bugs out on Solaris 329 (let* ((process-connection-type nil) ; t bugs out on Solaris
@@ -356,7 +356,7 @@ there.")
356 356
357;;; Internal functions. 357;;; Internal functions.
358 358
359(defun nnspool-inews-sentinel (proc status) 359(defun nnspool-inews-sentinel (proc _status)
360 (with-current-buffer (process-buffer proc) 360 (with-current-buffer (process-buffer proc)
361 (goto-char (point-min)) 361 (goto-char (point-min))
362 (if (or (zerop (buffer-size)) 362 (if (or (zerop (buffer-size))
diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el
index cf89eebbbbb..1eb604d6754 100644
--- a/lisp/gnus/nntp.el
+++ b/lisp/gnus/nntp.el
@@ -1330,7 +1330,7 @@ If SEND-IF-FORCE, only send authinfo to the server if the
1330 (dolist (entry nntp-server-action-alist) 1330 (dolist (entry nntp-server-action-alist)
1331 (when (string-match (car entry) nntp-server-type) 1331 (when (string-match (car entry) nntp-server-type)
1332 (if (not (functionp (cadr entry))) 1332 (if (not (functionp (cadr entry)))
1333 (eval (cadr entry)) 1333 (eval (cadr entry) t)
1334 (funcall (cadr entry))))))) 1334 (funcall (cadr entry)))))))
1335 1335
1336(defun nntp-async-wait (process wait-for buffer decode callback) 1336(defun nntp-async-wait (process wait-for buffer decode callback)
diff --git a/lisp/gnus/nnvirtual.el b/lisp/gnus/nnvirtual.el
index 902df868f80..b3b701e4126 100644
--- a/lisp/gnus/nnvirtual.el
+++ b/lisp/gnus/nnvirtual.el
@@ -1,4 +1,4 @@
1;;; nnvirtual.el --- virtual newsgroups access for Gnus 1;;; nnvirtual.el --- virtual newsgroups access for Gnus -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1994-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1994-2021 Free Software Foundation, Inc.
4 4
@@ -94,8 +94,8 @@ It is computed from the marks of individual component groups.")
94(nnoo-define-basics nnvirtual) 94(nnoo-define-basics nnvirtual)
95 95
96 96
97(deffoo nnvirtual-retrieve-headers (articles &optional newsgroup 97(deffoo nnvirtual-retrieve-headers (articles &optional _newsgroup
98 server fetch-old) 98 server _fetch-old)
99 (when (nnvirtual-possibly-change-server server) 99 (when (nnvirtual-possibly-change-server server)
100 (with-current-buffer nntp-server-buffer 100 (with-current-buffer nntp-server-buffer
101 (erase-buffer) 101 (erase-buffer)
@@ -186,7 +186,7 @@ It is computed from the marks of individual component groups.")
186 186
187(defvoo nnvirtual-last-accessed-component-group nil) 187(defvoo nnvirtual-last-accessed-component-group nil)
188 188
189(deffoo nnvirtual-request-article (article &optional group server buffer) 189(deffoo nnvirtual-request-article (article &optional _group server buffer)
190 (when (nnvirtual-possibly-change-server server) 190 (when (nnvirtual-possibly-change-server server)
191 (if (stringp article) 191 (if (stringp article)
192 ;; This is a fetch by Message-ID. 192 ;; This is a fetch by Message-ID.
@@ -250,7 +250,7 @@ It is computed from the marks of individual component groups.")
250 t))) 250 t)))
251 251
252 252
253(deffoo nnvirtual-request-group (group &optional server dont-check info) 253(deffoo nnvirtual-request-group (group &optional server dont-check _info)
254 (nnvirtual-possibly-change-server server) 254 (nnvirtual-possibly-change-server server)
255 (setq nnvirtual-component-groups 255 (setq nnvirtual-component-groups
256 (delete (nnvirtual-current-group) nnvirtual-component-groups)) 256 (delete (nnvirtual-current-group) nnvirtual-component-groups))
@@ -269,7 +269,7 @@ It is computed from the marks of individual component groups.")
269 nnvirtual-mapping-len nnvirtual-mapping-len group)))) 269 nnvirtual-mapping-len nnvirtual-mapping-len group))))
270 270
271 271
272(deffoo nnvirtual-request-type (group &optional article) 272(deffoo nnvirtual-request-type (_group &optional article)
273 (if (not article) 273 (if (not article)
274 'unknown 274 'unknown
275 (if (numberp article) 275 (if (numberp article)
@@ -279,7 +279,7 @@ It is computed from the marks of individual component groups.")
279 (gnus-request-type 279 (gnus-request-type
280 nnvirtual-last-accessed-component-group nil)))) 280 nnvirtual-last-accessed-component-group nil))))
281 281
282(deffoo nnvirtual-request-update-mark (group article mark) 282(deffoo nnvirtual-request-update-mark (_group article mark)
283 (let* ((nart (nnvirtual-map-article article)) 283 (let* ((nart (nnvirtual-map-article article))
284 (cgroup (car nart))) 284 (cgroup (car nart)))
285 (when (and nart 285 (when (and nart
@@ -291,22 +291,22 @@ It is computed from the marks of individual component groups.")
291 mark) 291 mark)
292 292
293 293
294(deffoo nnvirtual-close-group (group &optional server) 294(deffoo nnvirtual-close-group (_group &optional server)
295 (when (and (nnvirtual-possibly-change-server server) 295 (when (and (nnvirtual-possibly-change-server server)
296 (not (gnus-ephemeral-group-p (nnvirtual-current-group)))) 296 (not (gnus-ephemeral-group-p (nnvirtual-current-group))))
297 (nnvirtual-update-read-and-marked t t)) 297 (nnvirtual-update-read-and-marked t t))
298 t) 298 t)
299 299
300 300
301(deffoo nnvirtual-request-newgroups (date &optional server) 301(deffoo nnvirtual-request-newgroups (_date &optional _server)
302 (nnheader-report 'nnvirtual "NEWGROUPS is not supported.")) 302 (nnheader-report 'nnvirtual "NEWGROUPS is not supported."))
303 303
304 304
305(deffoo nnvirtual-request-list-newsgroups (&optional server) 305(deffoo nnvirtual-request-list-newsgroups (&optional _server)
306 (nnheader-report 'nnvirtual "LIST NEWSGROUPS is not implemented.")) 306 (nnheader-report 'nnvirtual "LIST NEWSGROUPS is not implemented."))
307 307
308 308
309(deffoo nnvirtual-request-update-info (group info &optional server) 309(deffoo nnvirtual-request-update-info (_group info &optional server)
310 (when (and (nnvirtual-possibly-change-server server) 310 (when (and (nnvirtual-possibly-change-server server)
311 (not nnvirtual-info-installed)) 311 (not nnvirtual-info-installed))
312 ;; Install the precomputed lists atomically, so the virtual group 312 ;; Install the precomputed lists atomically, so the virtual group
@@ -321,7 +321,7 @@ It is computed from the marks of individual component groups.")
321 t)) 321 t))
322 322
323 323
324(deffoo nnvirtual-catchup-group (group &optional server all) 324(deffoo nnvirtual-catchup-group (_group &optional server all)
325 (when (and (nnvirtual-possibly-change-server server) 325 (when (and (nnvirtual-possibly-change-server server)
326 (not (gnus-ephemeral-group-p (nnvirtual-current-group)))) 326 (not (gnus-ephemeral-group-p (nnvirtual-current-group))))
327 ;; copy over existing marks first, in case they set anything 327 ;; copy over existing marks first, in case they set anything
@@ -339,12 +339,12 @@ It is computed from the marks of individual component groups.")
339 (gnus-group-catchup-current nil all))))) 339 (gnus-group-catchup-current nil all)))))
340 340
341 341
342(deffoo nnvirtual-find-group-art (group article) 342(deffoo nnvirtual-find-group-art (_group article)
343 "Return the real group and article for virtual GROUP and ARTICLE." 343 "Return the real group and article for virtual GROUP and ARTICLE."
344 (nnvirtual-map-article article)) 344 (nnvirtual-map-article article))
345 345
346 346
347(deffoo nnvirtual-request-post (&optional server) 347(deffoo nnvirtual-request-post (&optional _server)
348 (if (not gnus-message-group-art) 348 (if (not gnus-message-group-art)
349 (nnheader-report 'nnvirtual "Can't post to an nnvirtual group") 349 (nnheader-report 'nnvirtual "Can't post to an nnvirtual group")
350 (let ((group (car (nnvirtual-find-group-art 350 (let ((group (car (nnvirtual-find-group-art
@@ -353,8 +353,8 @@ It is computed from the marks of individual component groups.")
353 (gnus-request-post (gnus-find-method-for-group group))))) 353 (gnus-request-post (gnus-find-method-for-group group)))))
354 354
355 355
356(deffoo nnvirtual-request-expire-articles (articles group 356(deffoo nnvirtual-request-expire-articles ( _articles _group
357 &optional server force) 357 &optional server _force)
358 (nnvirtual-possibly-change-server server) 358 (nnvirtual-possibly-change-server server)
359 (setq nnvirtual-component-groups 359 (setq nnvirtual-component-groups
360 (delete (nnvirtual-current-group) nnvirtual-component-groups)) 360 (delete (nnvirtual-current-group) nnvirtual-component-groups))
diff --git a/lisp/gnus/nnweb.el b/lisp/gnus/nnweb.el
index dd71bea72e2..f08dc47e313 100644
--- a/lisp/gnus/nnweb.el
+++ b/lisp/gnus/nnweb.el
@@ -1,4 +1,4 @@
1;;; nnweb.el --- retrieving articles via web search engines 1;;; nnweb.el --- retrieving articles via web search engines -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1996-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1996-2021 Free Software Foundation, Inc.
4 4
@@ -96,7 +96,7 @@ Valid types include `google', `dejanews', and `gmane'.")
96 96
97(nnoo-define-basics nnweb) 97(nnoo-define-basics nnweb)
98 98
99(deffoo nnweb-retrieve-headers (articles &optional group server fetch-old) 99(deffoo nnweb-retrieve-headers (articles &optional group server _fetch-old)
100 (nnweb-possibly-change-server group server) 100 (nnweb-possibly-change-server group server)
101 (with-current-buffer nntp-server-buffer 101 (with-current-buffer nntp-server-buffer
102 (erase-buffer) 102 (erase-buffer)
@@ -117,7 +117,7 @@ Valid types include `google', `dejanews', and `gmane'.")
117 (nnweb-write-active) 117 (nnweb-write-active)
118 (nnweb-write-overview group))) 118 (nnweb-write-overview group)))
119 119
120(deffoo nnweb-request-group (group &optional server dont-check info) 120(deffoo nnweb-request-group (group &optional server dont-check _info)
121 (nnweb-possibly-change-server group server) 121 (nnweb-possibly-change-server group server)
122 (unless (or nnweb-ephemeral-p 122 (unless (or nnweb-ephemeral-p
123 dont-check 123 dont-check
@@ -156,7 +156,7 @@ Valid types include `google', `dejanews', and `gmane'.")
156 (let ((fetch (nnweb-definition 'id)) 156 (let ((fetch (nnweb-definition 'id))
157 (art (when (string-match "^<\\(.*\\)>$" article) 157 (art (when (string-match "^<\\(.*\\)>$" article)
158 (match-string 1 article))) 158 (match-string 1 article)))
159 active) 159 ) ;; active
160 (when (and fetch art) 160 (when (and fetch art)
161 (setq url (format fetch 161 (setq url (format fetch
162 (mm-url-form-encode-xwfu art))) 162 (mm-url-form-encode-xwfu art)))
@@ -184,19 +184,19 @@ Valid types include `google', `dejanews', and `gmane'.")
184 (nnmail-generate-active (list (assoc server nnweb-group-alist))) 184 (nnmail-generate-active (list (assoc server nnweb-group-alist)))
185 t)) 185 t))
186 186
187(deffoo nnweb-request-update-info (group info &optional server)) 187(deffoo nnweb-request-update-info (_group _info &optional _server))
188 188
189(deffoo nnweb-asynchronous-p () 189(deffoo nnweb-asynchronous-p ()
190 nil) 190 nil)
191 191
192(deffoo nnweb-request-create-group (group &optional server args) 192(deffoo nnweb-request-create-group (group &optional server _args)
193 (nnweb-possibly-change-server nil server) 193 (nnweb-possibly-change-server nil server)
194 (nnweb-request-delete-group group) 194 (nnweb-request-delete-group group)
195 (push `(,group ,(cons 1 0)) nnweb-group-alist) 195 (push `(,group ,(cons 1 0)) nnweb-group-alist)
196 (nnweb-write-active) 196 (nnweb-write-active)
197 t) 197 t)
198 198
199(deffoo nnweb-request-delete-group (group &optional force server) 199(deffoo nnweb-request-delete-group (group &optional _force server)
200 (nnweb-possibly-change-server group server) 200 (nnweb-possibly-change-server group server)
201 (gnus-alist-pull group nnweb-group-alist t) 201 (gnus-alist-pull group nnweb-group-alist t)
202 (nnweb-write-active) 202 (nnweb-write-active)
@@ -317,7 +317,7 @@ Valid types include `google', `dejanews', and `gmane'.")
317 (let ((i 0) 317 (let ((i 0)
318 (case-fold-search t) 318 (case-fold-search t)
319 (active (cadr (assoc nnweb-group nnweb-group-alist))) 319 (active (cadr (assoc nnweb-group nnweb-group-alist)))
320 Subject Score Date Newsgroups From 320 Subject Date Newsgroups From
321 map url mid) 321 map url mid)
322 (unless active 322 (unless active
323 (push (list nnweb-group (setq active (cons 1 0))) 323 (push (list nnweb-group (setq active (cons 1 0)))
diff --git a/lisp/gnus/score-mode.el b/lisp/gnus/score-mode.el
index b8726c03c3e..d3ed3600ad9 100644
--- a/lisp/gnus/score-mode.el
+++ b/lisp/gnus/score-mode.el
@@ -1,4 +1,4 @@
1;;; score-mode.el --- mode for editing Gnus score files 1;;; score-mode.el --- mode for editing Gnus score files -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 1996, 2001-2021 Free Software Foundation, Inc. 3;; Copyright (C) 1996, 2001-2021 Free Software Foundation, Inc.
4 4
diff --git a/lisp/gnus/smiley.el b/lisp/gnus/smiley.el
index 9884bcc0752..3ee59479cf5 100644
--- a/lisp/gnus/smiley.el
+++ b/lisp/gnus/smiley.el
@@ -1,4 +1,4 @@
1;;; smiley.el --- displaying smiley faces 1;;; smiley.el --- displaying smiley faces -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 2000-2021 Free Software Foundation, Inc. 3;; Copyright (C) 2000-2021 Free Software Foundation, Inc.
4 4
diff --git a/lisp/gnus/spam-report.el b/lisp/gnus/spam-report.el
index 11d653d5374..d87a6c2af0d 100644
--- a/lisp/gnus/spam-report.el
+++ b/lisp/gnus/spam-report.el
@@ -1,4 +1,4 @@
1;;; spam-report.el --- Reporting spam 1;;; spam-report.el --- Reporting spam -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 2002-2021 Free Software Foundation, Inc. 3;; Copyright (C) 2002-2021 Free Software Foundation, Inc.
4 4
diff --git a/lisp/gnus/spam-stat.el b/lisp/gnus/spam-stat.el
index 1980bd1d747..70753cad9ca 100644
--- a/lisp/gnus/spam-stat.el
+++ b/lisp/gnus/spam-stat.el
@@ -1,4 +1,4 @@
1;;; spam-stat.el --- detecting spam based on statistics 1;;; spam-stat.el --- detecting spam based on statistics -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 2002-2021 Free Software Foundation, Inc. 3;; Copyright (C) 2002-2021 Free Software Foundation, Inc.
4 4
@@ -251,9 +251,6 @@ Use `spam-stat-ngood', `spam-stat-nbad', `spam-stat-good',
251(defvar spam-stat-nbad 0 251(defvar spam-stat-nbad 0
252 "The number of bad mails in the dictionary.") 252 "The number of bad mails in the dictionary.")
253 253
254(defvar spam-stat-error-holder nil
255 "A holder for condition-case errors while scoring buffers.")
256
257(defsubst spam-stat-good (entry) 254(defsubst spam-stat-good (entry)
258 "Return the number of times this word belongs to good mails." 255 "Return the number of times this word belongs to good mails."
259 (aref entry 0)) 256 (aref entry 0))
@@ -477,8 +474,8 @@ The default score for unknown words is stored in
477These are the words whose spam-stat differs the most from 0.5. 474These are the words whose spam-stat differs the most from 0.5.
478The list returned contains elements of the form \(WORD SCORE DIFF), 475The list returned contains elements of the form \(WORD SCORE DIFF),
479where DIFF is the difference between SCORE and 0.5." 476where DIFF is the difference between SCORE and 0.5."
480 (let (result word score) 477 (let (result score) ;; word
481 (maphash (lambda (word ignore) 478 (maphash (lambda (word _ignore)
482 (setq score (spam-stat-score-word word) 479 (setq score (spam-stat-score-word word)
483 result (cons (list word score (abs (- score 0.5))) 480 result (cons (list word score (abs (- score 0.5)))
484 result))) 481 result)))
@@ -498,8 +495,7 @@ Add user supplied modifications if supplied."
498 (/ prod (+ prod (apply #'* (mapcar #'(lambda (x) (- 1 x)) 495 (/ prod (+ prod (apply #'* (mapcar #'(lambda (x) (- 1 x))
499 probs))))) 496 probs)))))
500 (score1s 497 (score1s
501 (condition-case 498 (condition-case nil
502 spam-stat-error-holder
503 (spam-stat-score-buffer-user score0) 499 (spam-stat-score-buffer-user score0)
504 (error nil))) 500 (error nil)))
505 (ans 501 (ans
@@ -522,7 +518,7 @@ Add user supplied modifications if supplied."
522Use this function on `nnmail-split-fancy'. If you are interested in 518Use this function on `nnmail-split-fancy'. If you are interested in
523the raw data used for the last run of `spam-stat-score-buffer', 519the raw data used for the last run of `spam-stat-score-buffer',
524check the variable `spam-stat-score-data'." 520check the variable `spam-stat-score-data'."
525 (condition-case spam-stat-error-holder 521 (condition-case err
526 (progn 522 (progn
527 (set-buffer spam-stat-buffer) 523 (set-buffer spam-stat-buffer)
528 (goto-char (point-min)) 524 (goto-char (point-min))
@@ -532,7 +528,7 @@ check the variable `spam-stat-score-data'."
532 (push entry nnmail-split-trace)) 528 (push entry nnmail-split-trace))
533 spam-stat-score-data)) 529 spam-stat-score-data))
534 spam-stat-split-fancy-spam-group)) 530 spam-stat-split-fancy-spam-group))
535 (error (message "Error in spam-stat-split-fancy: %S" spam-stat-error-holder) 531 (error (message "Error in spam-stat-split-fancy: %S" err)
536 nil))) 532 nil)))
537 533
538;; Testing 534;; Testing
diff --git a/lisp/gnus/spam-wash.el b/lisp/gnus/spam-wash.el
index 1c755fb464e..bb2a1b97ada 100644
--- a/lisp/gnus/spam-wash.el
+++ b/lisp/gnus/spam-wash.el
@@ -1,4 +1,4 @@
1;;; spam-wash.el --- wash spam before analysis 1;;; spam-wash.el --- wash spam before analysis -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 2004, 2007-2021 Free Software Foundation, Inc. 3;; Copyright (C) 2004, 2007-2021 Free Software Foundation, Inc.
4 4
@@ -43,7 +43,7 @@
43 (handles (or (mm-dissect-buffer nil gnus-article-loose-mime) 43 (handles (or (mm-dissect-buffer nil gnus-article-loose-mime)
44 (and gnus-article-emulate-mime 44 (and gnus-article-emulate-mime
45 (mm-uu-dissect)))) 45 (mm-uu-dissect))))
46 handle) 46 ) ;; handle
47 (when gnus-article-mime-handles 47 (when gnus-article-mime-handles
48 (mm-destroy-parts gnus-article-mime-handles) 48 (mm-destroy-parts gnus-article-mime-handles)
49 (setq gnus-article-mime-handle-alist nil)) 49 (setq gnus-article-mime-handle-alist nil))
diff --git a/lisp/gnus/spam.el b/lisp/gnus/spam.el
index 00dcd00ceab..f7288c98f6f 100644
--- a/lisp/gnus/spam.el
+++ b/lisp/gnus/spam.el
@@ -1,4 +1,4 @@
1;;; spam.el --- Identifying spam 1;;; spam.el --- Identifying spam -*- lexical-binding: t; -*-
2 2
3;; Copyright (C) 2002-2021 Free Software Foundation, Inc. 3;; Copyright (C) 2002-2021 Free Software Foundation, Inc.
4 4
@@ -1387,7 +1387,7 @@ In the case of mover backends, checks the setting of
1387 (gnus-check-backend-function 1387 (gnus-check-backend-function
1388 'request-move-article gnus-newsgroup-name)) 1388 'request-move-article gnus-newsgroup-name))
1389 (respool-method (gnus-find-method-for-group gnus-newsgroup-name)) 1389 (respool-method (gnus-find-method-for-group gnus-newsgroup-name))
1390 article mark deletep respool valid-move-destinations) 1390 deletep respool valid-move-destinations) ;; article mark
1391 1391
1392 (when (member 'respool groups) 1392 (when (member 'respool groups)
1393 (setq respool t) ; boolean for later 1393 (setq respool t) ; boolean for later
@@ -1807,7 +1807,7 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
1807 (log-function (if unregister 1807 (log-function (if unregister
1808 'spam-log-undo-registration 1808 'spam-log-undo-registration
1809 'spam-log-processing-to-registry)) 1809 'spam-log-processing-to-registry))
1810 article articles) 1810 articles) ;; article
1811 1811
1812 (when run-function 1812 (when run-function
1813 ;; make list of articles, using specific-articles if given 1813 ;; make list of articles, using specific-articles if given
@@ -1910,7 +1910,7 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
1910 1910
1911;; undo a ham- or spam-processor registration (the group is not used) 1911;; undo a ham- or spam-processor registration (the group is not used)
1912(defun spam-log-undo-registration (id type classification backend 1912(defun spam-log-undo-registration (id type classification backend
1913 &optional group) 1913 &optional _group)
1914 (when (and spam-log-to-registry 1914 (when (and spam-log-to-registry
1915 (spam-log-unregistration-needed-p id type classification backend)) 1915 (spam-log-unregistration-needed-p id type classification backend))
1916 (if (and (stringp id) 1916 (if (and (stringp id)
@@ -1918,7 +1918,7 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
1918 (spam-classification-valid-p classification) 1918 (spam-classification-valid-p classification)
1919 (spam-backend-valid-p backend)) 1919 (spam-backend-valid-p backend))
1920 (let ((cell-list (gnus-registry-get-id-key id type)) 1920 (let ((cell-list (gnus-registry-get-id-key id type))
1921 new-cell-list found) 1921 new-cell-list) ;; found
1922 (dolist (cell cell-list) 1922 (dolist (cell cell-list)
1923 (unless (and (eq classification (nth 0 cell)) 1923 (unless (and (eq classification (nth 0 cell))
1924 (eq backend (nth 1 cell))) 1924 (eq backend (nth 1 cell)))
@@ -2050,7 +2050,7 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
2050(declare-function bbdb-create-internal "bbdb-com" (&rest spec)) 2050(declare-function bbdb-create-internal "bbdb-com" (&rest spec))
2051 2051
2052;; when the BBDB changes, we want to clear out our cache 2052;; when the BBDB changes, we want to clear out our cache
2053(defun spam-clear-cache-BBDB (&rest immaterial) 2053(defun spam-clear-cache-BBDB (&rest _immaterial)
2054 (spam-clear-cache 'spam-use-BBDB)) 2054 (spam-clear-cache 'spam-use-BBDB))
2055 2055
2056(when (featurep 'bbdb-com) 2056(when (featurep 'bbdb-com)
@@ -2150,7 +2150,7 @@ Uses `gnus-newsgroup-name' if category is nil (for ham registration)."
2150 (let ((category (or category gnus-newsgroup-name)) 2150 (let ((category (or category gnus-newsgroup-name))
2151 (add-or-delete-option (if unregister "-d" "-i")) 2151 (add-or-delete-option (if unregister "-d" "-i"))
2152 (db (spam-get-ifile-database-parameter)) 2152 (db (spam-get-ifile-database-parameter))
2153 parameters) 2153 ) ;; parameters
2154 (with-temp-buffer 2154 (with-temp-buffer
2155 (dolist (article articles) 2155 (dolist (article articles)
2156 (let ((article-string (spam-get-article-as-string article))) 2156 (let ((article-string (spam-get-article-as-string article)))
@@ -2184,7 +2184,7 @@ Uses `gnus-newsgroup-name' if category is nil (for ham registration)."
2184 "Check the spam-stat backend for the classification of this message." 2184 "Check the spam-stat backend for the classification of this message."
2185 (let ((spam-stat-split-fancy-spam-group spam-split-group) ; override 2185 (let ((spam-stat-split-fancy-spam-group spam-split-group) ; override
2186 (spam-stat-buffer (buffer-name)) ; stat the current buffer 2186 (spam-stat-buffer (buffer-name)) ; stat the current buffer
2187 category return) 2187 ) ;; category return
2188 (spam-stat-split-fancy))) 2188 (spam-stat-split-fancy)))
2189 2189
2190(defun spam-stat-register-spam-routine (articles &optional unregister) 2190(defun spam-stat-register-spam-routine (articles &optional unregister)
@@ -2335,7 +2335,7 @@ With a non-nil REMOVE, remove the ADDRESSES."
2335 2335
2336(defun spam-from-listed-p (type) 2336(defun spam-from-listed-p (type)
2337 (let ((from (message-fetch-field "from")) 2337 (let ((from (message-fetch-field "from"))
2338 found) 2338 ) ;; found
2339 (spam-filelist-check-cache type from))) 2339 (spam-filelist-check-cache type from)))
2340 2340
2341(defun spam-filelist-register-routine (articles blacklist &optional unregister) 2341(defun spam-filelist-register-routine (articles blacklist &optional unregister)
@@ -2345,7 +2345,7 @@ With a non-nil REMOVE, remove the ADDRESSES."
2345 (if blacklist 'spam-enter-blacklist 'spam-enter-whitelist)) 2345 (if blacklist 'spam-enter-blacklist 'spam-enter-whitelist))
2346 (remove-function 2346 (remove-function
2347 (if blacklist 'spam-enter-whitelist 'spam-enter-blacklist)) 2347 (if blacklist 'spam-enter-whitelist 'spam-enter-blacklist))
2348 from addresses unregister-list article-unregister-list) 2348 addresses unregister-list article-unregister-list) ;; from
2349 (dolist (article articles) 2349 (dolist (article articles)
2350 (let ((from (spam-fetch-field-from-fast article)) 2350 (let ((from (spam-fetch-field-from-fast article))
2351 (id (spam-fetch-field-message-id-fast article)) 2351 (id (spam-fetch-field-message-id-fast article))
@@ -2562,13 +2562,13 @@ With a non-nil REMOVE, remove the ADDRESSES."
2562(defun spam-spamoracle-learn-ham (articles &optional unregister) 2562(defun spam-spamoracle-learn-ham (articles &optional unregister)
2563 (spam-spamoracle-learn articles nil unregister)) 2563 (spam-spamoracle-learn articles nil unregister))
2564 2564
2565(defun spam-spamoracle-unlearn-ham (articles &optional unregister) 2565(defun spam-spamoracle-unlearn-ham (articles &optional _unregister)
2566 (spam-spamoracle-learn-ham articles t)) 2566 (spam-spamoracle-learn-ham articles t))
2567 2567
2568(defun spam-spamoracle-learn-spam (articles &optional unregister) 2568(defun spam-spamoracle-learn-spam (articles &optional unregister)
2569 (spam-spamoracle-learn articles t unregister)) 2569 (spam-spamoracle-learn articles t unregister))
2570 2570
2571(defun spam-spamoracle-unlearn-spam (articles &optional unregister) 2571(defun spam-spamoracle-unlearn-spam (articles &optional _unregister)
2572 (spam-spamoracle-learn-spam articles t)) 2572 (spam-spamoracle-learn-spam articles t))
2573 2573
2574;;}}} 2574;;}}}