from `wl-summary-cleanup-temp-marks'.
(wl-summary-cleanup-temp-marks): Abolish argument.
* wl.el (wl-save-status): Revert previous change.
(wl-execute-temp-marks): New function, call
`wl-summary-exec-with-confirmation'.
* wl-folder.el (wl-folder-mode-map): Bind "x" to it.
(wl-folder-save-and-exec-marks): Abolished.
+2004-06-20 Yoichi NAKAYAMA <yoichi@geiin.org>
+
+ * wl-summary.el (wl-summary-exec-with-confirmation): Extracted
+ from `wl-summary-cleanup-temp-marks'.
+ (wl-summary-cleanup-temp-marks): Abolish argument.
+ * wl.el (wl-save-status): Revert previous change.
+ (wl-execute-temp-marks): New function, call
+ `wl-summary-exec-with-confirmation'.
+ * wl-folder.el (wl-folder-mode-map): Bind "x" to it.
+ (wl-folder-save-and-exec-marks): Abolished.
+
2004-06-19 Yoichi NAKAYAMA <yoichi@geiin.org>
* wl-e21.el (wl-e21-display-image-p): Respect
(define-key wl-folder-mode-map "?" 'wl-folder-pick)
(define-key wl-folder-mode-map "q" 'wl-exit)
(define-key wl-folder-mode-map "z" 'wl-folder-suspend)
- (define-key wl-folder-mode-map "x" 'wl-folder-save-and-exec-marks)
+ (define-key wl-folder-mode-map "x" 'wl-execute-temp-marks)
(define-key wl-folder-mode-map "\M-t" 'wl-toggle-plugged)
(define-key wl-folder-mode-map "\C-t" 'wl-plugged-change)
(define-key wl-folder-mode-map "<" 'beginning-of-buffer)
(wl-folder-get-elmo-folder fld-name))
nil sticky t)))
-(defun wl-folder-save-and-exec-marks ()
- (interactive)
- (wl-save 'exec-marks))
-
(defun wl-folder-suspend ()
(interactive)
(run-hooks 'wl-folder-suspend-hook)
(defun wl-summary-thread-modified-p ()
wl-summary-buffer-thread-modified)
-(defun wl-summary-cleanup-temp-marks (&optional default-keep)
+(defun wl-summary-exec-with-confirmation (&optional message)
(when wl-summary-buffer-temp-mark-list
- (if (y-or-n-p (format "Execute marks in %s?%s "
- (wl-summary-buffer-folder-name)
- (if default-keep
- ""
- " (answer \"n\" to discard them)")))
+ (if (y-or-n-p (or message
+ (format "Execute marks in %s? "
+ (wl-summary-buffer-folder-name))))
(progn
(wl-summary-exec)
(if wl-summary-buffer-temp-mark-list
(error "Some execution was failed")))
;; temp-mark-list is remained.
- (message "")))
- (unless default-keep
+ (message ""))))
+
+(defun wl-summary-cleanup-temp-marks ()
+ (when wl-summary-buffer-temp-mark-list
+ (wl-summary-exec-with-confirmation
+ (format "Execute marks in %s? (answer \"n\" to discard them) "
+ (wl-summary-buffer-folder-name)))
(wl-summary-delete-all-temp-marks 'no-msg)
(setq wl-summary-scored nil)))
;;; end of wl-plugged-mode
-(defun wl-save (&optional exec-marks)
+(defun wl-save ()
"Save summary and folder status."
- (interactive "P")
- (wl-save-status 'keep-summary (not exec-marks))
+ (interactive)
+ (wl-save-status 'keep-summary)
(run-hooks 'wl-save-hook))
-(defun wl-save-status (&optional keep-summary leave-marks)
+(defun wl-execute-temp-marks ()
+ "Execute temporary marks in summary buffers."
+ (interactive)
+ (let ((summaries (wl-collect-summary)))
+ (while summaries
+ (with-current-buffer (car summaries)
+ (wl-summary-exec-with-confirmation)
+ (wl-summary-save-status))
+ (setq summaries (cdr summaries)))))
+
+(defun wl-save-status (&optional keep-summary)
(message "Saving summary and folder status...")
(save-excursion
(let ((summaries (wl-collect-summary)))
(while summaries
(with-current-buffer (car summaries)
- (unless leave-marks
- (wl-summary-cleanup-temp-marks keep-summary))
+ (unless keep-summary
+ (wl-summary-cleanup-temp-marks))
(wl-summary-save-view)
(elmo-folder-commit wl-summary-buffer-elmo-folder)
(unless keep-summary