aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2015-07-10 16:17:13 -0400
committerStefan Monnier2015-07-10 16:17:13 -0400
commit83d824bc4041332f338ad7e5e830f443535aa300 (patch)
treeed164c569e708fcd2cb6057870ffd099b1d31a67
parent8badbad184c75d6a9b17b72900ca091a1bd11397 (diff)
downloademacs-83d824bc4041332f338ad7e5e830f443535aa300.tar.gz
emacs-83d824bc4041332f338ad7e5e830f443535aa300.zip
* lisp/gnus/nnimap.el: Clean up "unused var" warnings
(auth-source-creation-prompts): Declare. (nnimap-retrieve-headers, nnimap-status-message) (nnimap-request-create-group, nnimap-request-delete-group) (nnimap-close-group, nnimap-request-move-article) (nnimap-request-accept-article, nnimap-request-newgroups) (nnimap-request-post, nnimap-dummy-active-number) (nnimap-save-mail-spec, nnimap-get-groups): Add _ to unused vars. (nnimap-parse-flags): Remove unused var `p'. (nnimap-retrieve-group-data-early): Remove unused var `groups'. (nnimap-flags-to-marks): Remove unused var `totalp'.
-rw-r--r--lisp/gnus/nnimap.el35
1 files changed, 19 insertions, 16 deletions
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el
index 8eb6268a140..5f3f6be88a5 100644
--- a/lisp/gnus/nnimap.el
+++ b/lisp/gnus/nnimap.el
@@ -182,7 +182,7 @@ textual parts.")
182 params) 182 params)
183 (format "%s" (nreverse params)))) 183 (format "%s" (nreverse params))))
184 184
185(deffoo nnimap-retrieve-headers (articles &optional group server fetch-old) 185(deffoo nnimap-retrieve-headers (articles &optional group server _fetch-old)
186 (when group 186 (when group
187 (setq group (nnimap-decode-gnus-group group))) 187 (setq group (nnimap-decode-gnus-group group)))
188 (with-current-buffer nntp-server-buffer 188 (with-current-buffer nntp-server-buffer
@@ -330,6 +330,8 @@ textual parts.")
330 (push (current-buffer) nnimap-process-buffers) 330 (push (current-buffer) nnimap-process-buffers)
331 (current-buffer))) 331 (current-buffer)))
332 332
333(defvar auth-source-creation-prompts)
334
333(defun nnimap-credentials (address ports user) 335(defun nnimap-credentials (address ports user)
334 (let* ((auth-source-creation-prompts 336 (let* ((auth-source-creation-prompts
335 '((user . "IMAP user at %h: ") 337 '((user . "IMAP user at %h: ")
@@ -585,7 +587,7 @@ textual parts.")
585 (gnus-buffer-live-p nntp-server-buffer) 587 (gnus-buffer-live-p nntp-server-buffer)
586 (nnimap-find-connection nntp-server-buffer))) 588 (nnimap-find-connection nntp-server-buffer)))
587 589
588(deffoo nnimap-status-message (&optional server) 590(deffoo nnimap-status-message (&optional _server)
589 nnimap-status-string) 591 nnimap-status-string)
590 592
591(deffoo nnimap-request-article (article &optional group server to-buffer) 593(deffoo nnimap-request-article (article &optional group server to-buffer)
@@ -858,13 +860,13 @@ textual parts.")
858 "211 %d %d %d %S\n" (1+ (- high low)) low high group)) 860 "211 %d %d %d %S\n" (1+ (- high low)) low high group))
859 t)))) 861 t))))
860 862
861(deffoo nnimap-request-create-group (group &optional server args) 863(deffoo nnimap-request-create-group (group &optional server _args)
862 (setq group (nnimap-decode-gnus-group group)) 864 (setq group (nnimap-decode-gnus-group group))
863 (when (nnimap-change-group nil server) 865 (when (nnimap-change-group nil server)
864 (with-current-buffer (nnimap-buffer) 866 (with-current-buffer (nnimap-buffer)
865 (car (nnimap-command "CREATE %S" (utf7-encode group t)))))) 867 (car (nnimap-command "CREATE %S" (utf7-encode group t))))))
866 868
867(deffoo nnimap-request-delete-group (group &optional force server) 869(deffoo nnimap-request-delete-group (group &optional _force server)
868 (setq group (nnimap-decode-gnus-group group)) 870 (setq group (nnimap-decode-gnus-group group))
869 (when (nnimap-change-group nil server) 871 (when (nnimap-change-group nil server)
870 (with-current-buffer (nnimap-buffer) 872 (with-current-buffer (nnimap-buffer)
@@ -909,11 +911,11 @@ textual parts.")
909 articles))) 911 articles)))
910 (nreverse articles))) 912 (nreverse articles)))
911 913
912(deffoo nnimap-close-group (group &optional server) 914(deffoo nnimap-close-group (_group &optional _server)
913 t) 915 t)
914 916
915(deffoo nnimap-request-move-article (article group server accept-form 917(deffoo nnimap-request-move-article (article group server accept-form
916 &optional last internal-move-group) 918 &optional _last internal-move-group)
917 (setq group (nnimap-decode-gnus-group group)) 919 (setq group (nnimap-decode-gnus-group group))
918 (when internal-move-group 920 (when internal-move-group
919 (setq internal-move-group (nnimap-decode-gnus-group internal-move-group))) 921 (setq internal-move-group (nnimap-decode-gnus-group internal-move-group)))
@@ -1144,7 +1146,7 @@ If LIMIT, first try to limit the search to the N last articles."
1144 (when sequence 1146 (when sequence
1145 (nnimap-wait-for-response sequence)))))) 1147 (nnimap-wait-for-response sequence))))))
1146 1148
1147(deffoo nnimap-request-accept-article (group &optional server last) 1149(deffoo nnimap-request-accept-article (group &optional server _last)
1148 (unless group 1150 (unless group
1149 ;; We're respooling. Find out where mail splitting would place 1151 ;; We're respooling. Find out where mail splitting would place
1150 ;; this article. 1152 ;; this article.
@@ -1262,7 +1264,7 @@ If LIMIT, first try to limit the search to the N last articles."
1262 (goto-char (point-min)) 1264 (goto-char (point-min))
1263 (while (search-forward "* LIST " nil t) 1265 (while (search-forward "* LIST " nil t)
1264 (let ((flags (read (current-buffer))) 1266 (let ((flags (read (current-buffer)))
1265 (separator (read (current-buffer))) 1267 (_separator (read (current-buffer)))
1266 (group (buffer-substring-no-properties 1268 (group (buffer-substring-no-properties
1267 (progn (skip-chars-forward " \"") 1269 (progn (skip-chars-forward " \"")
1268 (point)) 1270 (point))
@@ -1272,7 +1274,8 @@ If LIMIT, first try to limit the search to the N last articles."
1272 (unless (member '%NoSelect flags) 1274 (unless (member '%NoSelect flags)
1273 (push (utf7-decode (if (stringp group) 1275 (push (utf7-decode (if (stringp group)
1274 group 1276 group
1275 (format "%s" group)) t) 1277 (format "%s" group))
1278 t)
1276 groups)))) 1279 groups))))
1277 (nreverse groups))) 1280 (nreverse groups)))
1278 1281
@@ -1332,7 +1335,7 @@ If LIMIT, first try to limit the search to the N last articles."
1332 (or highest exists))))))))) 1335 (or highest exists)))))))))
1333 t))))) 1336 t)))))
1334 1337
1335(deffoo nnimap-request-newgroups (date &optional server) 1338(deffoo nnimap-request-newgroups (_date &optional server)
1336 (when (nnimap-change-group nil server) 1339 (when (nnimap-change-group nil server)
1337 (with-current-buffer nntp-server-buffer 1340 (with-current-buffer nntp-server-buffer
1338 (erase-buffer) 1341 (erase-buffer)
@@ -1351,7 +1354,7 @@ If LIMIT, first try to limit the search to the N last articles."
1351 (setf (nnimap-group nnimap-object) nil) 1354 (setf (nnimap-group nnimap-object) nil)
1352 (setf (nnimap-initial-resync nnimap-object) 0) 1355 (setf (nnimap-initial-resync nnimap-object) 0)
1353 (let ((qresyncp (nnimap-capability "QRESYNC")) 1356 (let ((qresyncp (nnimap-capability "QRESYNC"))
1354 params groups sequences active uidvalidity modseq group 1357 params sequences active uidvalidity modseq group
1355 unexist) 1358 unexist)
1356 ;; Go through the infos and gather the data needed to know 1359 ;; Go through the infos and gather the data needed to know
1357 ;; what and how to request the data. 1360 ;; what and how to request the data.
@@ -1665,7 +1668,7 @@ If LIMIT, first try to limit the search to the N last articles."
1665 (push (list group info active) nnimap-current-infos)))) 1668 (push (list group info active) nnimap-current-infos))))
1666 1669
1667(defun nnimap-flags-to-marks (groups) 1670(defun nnimap-flags-to-marks (groups)
1668 (let (data group totalp uidnext articles start-article mark permanent-flags 1671 (let (data group uidnext articles start-article mark permanent-flags
1669 uidvalidity vanished highestmodseq) 1672 uidvalidity vanished highestmodseq)
1670 (dolist (elem groups) 1673 (dolist (elem groups)
1671 (setq group (car elem) 1674 (setq group (car elem)
@@ -1756,7 +1759,7 @@ If LIMIT, first try to limit the search to the N last articles."
1756 (setq start (point)) 1759 (setq start (point))
1757 (goto-char end)) 1760 (goto-char end))
1758 (while (re-search-forward "^\\* [0-9]+ FETCH " start t) 1761 (while (re-search-forward "^\\* [0-9]+ FETCH " start t)
1759 (let ((p (point))) 1762 (progn
1760 (setq elems (read (current-buffer))) 1763 (setq elems (read (current-buffer)))
1761 (push (cons (cadr (memq 'UID elems)) 1764 (push (cons (cadr (memq 'UID elems))
1762 (cadr (memq 'FLAGS elems))) 1765 (cadr (memq 'FLAGS elems)))
@@ -1774,7 +1777,7 @@ If LIMIT, first try to limit the search to the N last articles."
1774(defun nnimap-find-process-buffer (buffer) 1777(defun nnimap-find-process-buffer (buffer)
1775 (cadr (assoc buffer nnimap-connection-alist))) 1778 (cadr (assoc buffer nnimap-connection-alist)))
1776 1779
1777(deffoo nnimap-request-post (&optional server) 1780(deffoo nnimap-request-post (&optional _server)
1778 (setq nnimap-status-string "Read-only server") 1781 (setq nnimap-status-string "Read-only server")
1779 nil) 1782 nil)
1780 1783
@@ -2176,10 +2179,10 @@ Return the server's response to the SELECT or EXAMINE command."
2176 (forward-char (1+ bytes)) 2179 (forward-char (1+ bytes))
2177 (delete-region (line-beginning-position) (line-end-position))))))) 2180 (delete-region (line-beginning-position) (line-end-position)))))))
2178 2181
2179(defun nnimap-dummy-active-number (group &optional server) 2182(defun nnimap-dummy-active-number (_group &optional _server)
2180 1) 2183 1)
2181 2184
2182(defun nnimap-save-mail-spec (group-art &optional server full-nov) 2185(defun nnimap-save-mail-spec (group-art &optional _server _full-nov)
2183 (let (article) 2186 (let (article)
2184 (goto-char (point-min)) 2187 (goto-char (point-min))
2185 (if (not (re-search-forward "X-nnimap-article: \\([0-9]+\\)" nil t)) 2188 (if (not (re-search-forward "X-nnimap-article: \\([0-9]+\\)" nil t))