From: teranisi Date: Fri, 18 Jul 2003 12:57:42 +0000 (+0000) Subject: (wl-summary-print-destination): Do nothing when folder is nil. X-Git-Tag: elmo-mark-restart~29 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a2824b3cb9bfc9ad3b298cef100ee41e43675ab5;p=elisp%2Fwanderlust.git (wl-summary-print-destination): Do nothing when folder is nil. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index a2bcb4b..b4feb60 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,8 @@ +2003-07-18 Yuuichi Teranishi + + * wl-action.el (wl-summary-print-destination): + Do nothing when folder is nil. + 2003-07-18 Hiroya Murata * wl-summary.el (wl-summary-prefetch-region-no-mark): Update diff --git a/wl/wl-action.el b/wl/wl-action.el index 2923b79..5174481 100644 --- a/wl/wl-action.el +++ b/wl/wl-action.el @@ -740,32 +740,33 @@ Return number if put mark succeed" (defun wl-summary-print-destination (msg-num folder) "Print refile destination on line." - (wl-summary-remove-destination) - (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 re (point)) - (setq c 0) - (while (< c len) + (when folder + (wl-summary-remove-destination) + (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 - (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))))) + (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)))))) (defsubst wl-summary-reserve-temp-mark-p (mark) "Return t if temporal MARK should be reserved."