From: kaoru Date: Fri, 1 Jan 2010 05:00:56 +0000 (+0000) Subject: * elmo-util.el (elmo-set-work-buf): Use `with-current-buffer' X-Git-Tag: elmo-imap4-compliance-root~80 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc4cc50f1c51fcb23f96c97452101cc7ffc58d7d;p=elisp%2Fwanderlust.git * elmo-util.el (elmo-set-work-buf): Use `with-current-buffer' instead of `save-excursion' (for suppress compile warnings). * elmo-pop3.el (elmo-pop3-retrieve-headers): Ditto. * elmo-nntp.el (elmo-nntp-list-folders-get-cache): Ditto. (elmo-nntp-post): Ditto. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 7aa1cf6..c2665b7 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,11 @@ +2010-01-01 TAKAHASHI Kaoru + + * elmo-util.el (elmo-set-work-buf): Use `with-current-buffer' + instead of `save-excursion' (for suppress compile warnings). + * elmo-pop3.el (elmo-pop3-retrieve-headers): Ditto. + * elmo-nntp.el (elmo-nntp-list-folders-get-cache): Ditto. + (elmo-nntp-post): Ditto. + 2009-08-01 TAKAHASHI Kaoru * utf7.el (utf7-get-u16char-converter): Revert BOM workaround for diff --git a/elmo/elmo-nntp.el b/elmo/elmo-nntp.el index f297f95..7d87353 100644 --- a/elmo/elmo-nntp.el +++ b/elmo/elmo-nntp.el @@ -454,8 +454,7 @@ Don't cache if nil.") (let* ((cache-time (car elmo-nntp-list-folders-cache))) (unless (elmo-time-expire cache-time elmo-nntp-list-folders-use-cache) - (save-excursion - (set-buffer buf) + (with-current-buffer buf (erase-buffer) (insert (nth 3 elmo-nntp-list-folders-cache)) (goto-char (point-min)) @@ -981,8 +980,7 @@ Don't cache if nil.") (elmo-get-network-stream-type elmo-nntp-default-stream-type)))) response has-message-id) - (save-excursion - (set-buffer content-buf) + (with-current-buffer content-buf (goto-char (point-min)) (if (search-forward mail-header-separator nil t) (delete-region (match-beginning 0)(match-end 0))) diff --git a/elmo/elmo-pop3.el b/elmo/elmo-pop3.el index 321af6b..0f05663 100644 --- a/elmo/elmo-pop3.el +++ b/elmo/elmo-pop3.el @@ -639,8 +639,7 @@ until the login delay period has expired")) nil))) (defun elmo-pop3-retrieve-headers (process tobuffer articles) - (save-excursion - (set-buffer (process-buffer process)) + (with-current-buffer (process-buffer process) (erase-buffer) (let ((count 0) (received 0) diff --git a/elmo/elmo-util.el b/elmo/elmo-util.el index b796432..e206ebd 100644 --- a/elmo/elmo-util.el +++ b/elmo/elmo-util.el @@ -71,8 +71,7 @@ (defmacro elmo-set-work-buf (&rest body) "Execute BODY on work buffer. Work buffer remains." - `(save-excursion - (set-buffer (get-buffer-create elmo-work-buf-name)) + `(with-current-buffer (get-buffer-create elmo-work-buf-name) (set-buffer-multibyte default-enable-multibyte-characters) (erase-buffer) ,@body))