* mu4e: fix mu4e-mark-handle-when-leaving (mu4e-headers-leave-behavior)

This commit is contained in:
djcb
2012-08-17 08:34:08 +03:00
parent 70bfa90ece
commit e77abbeb29

View File

@ -297,17 +297,16 @@ quiting the buffer) is taken; returning t means 'take the following
action', return nil means 'don't do anything'" action', return nil means 'don't do anything'"
(let ((marknum (if mu4e~mark-map (hash-table-count mu4e~mark-map) 0)) (let ((marknum (if mu4e~mark-map (hash-table-count mu4e~mark-map) 0))
(what mu4e-headers-leave-behavior)) (what mu4e-headers-leave-behavior))
(unless (zerop marknum) ;; nothing to do (unless (zerop marknum) ;; nothing to do?
(unless (or (eq what 'ignore) (eq what 'apply)) (when (eq what 'ask)
;; if `mu4e-headers-leave-behavior' is not apply or ignore, ask the user (setq what (mu4e-read-option
(setq what "There are existing marks; should we: "
(let ((what (mu4e-read-option '( ("apply marks" . apply)
"There are existing marks; should we: " ("ignore marks?" . ignore)))))
'( ("apply marks" . apply) ;; we determined what to do... now do it
("ignore marks?" . ignore))))) (when (eq what 'apply)
;; we determined what to do... now do it (mu4e-mark-execute-all t)))))
(when (eq what 'apply)
(mu4e-mark-execute-all t))))))))
(provide 'mu4e-mark) (provide 'mu4e-mark)
;; End of mu4e-mark.el ;; End of mu4e-mark.el