+2002-03-04 Yuuichi Teranishi <teranisi@gohome.org>
+
+ * wl-summary.el (wl-summary-mode-map): Bind wl-summary-save-status
+ to `C-x C-s'.
+ (wl-summary-save-status): New command.
+ (wl-summary-exit): Don't clean-up temp marks when sticky.
+ (Applied patch from Nakayama-san [wl: 09548])
+ (wl-summary-delete-all-temp-marks): Added optional argument no-msg;
+ Do nothing when no mark data.
+ (wl-summary-save-view-cache): Copy local variables to the temp buffer;
+ Call `wl-summary-delete-all-temp-marks' before saving.
+
2002-03-04 Mito <mito@mxa.nes.nec.co.jp>
* wl-mime.el (wl-mime-save-content): Don't save if answered "no".
(define-key wl-summary-mode-map "\M-t" 'wl-toggle-plugged)
(define-key wl-summary-mode-map "\C-t" 'wl-plugged-change)
;;
+ (define-key wl-summary-mode-map "\C-x\C-s" 'wl-summary-save-status)
(wl-summary-setup-mouse)
(easy-menu-define
wl-summary-mode-menu
(wl-summary-thread-modified-p)))
(wl-summary-save-view-cache))))
+(defun wl-summary-save-status ()
+ "Save summary view and msgdb."
+ (interactive)
+ (if (interactive-p) (message "Saving summary status..."))
+ (wl-summary-save-view)
+ (elmo-folder-commit wl-summary-buffer-elmo-folder)
+ (elmo-folder-check wl-summary-buffer-elmo-folder)
+ (if wl-use-scoring (wl-score-save))
+ (if (interactive-p) (message "Saving summary status...done.")))
+
(defun wl-summary-force-exit ()
"Exit current summary. Buffer is deleted even the buffer is sticky."
(interactive)
(run-hooks 'wl-summary-exit-pre-hook)
(if wl-summary-buffer-exit-function
(funcall wl-summary-buffer-exit-function)
- (wl-summary-cleanup-temp-marks sticky)
+ (if (or force-exit (not sticky))
+ (wl-summary-cleanup-temp-marks sticky))
(unwind-protect
;; save summary status
(progn
(wl-summary-buffer-folder-name))
'update nil nil t)))
-(defun wl-summary-delete-all-temp-marks ()
+(defun wl-summary-delete-all-temp-marks (&optional no-msg)
+ "Erase all temp marks from buffer."
(interactive)
- (save-excursion
- (goto-char (point-min))
- (message "Unmarking...")
- (while (not (eobp))
- (wl-summary-unmark)
- (forward-line))
- (message "Unmarking...done")
- (setq wl-summary-buffer-target-mark-list nil)
- (setq wl-summary-buffer-delete-list nil)
- (setq wl-summary-buffer-refile-list nil)
- (setq wl-summary-buffer-copy-list nil)))
+ (when (or wl-summary-buffer-target-mark-list
+ wl-summary-buffer-delete-list
+ wl-summary-buffer-refile-list
+ wl-summary-buffer-copy-list)
+ (save-excursion
+ (goto-char (point-min))
+ (unless no-msg
+ (message "Unmarking..."))
+ (while (not (eobp))
+ (wl-summary-unmark)
+ (forward-line))
+ (unless no-msg
+ (message "Unmarking...done"))
+ (setq wl-summary-buffer-target-mark-list nil)
+ (setq wl-summary-buffer-delete-list nil)
+ (setq wl-summary-buffer-refile-list nil)
+ (setq wl-summary-buffer-copy-list nil))))
(defun wl-summary-delete-mark (number)
"Delete temporary mark of the message specified by NUMBER."
(cache (expand-file-name wl-summary-cache-file dir))
(view (expand-file-name wl-summary-view-file dir))
(save-view wl-summary-buffer-view)
+ (mark-list wl-summary-buffer-target-mark-list)
+ (refile-list wl-summary-buffer-refile-list)
+ (copy-list wl-summary-buffer-copy-list)
+ (delete-list wl-summary-buffer-delete-list)
(tmp-buffer (get-buffer-create " *wl-summary-save-view-cache*"))
(charset wl-summary-buffer-mime-charset))
(if (file-directory-p dir)
(copy-to-buffer tmp-buffer (point-min) (point-max))
(with-current-buffer tmp-buffer
(widen)
+ (setq wl-summary-buffer-target-mark-list mark-list
+ wl-summary-buffer-refile-list refile-list
+ wl-summary-buffer-copy-list copy-list
+ wl-summary-buffer-delete-list delete-list)
+ (wl-summary-delete-all-temp-marks 'no-msg)
(encode-mime-charset-region
(point-min) (point-max) charset)
(write-region-as-binary (point-min)(point-max)