From: yoichi Date: Mon, 16 Jun 2003 13:20:38 +0000 (+0000) Subject: * wl-summary.el (wl-summary-print-destination): Keep position. X-Git-Tag: merged-trunk-to-elmo-mark-18~13 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=88f28c7be97f96254efcf430ab5d20662632f35e;p=elisp%2Fwanderlust.git * wl-summary.el (wl-summary-print-destination): Keep position. (wl-summary-cursor-move-surface): Keep horisontal position. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index 7d7ebc3..d53f271 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,8 @@ +2003-06-16 Yoichi NAKAYAMA + + * wl-summary.el (wl-summary-print-destination): Keep position. + (wl-summary-cursor-move-surface): Keep horisontal position. + 2003-05-30 Yoichi NAKAYAMA * wl-draft.el (wl-draft-send-mail-with-smtp): Catch quitting and diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 1902608..d7ca55c 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -3186,30 +3186,31 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (defun wl-summary-print-destination (msg-num folder) "Print refile destination on line." (wl-summary-remove-destination) - (let ((inhibit-read-only t) - (folder (copy-sequence folder)) - (buffer-read-only nil) - len rs re c) - (setq len (string-width folder)) - (if (< len 1) () - ;;(end-of-line) - (beginning-of-line) - (search-forward "\r") - (forward-char -1) - (setq re (point)) - (setq c 0) - (while (< c len) + (save-excursion + (let ((inhibit-read-only t) + (folder (copy-sequence folder)) + (buffer-read-only nil) + len rs re c) + (setq len (string-width folder)) + (if (< len 1) () + ;;(end-of-line) + (beginning-of-line) + (search-forward "\r") (forward-char -1) - (setq c (+ c (char-width (following-char))))) - (and (> c len) (setq folder (concat " " folder))) - (setq rs (point)) - (when wl-summary-width + (setq re (point)) + (setq c 0) + (while (< c len) + (forward-char -1) + (setq c (+ c (char-width (following-char))))) + (and (> c len) (setq folder (concat " " folder))) + (setq rs (point)) + (when wl-summary-width (put-text-property rs re 'invisible t)) - (put-text-property rs re 'wl-summary-destination t) - (goto-char re) - (wl-highlight-refile-destination-string folder) - (insert folder) - (set-buffer-modified-p nil)))) + (put-text-property rs re 'wl-summary-destination t) + (goto-char re) + (wl-highlight-refile-destination-string folder) + (insert folder) + (set-buffer-modified-p nil))))) (defsubst wl-summary-get-mark (number) "Return a temporal mark of message specified by NUMBER." @@ -5006,6 +5007,7 @@ Use function list is `wl-summary-write-current-folder-functions'." (let ((start (point)) (skip-tmark-regexp (wl-regexp-opt wl-summary-skip-mark-list)) (skip t) + (column (current-column)) skip-pmark-regexp goto-next next-entity finfo) (if (elmo-folder-plugged-p wl-summary-buffer-elmo-folder) () @@ -5013,6 +5015,7 @@ Use function list is `wl-summary-write-current-folder-functions'." (wl-regexp-opt (list " " wl-summary-unread-cached-mark wl-summary-important-mark)))) + (beginning-of-line) (while (and skip (not (if downward (eobp) (bobp)))) (if downward @@ -5030,8 +5033,7 @@ Use function list is `wl-summary-write-current-folder-functions'." (if (if downward (eobp) (and (bobp) skip)) (setq goto-next t)) (if (or (eobp) (and (bobp) skip)) (goto-char start)) - - (beginning-of-line) + (move-to-column column) (if (not goto-next) (if wl-summary-buffer-disp-msg