`with-current-buffer' instead of `save-excursion' & `set-buffer'.
* wl-action.el (wl-summary-exec-action-resend-subr): Ditto.
* wl-address.el (wl-complete-window-show): Ditto.
* wl-message.el (wl-message-select-buffer): Ditto.
* wl-template.el (wl-template-show): Ditto.
* wl-util.el (wl-collect-summary): Ditto.
* wl-util.el (wl-collect-summary): Use `eq' instead of `equal' for
symbol.
+ * wl.el (wl-plugged-change): Suppress compile warnings; Use
+ `with-current-buffer' instead of `save-excursion' & `set-buffer'.
+ * wl-action.el (wl-summary-exec-action-resend-subr): Ditto.
+ * wl-address.el (wl-complete-window-show): Ditto.
+ * wl-message.el (wl-message-select-buffer): Ditto.
+ * wl-template.el (wl-template-show): Ditto.
+ * wl-util.el (wl-collect-summary): Ditto.
+
2009-12-16 Lloyd Zusman <ljz@asfast.com>
* wl-summary.el (wl-summary-detect-mark-position): Force
"Resend the message with NUMBER to ADDRESS."
(message "Resending message to %s..." address)
(let ((folder wl-summary-buffer-elmo-folder))
- (save-excursion
+ (with-current-buffer (get-buffer-create " *wl-draft-resend*")
;; We first set up a normal mail buffer.
- (set-buffer (get-buffer-create " *wl-draft-resend*"))
(set-buffer-multibyte nil)
(erase-buffer)
(setq wl-sent-message-via nil)
(if (and (get-buffer-window wl-completion-buf-name)
(equal wl-complete-candidates all))
(let ((win (get-buffer-window wl-completion-buf-name)))
- (save-excursion
- (set-buffer wl-completion-buf-name)
+ (with-current-buffer wl-completion-buf-name
(if (pos-visible-in-window-p (point-max) win)
(set-window-start win 1)
(scroll-other-window))))
(mes (cdr wl-message-window-size))
whi)
(when (and window
- (not (eq (save-excursion (set-buffer (window-buffer window))
- wl-message-buffer-cur-summary-buffer)
+ (not (eq (with-current-buffer (window-buffer window)
+ wl-message-buffer-cur-summary-buffer)
(current-buffer))))
(delete-window window)
(run-hooks 'wl-message-window-deleted-hook)
(defun wl-template-show (&optional arg)
"Show reference INDEX in `wl-template-alist'.
ARG is ignored." ; ARG ignored this version (?)
- (save-excursion
- (set-buffer wl-template-buffer-name)
+ (with-current-buffer wl-template-buffer-name
(let ((buffer-read-only nil)
(wl-template-preview t)
(mail-header-separator "--header separater--"))
(function (lambda (x)
(if (and (string-match "^Summary"
(buffer-name x))
- (save-excursion
- (set-buffer x)
+ (with-current-buffer x
(eq major-mode 'wl-summary-mode)))
(setq result (nconc result (list x))))))
(buffer-list))
(/ (frame-height) 2)
(window-height)))
window-lines lines)
- (save-excursion
- (set-buffer (get-buffer-create wl-plugged-buf-name))
+ (with-current-buffer (get-buffer-create wl-plugged-buf-name)
(wl-plugged-mode)
(buffer-disable-undo (current-buffer))
(delete-windows-on (current-buffer))