Mercurial > emacs
changeset 110395:5be11972ce6a
Silence byte-compiler
* lisp/gnus/nnrss.el (nnrss-retrieve-headers, nnrss-request-list-newsgroups)
(nnrss-retrieve-groups):
* lisp/gnus/pop3.el (pop3-open-server, pop3-read-response, pop3-list)
(pop3-retr, pop3-quit): Use with-current-buffer.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Fri, 17 Sep 2010 16:22:06 +0200 |
parents | 22d1a86dc0da |
children | 2103fda73355 |
files | lisp/gnus/ChangeLog lisp/gnus/nnrss.el lisp/gnus/pop3.el |
diffstat | 3 files changed, 18 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/gnus/ChangeLog Fri Sep 17 15:30:30 2010 +0200 +++ b/lisp/gnus/ChangeLog Fri Sep 17 16:22:06 2010 +0200 @@ -1,3 +1,10 @@ +2010-09-17 Stefan Monnier <monnier@iro.umontreal.ca> + + * nnrss.el (nnrss-retrieve-headers, nnrss-request-list-newsgroups) + (nnrss-retrieve-groups): + * pop3.el (pop3-open-server, pop3-read-response, pop3-list, pop3-retr) + (pop3-quit): Use with-current-buffer. + 2010-09-17 Katsumi Yamaoka <yamaoka@jpl.org> * pop3.el (pop3-wait-for-messages): Use pop3-accept-process-output
--- a/lisp/gnus/nnrss.el Fri Sep 17 15:30:30 2010 +0200 +++ b/lisp/gnus/nnrss.el Fri Sep 17 16:22:06 2010 +0200 @@ -134,8 +134,7 @@ (setq group (nnrss-decode-group-name group)) (nnrss-possibly-change-group group server) (let (e) - (save-excursion - (set-buffer nntp-server-buffer) + (with-current-buffer nntp-server-buffer (erase-buffer) (dolist (article articles) (if (setq e (assq article nnrss-group-data)) @@ -384,8 +383,7 @@ (deffoo nnrss-request-list-newsgroups (&optional server) (nnrss-possibly-change-group nil server) - (save-excursion - (set-buffer nntp-server-buffer) + (with-current-buffer nntp-server-buffer (erase-buffer) (dolist (elem nnrss-group-alist) (if (third elem) @@ -396,8 +394,7 @@ (nnrss-possibly-change-group nil server) (dolist (group groups) (nnrss-check-group group server)) - (save-excursion - (set-buffer nntp-server-buffer) + (with-current-buffer nntp-server-buffer (erase-buffer) (dolist (group groups) (let ((elem (assoc group nnrss-server-data)))
--- a/lisp/gnus/pop3.el Fri Sep 17 15:30:30 2010 +0200 +++ b/lisp/gnus/pop3.el Fri Sep 17 16:22:06 2010 +0200 @@ -279,9 +279,9 @@ (let ((coding-system-for-read 'binary) (coding-system-for-write 'binary) process) - (save-excursion - (set-buffer (get-buffer-create (concat " trace of POP session to " - mailhost))) + (with-current-buffer + (get-buffer-create (concat " trace of POP session to " + mailhost)) (erase-buffer) (setq pop3-read-point (point-min)) (setq process @@ -353,8 +353,7 @@ Return the response string if optional second argument is non-nil." (let ((case-fold-search nil) match-end) - (save-excursion - (set-buffer (process-buffer process)) + (with-current-buffer (process-buffer process) (goto-char pop3-read-point) (while (and (memq (process-status process) '(open run)) (not (search-forward "\r\n" nil t))) @@ -511,8 +510,7 @@ (if msg (string-to-number (nth 2 (split-string response " "))) (let ((start pop3-read-point) end) - (save-excursion - (set-buffer (process-buffer process)) + (with-current-buffer (process-buffer process) (while (not (re-search-forward "^\\.\r\n" nil t)) (pop3-accept-process-output process) (goto-char start)) @@ -530,8 +528,7 @@ (pop3-send-command process (format "RETR %s" msg)) (pop3-read-response process) (let ((start pop3-read-point) end) - (save-excursion - (set-buffer (process-buffer process)) + (with-current-buffer (process-buffer process) (while (not (re-search-forward "^\\.\r\n" nil t)) (pop3-accept-process-output process) (goto-char start)) @@ -547,8 +544,7 @@ (setq end (point-marker)) (pop3-clean-region start end) (pop3-munge-message-separator start end) - (save-excursion - (set-buffer crashbuf) + (with-current-buffer crashbuf (erase-buffer)) (copy-to-buffer crashbuf start end) (delete-region start end) @@ -585,8 +581,7 @@ (pop3-send-command process "QUIT") (pop3-read-response process t) (if process - (save-excursion - (set-buffer (process-buffer process)) + (with-current-buffer (process-buffer process) (goto-char (point-max)) (delete-process process))))