From: Steve Youngs Date: Mon, 9 Mar 2020 05:32:53 +0000 (+1000) Subject: Gnus -- minor build / warning fixes [OK For Upstream] X-Git-Url: https://cgit.sxemacs.org/?p=gnus;a=commitdiff_plain Gnus -- minor build / warning fixes [OK For Upstream] * lisp/smime.el (smime-decrypt-region): Remove unused 'CAs'. * lisp/nnml.el (nnml-generate-nov-file): Remove unnecessary let-bound 'file' as the #'dolist will care for it. * lisp/nnmh.el (nnmh-request-list-1): Remove unnecessary let-bound 'rdir' the #'dolist will care for it. * lisp/nnmairix.el (nnmairix-request-group): Remove unused 'args'. * lisp/mailcap.el (mailcap-viewer-passes-test): Remove unused 'parsed-test'. (mailcap-mime-info): Comment out 'save-pos', 'minor-info', 'test'. All unused. * lisp/ietf-drums.el (ietf-drums-remove-comments): Use 'nil' instead of 'err' in the #'condition-case. * lisp/gnus.el (gnus-short-group-name): Comment out unused var, 'name'. * lisp/gnus-uu.el (gnus-uu-yenc-article): Remove unused 'start-char'. * lisp/gnus-sum.el (gnus-adjust-marked-articles): Remove unnecessary let-bound var, 'marks', the #'dolist will care for it. (gnus-summary-better-unread-subject): Remove unused 'score'. (gnus-summary-find-matching): Remove unused 'd'. * lisp/gnus-picon.el (gnus-picon-find-face): Don't let-bind 'database', 'directory', 'instance', they're all defined later via #'dolist. (gnus-picon-transform-newsgroups): Remove unused local var, 'point'. * lisp/gnus-msg.el (gnus-configure-posting-styles): Remove unnecessary let-bound variables, 'style' and 'attribute', They are both defined later in a #'dolist. * lisp/gnus-html.el (gnus-html-wash-images): Remove unused local vars, 'tag', 'string', 'images'. (gnus-html-wash-tags): Ditto 'string' 'images'. * lisp/gnus-delay.el (gnus-delay-article): Remove unused local var, 'days'. * lisp/gnus-cloud.el (gnus-cloud-ensure-cloud-group): Use the let-bound 'method' in the body of the function. * lisp/gnus-bookmark.el (gnus-bookmark-bmenu-list): Remove unused local vars, 'start', 'end'. * lisp/deuglify.el (gnus-outlook-rearrange-article): Comment out unused local vars. * lisp/binhex.el (binhex-decode-region-external): Remove unused local var, 'status'. * lisp/assistant.el (assistant-find-next-nodes): Remove unused local var, 'next'. Signed-off-by: Steve Youngs (cherry picked from commit c80271fad8861d9c475d58001c924c3ab4140a68) --- diff --git a/lisp/assistant.el b/lisp/assistant.el index 93d72193f..dd715974c 100644 --- a/lisp/assistant.el +++ b/lisp/assistant.el @@ -403,7 +403,7 @@ (defun assistant-find-next-nodes (&optional node) (let* ((node (assistant-find-node (or node assistant-current-node))) (nexts (assistant-get-list node "next")) - next elem applicable return) + elem applicable return) (while (setq elem (pop nexts)) (when (assistant-eval (car (cadr elem))) diff --git a/lisp/binhex.el b/lisp/binhex.el index a5f3982d0..1072f2769 100644 --- a/lisp/binhex.el +++ b/lisp/binhex.el @@ -287,7 +287,7 @@ If HEADER-ONLY is non-nil only decode header and return filename." (defun binhex-decode-region-external (start end) "Binhex decode region between START and END using external decoder." (interactive "r") - (let ((cbuf (current-buffer)) firstline work-buffer status + (let ((cbuf (current-buffer)) firstline work-buffer (file-name (expand-file-name (concat (binhex-decode-region-internal start end t) ".data") diff --git a/lisp/deuglify.el b/lisp/deuglify.el index c74f69e70..9a43dfc23 100644 --- a/lisp/deuglify.el +++ b/lisp/deuglify.el @@ -337,7 +337,8 @@ NODISPLAY is non-nil, don't redisplay the article buffer." "Put the text from ATTR-START to the end of buffer at the top of the article buffer." ;; FIXME: 1. (*) text/plain ( ) text/html (let ((inhibit-read-only t) - (cite-marks gnus-outlook-deuglify-cite-marks)) + ;; (cite-marks gnus-outlook-deuglify-cite-marks) + ) (gnus-with-article-buffer (article-goto-body) ;; article does not start with attribution diff --git a/lisp/gnus-bookmark.el b/lisp/gnus-bookmark.el index 1a082c255..1bb91846b 100644 --- a/lisp/gnus-bookmark.el +++ b/lisp/gnus-bookmark.el @@ -371,7 +371,7 @@ deletion, or > if it is flagged for displaying." (switch-to-buffer (get-buffer-create "*Gnus Bookmark List*")) (set-buffer (get-buffer-create "*Gnus Bookmark List*"))) (let ((inhibit-read-only t) - alist name start end) + alist name) (erase-buffer) (insert "% Gnus Bookmark\n- --------\n") (add-text-properties (point-min) (point) diff --git a/lisp/gnus-cloud.el b/lisp/gnus-cloud.el index a6a0f6460..52b1360b9 100644 --- a/lisp/gnus-cloud.el +++ b/lisp/gnus-cloud.el @@ -241,10 +241,9 @@ (gnus-server-to-method gnus-cloud-method) gnus-cloud-method))) (unless (or (gnus-active gnus-cloud-group-name) - (gnus-activate-group gnus-cloud-group-name nil nil - gnus-cloud-method)) - (and (gnus-request-create-group gnus-cloud-group-name gnus-cloud-method) - (gnus-activate-group gnus-cloud-group-name nil nil gnus-cloud-method) + (gnus-activate-group gnus-cloud-group-name nil nil method)) + (and (gnus-request-create-group gnus-cloud-group-name method) + (gnus-activate-group gnus-cloud-group-name nil nil method) (gnus-subscribe-group gnus-cloud-group-name))))) (defun gnus-cloud-upload-data (&optional full) diff --git a/lisp/gnus-delay.el b/lisp/gnus-delay.el index 93069e5e4..886b16c61 100644 --- a/lisp/gnus-delay.el +++ b/lisp/gnus-delay.el @@ -82,7 +82,7 @@ DELAY is a string, giving the length of the time. Possible values are: gnus-delay-default-delay))) ;; Allow spell checking etc. (run-hooks 'message-send-hook) - (let (num unit days year month day hour minute deadline) + (let (num unit year month day hour minute deadline) (cond ((string-match "\\([0-9][0-9][0-9]?[0-9]?\\)-\\([0-9]+\\)-\\([0-9]+\\)" delay) diff --git a/lisp/gnus-html.el b/lisp/gnus-html.el index 884b40e93..f23acf10b 100644 --- a/lisp/gnus-html.el +++ b/lisp/gnus-html.el @@ -174,8 +174,7 @@ CHARS is a regexp-like character alternative (e.g., \"[)$]\")." (defun gnus-html-wash-images () "Run through current buffer and replace img tags by images." - (let (tag parameters string start end images url alt-text - inhibit-images blocked-images) + (let (parameters start end url alt-text inhibit-images blocked-images) (if (buffer-live-p gnus-summary-buffer) (with-current-buffer gnus-summary-buffer (setq inhibit-images gnus-inhibit-images @@ -279,7 +278,7 @@ Use ALT-TEXT for the image string." (gnus-html-put-image (gnus-html-get-image-data url) url alt-text)))) (defun gnus-html-wash-tags () - (let (tag parameters string start end images url) + (let (tag parameters start end url) (gnus-html-pre-wash) (gnus-html-wash-images) diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index b95bec2ac..c6985897a 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -1835,7 +1835,7 @@ this is a reply." (with-current-buffer gnus-summary-buffer gnus-posting-styles) gnus-posting-styles)) - style match attribute value v results matched-string + match value v results matched-string filep name address element) ;; If the group has a posting-style parameter, add it at the end with a ;; regexp matching everything, to be sure it takes precedence over all diff --git a/lisp/gnus-picon.el b/lisp/gnus-picon.el index 6365e8e2f..c58059f27 100644 --- a/lisp/gnus-picon.el +++ b/lisp/gnus-picon.el @@ -113,7 +113,7 @@ List of pairs (KEY . GLYPH) where KEY is either a filename or an URL.") (let* ((address (gnus-picon-split-address address)) (user (pop address)) (faddress address) - database directory result instance base) + result base) (catch 'found (dolist (database gnus-picon-databases) (dolist (directory directories) @@ -249,7 +249,7 @@ replacement is added." (gnus-article-goto-header header) (mail-header-narrow-to-field) (let ((groups (message-tokenize-header (mail-fetch-field header))) - spec file point) + spec file) (dolist (group groups) (unless (setq spec (cdr (assoc group gnus-picon-cache))) (setq spec (nreverse (split-string group "[.]"))) diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 3dbcc21e6..5fc78baec 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -5971,7 +5971,7 @@ If SELECT-ARTICLES, only select those articles from GROUP." (min (car active)) (max (cdr active)) (types gnus-article-mark-lists) - marks var articles article mark mark-type + var articles article mark mark-type bgn end) ;; Hack to avoid adjusting marks for imap. (when (eq (car (gnus-find-method-for-group (gnus-info-group info))) @@ -8146,7 +8146,7 @@ score higher than the default score." "Select the first unread subject that has a score over the default score." (interactive) (let ((data gnus-newsgroup-data) - article score) + article) (while (and (setq article (gnus-data-number (car data))) (or (gnus-data-read-p (car data)) (not (> (gnus-summary-article-score article) @@ -9519,7 +9519,7 @@ be taken into consideration. If NOT-CASE-FOLD, case won't be folded in the comparisons. If NOT-MATCHING, return a list of all articles that not match REGEXP on HEADER." (let ((case-fold-search (not not-case-fold)) - articles d func) + articles func) (if (consp header) (if (eq (car header) 'extra) (setq func diff --git a/lisp/gnus-uu.el b/lisp/gnus-uu.el index 83f817fd8..31a185fb5 100644 --- a/lisp/gnus-uu.el +++ b/lisp/gnus-uu.el @@ -1024,7 +1024,7 @@ When called interactively, prompt for REGEXP." (with-current-buffer gnus-original-article-buffer (widen) (let ((file-name (yenc-extract-filename)) - state start-char) + state) (when (not file-name) (setq state (list 'wrong-type))) diff --git a/lisp/gnus.el b/lisp/gnus.el index 19807fce6..898751049 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -3995,7 +3995,7 @@ If SCORE is nil, add 1 to the score of GROUP." "Collapse GROUP name LEVELS. Select methods are stripped and any remote host name is stripped down to just the host name." - (let* ((name "") + (let* (;; (name "") -- unused? --SY. (foreign "") (depth 0) (skip 1) diff --git a/lisp/ietf-drums.el b/lisp/ietf-drums.el index 8008e3275..c0e1542fa 100644 --- a/lisp/ietf-drums.el +++ b/lisp/ietf-drums.el @@ -121,7 +121,7 @@ backslash and doublequote.") (setq c (char-after)) (cond ((eq c ?\") - (condition-case err + (condition-case nil (forward-sexp 1) (error (goto-char (point-max))))) ((eq c ?\() diff --git a/lisp/mailcap.el b/lisp/mailcap.el index bf7ba0817..8e491d7d3 100644 --- a/lisp/mailcap.el +++ b/lisp/mailcap.el @@ -645,7 +645,7 @@ to supply to the test." (otest test) (viewer (cdr (assq 'viewer viewer-info))) (default-directory (expand-file-name "~/")) - status parsed-test cache result) + status cache result) (cond ((not (or (stringp viewer) (fboundp viewer))) nil) ; Non-existent Lisp function ((setq cache (assoc test mailcap-viewer-test-cache)) @@ -745,10 +745,10 @@ If NO-DECODE is non-nil, don't decode STRING." major ; Major encoding (text, etc) minor ; Minor encoding (html, etc) info ; Other info - save-pos ; Misc. position during parse + ; save-pos ; Misc. position during parse (unused?) major-info ; (assoc major mailcap-mime-data) - minor-info ; (assoc minor major-info) - test ; current test proc. + ; minor-info ; (assoc minor major-info) (unused?) + ; test ; current test proc. (unused?) viewers ; Possible viewers passed ; Viewers that passed the test viewer ; The one and only viewer diff --git a/lisp/nnmairix.el b/lisp/nnmairix.el index d5fa4fa74..347e29421 100644 --- a/lisp/nnmairix.el +++ b/lisp/nnmairix.el @@ -437,7 +437,7 @@ Other back ends might or might not work.") (backendmethod (gnus-server-to-method (format "%s:%s" (symbol-name nnmairix-backend) nnmairix-backend-server))) - rval mfolder folderpath args) + rval mfolder folderpath) (cond ((not folder) ;; No folder parameter -> error diff --git a/lisp/nnmh.el b/lisp/nnmh.el index c60e84567..e0422dcae 100644 --- a/lisp/nnmh.el +++ b/lisp/nnmh.el @@ -208,7 +208,7 @@ as unread by Gnus.") ;; Recurse down all directories. (let ((files (nnheader-directory-files dir t nil t)) (max 0) - min rdir num subdirectoriesp file) + min num subdirectoriesp file) ;; Recurse down directories. (setq subdirectoriesp ;; nth 1 of file-attributes always 1 on MS Windows :( diff --git a/lisp/nnml.el b/lisp/nnml.el index 3350933f9..3a6f5291e 100644 --- a/lisp/nnml.el +++ b/lisp/nnml.el @@ -926,7 +926,7 @@ Unless no-active is non-nil, update the active file too." (let* ((dir (file-name-as-directory dir)) (nov (concat dir nnml-nov-file-name)) (nov-buffer (get-buffer-create " *nov*")) - chars file headers) + chars headers) (with-current-buffer nov-buffer ;; Init the nov buffer. (buffer-disable-undo) diff --git a/lisp/smime.el b/lisp/smime.el index d1077a96f..7a977019b 100644 --- a/lisp/smime.el +++ b/lisp/smime.el @@ -430,7 +430,8 @@ Any details (stderr on success, stdout and stderr on error) are left in the buffer specified by `smime-details-buffer'." (smime-new-details-buffer) (let ((buffer (generate-new-buffer " *smime*")) - CAs (passphrase (smime-ask-passphrase (expand-file-name keyfile))) + ;; CAs -- unused? --SY. + (passphrase (smime-ask-passphrase (expand-file-name keyfile))) (tmpfile (smime-make-temp-file "smime"))) (if passphrase (setenv "GNUS_SMIME_PASSPHRASE" passphrase))