* don't save drafts immediately, and do the post-sending stuff not in hooks,

but rather by a special 'sent-' message handler
This commit is contained in:
djcb
2012-03-27 21:15:47 +03:00
parent 86a1424b17
commit c2e3eac1de
4 changed files with 92 additions and 71 deletions

View File

@ -37,7 +37,7 @@
(define-key map "b" 'mu4e-search-bookmark)
(define-key map "B" 'mu4e-search-bookmark-edit-first)
(define-key map "s" 'mu4e-search)
(define-key map "q" 'mu4e-quit)
(define-key map "j" 'mu4e-jump-to-maildir)
@ -53,24 +53,14 @@
"Keymap for the *mu4e-main* buffer.")
(fset 'mu4e-main-mode-map mu4e-main-mode-map)
(defun mu4e-main-mode ()
(define-derived-mode mu4e-main-mode special-mode "mu4e:main"
"Major mode for the mu4e main screen.
\\{mu4e-main-mode-map}."
(interactive)
(kill-all-local-variables)
(use-local-map mu4e-main-mode-map)
(setq
major-mode 'mu4e-main-mode
mode-name "mu4e-main"
truncate-lines t
buffer-read-only t
overwrite-mode 'overwrite-mode-binary))
(put 'mu4e-main-mode 'mode-class 'special)
(defun mu4e-action-str (str &optional func-or-shortcut)
"Highlight the first occurence of [..] in STR. If
@ -181,7 +171,7 @@ split-window."
(error "`smtp-queue-dir' does not exist"))
(setq smtpmail-queue-mail (not smtpmail-queue-mail))
(message
(concat "Outgoing mail will now be "
(concat "Outgoing mail will now be "
(if smtpmail-queue-mail "queued" "sent directly")))
(mu4e-main-view))