From: okada Date: Fri, 7 Jul 2000 04:42:07 +0000 (+0000) Subject: * wl-summary.el (wl-summary-buffer-thread-modified): X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=0aefe32f944eb218a50f18690e26431cabcadca7;p=elisp%2Fwanderlust.git * wl-summary.el (wl-summary-buffer-thread-modified): New buffer-local variable. (wl-summary-set-thread-modified): New function. (wl-summary-thread-modified-p): New function. (wl-summary-save-status): Use function `wl-summary-thread-modified-p'. (wl-summary-yank-saved-message): Use function `wl-summary-set-thread-modified' (wl-summary-switch-to-clone-buffer): Add `wl-summary-buffer-thread-modified'. * wl-vars.el (wl-summary-buffer-message-saved-hook): New variable. (wl-summary-buffer-mark-saved-hook): Ditto. * wl-summary.el (wl-summary-msgdb-save): New hook `wl-summary-buffer-message-saved-hook' and `wl-summary-buffer-mark-saved-hook'. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index e71f826..733d12e 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,21 @@ +2000-07-07 Kenichi OKADA + + * wl-summary.el (wl-summary-buffer-thread-modified): + New buffer-local variable. + (wl-summary-set-thread-modified): New function. + (wl-summary-thread-modified-p): New function. + (wl-summary-save-status): Use function `wl-summary-thread-modified-p'. + (wl-summary-yank-saved-message): Use function + `wl-summary-set-thread-modified' + (wl-summary-switch-to-clone-buffer): Add + `wl-summary-buffer-thread-modified'. + + * wl-vars.el (wl-summary-buffer-message-saved-hook): New variable. + (wl-summary-buffer-mark-saved-hook): Ditto. + * wl-summary.el (wl-summary-msgdb-save): New hook + `wl-summary-buffer-message-saved-hook' and + `wl-summary-buffer-mark-saved-hook'. + 2000-07-04 Katsumi Yamaoka * wl-demo.el (wl-demo): Simplified `fringe' face manipulation. diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 87d72d7..d0e7add 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -85,6 +85,7 @@ (defvar wl-summary-buffer-view 'thread) (defvar wl-summary-buffer-message-modified nil) (defvar wl-summary-buffer-mark-modified nil) +(defvar wl-summary-buffer-thread-modified nil) (defvar wl-summary-buffer-number-column nil) (defvar wl-summary-buffer-number-regexp nil) (defvar wl-summary-buffer-persistent nil) @@ -139,6 +140,7 @@ 'wl-summary-buffer-view 'wl-summary-buffer-message-modified 'wl-summary-buffer-mark-modified + 'wl-summary-buffer-thread-modified 'wl-summary-buffer-number-column 'wl-summary-buffer-number-regexp 'wl-summary-buffer-persistent @@ -1021,6 +1023,10 @@ q Goto folder mode. (setq wl-summary-buffer-mark-modified t)) (defun wl-summary-mark-modified-p () wl-summary-buffer-mark-modified) +(defun wl-summary-set-thread-modified () + (setq wl-summary-buffer-thread-modified t)) +(defun wl-summary-thread-modified-p () + wl-summary-buffer-thread-modified) (defun wl-summary-msgdb-save () "Save msgdb if modified." @@ -1039,7 +1045,8 @@ q Goto folder mode. (elmo-string wl-summary-buffer-folder-name) (elmo-msgdb-get-number-alist wl-summary-buffer-msgdb)) - (setq wl-summary-buffer-message-modified nil)) + (setq wl-summary-buffer-message-modified nil) + (run-hooks 'wl-summary-buffer-message-saved-hook)) (when (wl-summary-mark-modified-p) (or path (setq path (elmo-msgdb-expand-path @@ -1053,7 +1060,8 @@ q Goto folder mode. ;; 0 ;; (+ wl-summary-buffer-new-count wl-summary-buffer-unread-count)) ;; (setq wl-folder-info-alist-modified t) - (setq wl-summary-buffer-mark-modified nil)))))) + (setq wl-summary-buffer-mark-modified nil) + (run-hooks 'wl-summary-buffer-mark-saved-hook)))))) (defsubst wl-summary-cleanup-temp-marks (&optional sticky) (if (or wl-summary-buffer-refile-list @@ -1085,7 +1093,8 @@ q Goto folder mode. ;; save the current summary buffer view. (if (and wl-summary-cache-use (or (wl-summary-message-modified-p) - (wl-summary-mark-modified-p))) + (wl-summary-mark-modified-p) + (wl-summary-thread-modified-p))) (wl-summary-save-view-cache sticky)) ;; save msgdb ... (wl-summary-msgdb-save))) @@ -2607,7 +2616,8 @@ If optional argument is non-nil, checking is omitted." wl-summary-buffer-number-column wl-summary-buffer-number-regexp wl-summary-buffer-message-modified - wl-summary-buffer-mark-modified) + wl-summary-buffer-mark-modified + wl-summary-buffer-thread-modified) (and (eq wl-summary-buffer-view 'thread) '(wl-thread-entity-hashtb wl-thread-entities @@ -6090,7 +6100,8 @@ Reply to author if invoked with argument." (message "Cannot set itself as a parent.") (save-excursion (wl-thread-jump-to-msg wl-summary-buffer-saved-message) - (wl-thread-set-parent number)) + (wl-thread-set-parent number) + (wl-summary-set-thread-modified)) (setq wl-summary-buffer-saved-message nil))) (message "There's no saved message."))) diff --git a/wl/wl-vars.el b/wl/wl-vars.el index a5688ce..baeb944 100644 --- a/wl/wl-vars.el +++ b/wl/wl-vars.el @@ -417,6 +417,10 @@ when `wl-prefetch-confirm' is non-nil." "A hook called when unread message is displayed.") (defvar wl-summary-edit-addresses-hook nil "A hook called when address book is edited.") +(defvar wl-summary-buffer-message-saved-hook nil + "A hook called when msgdb is saved.") +(defvar wl-summary-buffer-mark-saved-hook nil + "A hook called when mark is saved.") (defvar wl-summary-divide-thread-when-subject-changed nil "Divide thread when subject is changed.") (defvar wl-init-hook nil