From: teranisi Date: Sat, 9 Aug 2003 12:56:48 +0000 (+0000) Subject: * wl-action.el (wl-summary-set-mark): Use X-Git-Tag: wl-2_11_8~18 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=d8c31289219dad2a717a5d5a2c49c52d4dbc10fc;p=elisp%2Fwanderlust.git * wl-action.el (wl-summary-set-mark): Use `wl-summary-message-visible-p' to check visibility of the message and jump to message only when the message line is visible and have different number; Call wl-summary-unset-mark with number argument. (wl-summary-unset-mark): Use `wl-summary-message-visible-p' to check visibility of the message and jump to message only when the message line is visible and have different number; --- diff --git a/wl/ChangeLog b/wl/ChangeLog index 040dde1..22f877f 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,14 @@ +2003-08-09 Yuuichi Teranishi + + * wl-action.el (wl-summary-set-mark): Use + `wl-summary-message-visible-p' to check visibility of the message + and jump to message only when the message line is visible and have + different number; Call wl-summary-unset-mark with number argument. + (wl-summary-unset-mark): + Use `wl-summary-message-visible-p' + to check visibility of the message and jump to message only when + the message line is visible and have different number; + 2003-08-09 Hiroya Murata * Version number is increased to 2.11.7. diff --git a/wl/wl-action.el b/wl/wl-action.el index 925847d..2eb5238 100644 --- a/wl/wl-action.el +++ b/wl/wl-action.el @@ -69,13 +69,14 @@ Return number if put mark succeed" (prog1 (save-excursion ;; Put mark - (setq visible (or - ;; not-interactive and visible - (and number (wl-summary-jump-to-msg number)) - ;; interactive - (and (null number) current)) - number (or number current) - cur-mark (nth 1 (wl-summary-registered-temp-mark number))) + (if number + ;; Jump to message if cursor is not on the message. + (when (and (setq visible (wl-summary-message-visible-p number)) + (not (eq number current))) + (wl-summary-jump-to-msg number)) + (setq visible t + number current)) + (setq cur-mark (nth 1 (wl-summary-registered-temp-mark number))) (unless number (error "No message")) (if (wl-summary-reserve-temp-mark-p cur-mark) @@ -87,8 +88,8 @@ Return number if put mark succeed" (setq data (funcall (wl-summary-action-argument-function action) (wl-summary-action-symbol action) number))) - ;; Unset the mark of current line. - (wl-summary-unset-mark) + ;; Unset the current mark. + (wl-summary-unset-mark number) ;; Set action. (funcall (wl-summary-action-set-function action) number @@ -223,7 +224,10 @@ Return number if put mark succeed" (let ((buffer-read-only nil) visible mark action) (if number - (setq visible (wl-summary-jump-to-msg number)) ; can be nil + ;; Jump to message + (when (and (setq visible (wl-summary-message-visible-p number)) + (not (eq number (wl-summary-message-number)))) + (wl-summary-jump-to-msg number)) (setq visible t number (wl-summary-message-number))) (setq mark (wl-summary-temp-mark))