2010-01-04 TAKAHASHI Kaoru <kaoru@kaisei.org>
+ * wl-message.el (wl-message-uu-substring): Suppress compile
+ warnings; Use `with-current-buffer' instead of `save-excursion' &
+ `set-buffer'.
+ * wl-mime.el (wl-draft-yank-current-message-entity)
+ (wl-mime-preview-follow-no-mime)
+ (wl-mime-preview-follow-current-region): Ditto.
+ * wl-summary.el (wl-summary-update-persistent-mark-on-event)
+ (wl-summary-switch-to-clone-buffer)
+ (wl-summary-target-mark-forward)
+ (wl-summary-target-mark-reply-with-citation)
+ (wl-summary-target-mark-uudecode): Ditto.
+
* wl-addrmgr.el (wl-addrmgr-replace-field): Use `point-at-bol'.
* wl-action.el (wl-summary-remove-argument): Explicit `point-at-bol'.
* wl-summary.el (wl-summary-narrow-to-region)
(wl-summary-redisplay)))
(defun wl-message-uu-substring (buf outbuf &optional first last)
- (save-excursion
- (set-buffer buf)
+ (with-current-buffer buf
(search-forward "\n\n")
(let ((sp (point))
ep filename case-fold-search)
(setq filename (buffer-substring (match-beginning 1)(match-end 1)))
(throw 'done nil)))
(re-search-forward "^M.*$" nil t)) ; uuencoded string
- (beginning-of-line)
- (setq sp (point))
+ (setq sp (point-at-bol))
(goto-char (point-max))
(if last
(re-search-backward "^end" sp t)
(re-search-backward "^M.*$" sp t)) ; uuencoded string
(forward-line 1)
(setq ep (point))
- (set-buffer outbuf)
- (goto-char (point-max))
- (insert-buffer-substring buf sp ep)
- (set-buffer buf)
+ (with-current-buffer outbuf
+ (goto-char (point-max))
+ (insert-buffer-substring buf sp ep))
filename))))
;;; Header narrowing courtesy of Hideyuki Shirai.
(function wl-draft-yank-to-draft-buffer))))
(message-buffer (wl-current-message-buffer)))
(if message-buffer
- (save-excursion
- (set-buffer message-buffer)
+ (with-current-buffer message-buffer
(save-restriction
(widen)
(cond
(setq min (point-min)
beg (re-search-forward "^$" nil t)
end (point-max)))
- (save-excursion
- (set-buffer (setq new-buf (get-buffer-create new-name)))
+ (with-current-buffer (setq new-buf (get-buffer-create new-name))
(erase-buffer)
(insert-buffer-substring the-buf beg end)
(goto-char (point-min))
new-buf
(the-buf (current-buffer))
fields)
- (save-excursion
- (set-buffer (setq new-buf (get-buffer-create new-name)))
+ (with-current-buffer (setq new-buf (get-buffer-create new-name))
(erase-buffer)
(insert ?\n)
(insert-buffer-substring the-buf r-beg r-end)
(setq field-name (car rest))
(or (std11-field-body field-name)
(progn
- (save-excursion
- (set-buffer the-buf)
+ (with-current-buffer the-buf
(let ((entity (when mime-mother-buffer
(set-buffer mime-mother-buffer)
(get-text-property (point)
;; Handler of event from elmo-folder
(defun wl-summary-update-persistent-mark-on-event (buffer numbers)
- (save-excursion
- (set-buffer buffer)
+ (with-current-buffer buffer
(if wl-summary-lazy-update-mark
(let ((window-list (get-buffer-window-list (current-buffer) 'nomini t))
invalidate)
(set-buffer-modified-p nil)
(while copy-variables
(set (car copy-variables)
- (save-excursion
- (set-buffer cur-buf)
+ (with-current-buffer cur-buf
(symbol-value (car copy-variables))))
(setq copy-variables (cdr copy-variables)))
(switch-to-buffer buf)
(setq buf (wl-summary-get-buffer-create (elmo-folder-name-internal folder)
sticky))
(setq reuse-buf
- (save-excursion
- (set-buffer buf)
+ (with-current-buffer buf
(string= (elmo-folder-name-internal folder)
(wl-summary-buffer-folder-name))))
(unwind-protect
(wl-draft-body-goto-top)
(wl-draft-enclose-digest-region (point) (point-max)))
(goto-char start-point)
- (save-excursion
- (set-buffer summary-buf)
+ (with-current-buffer summary-buf
(wl-summary-delete-all-target-marks)))
(run-hooks 'wl-mail-setup-hook)))
(wl-draft-yank-original)
(setq mlist (cdr mlist)))
(goto-char start-point)
- (save-excursion
- (set-buffer summary-buf)
+ (with-current-buffer summary-buf
(wl-summary-delete-all-target-marks)))
(wl-draft-reply-position wl-draft-reply-default-position)
(run-hooks 'wl-mail-setup-hook))))
(as-binary-output-file
(write-region (point-min) (point-max)
filename nil 'no-msg))))
- (save-excursion
- (set-buffer summary-buf)
+ (with-current-buffer summary-buf
(wl-summary-delete-all-target-marks))
(if (file-exists-p filename)
(message "Saved as %s" filename)))