mirror of https://github.com/djcb/mu.git
Various little changes
This commit is contained in:
parent
d3122a8927
commit
118ce389a5
|
@ -0,0 +1 @@
|
|||
taurgal@freeme.1182:1400696277
|
|
@ -95,9 +95,10 @@ clicked."
|
|||
(put-text-property (string-match "\\[.+$" newstr)
|
||||
(- (length newstr) 1) 'mouse-face 'highlight newstr) newstr))
|
||||
|
||||
|
||||
(defun mu4e~main-view ()
|
||||
"Show the mu4e main view."
|
||||
;; NEW
|
||||
;; This is the old `mu4e~main-view' function but without
|
||||
;; buffer switching at the end.
|
||||
(defun mu4e:main-revert-buffer (ignore-auto noconfirm)
|
||||
(let ((buf (get-buffer-create mu4e~main-buffer-name))
|
||||
(inhibit-read-only t))
|
||||
(with-current-buffer buf
|
||||
|
@ -150,13 +151,23 @@ clicked."
|
|||
(mu4e~main-action-str "\t* [A]bout mu4e\n" 'mu4e-about)
|
||||
(mu4e~main-action-str "\t* [H]elp\n" 'mu4e-display-manual)
|
||||
(mu4e~main-action-str "\t* [q]uit\n" 'mu4e-quit))
|
||||
(mu4e-main-mode)
|
||||
(switch-to-buffer buf))))
|
||||
)))
|
||||
|
||||
(setq revert-buffer-function 'mu4e:main-revert-buffer)
|
||||
|
||||
;; NEW
|
||||
;; Revert mu main buffer then switch to it
|
||||
(defun mu4e~main-view ()
|
||||
"Show the mu4e main view."
|
||||
(mu4e:main-revert-buffer nil nil)
|
||||
(switch-to-buffer mu4e~main-buffer-name))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Interactive functions
|
||||
;; NEW
|
||||
;; Toggle mail sending mode without switching
|
||||
(defun mu4e~main-toggle-mail-sending-mode ()
|
||||
"Toggle sending mail mode, either queued or direct."
|
||||
"Toggle sending mail mode, either queued or direct (redefined)."
|
||||
(interactive)
|
||||
(let ((curpos (point)))
|
||||
(unless (file-directory-p smtpmail-queue-dir)
|
||||
|
@ -165,8 +176,14 @@ clicked."
|
|||
(message
|
||||
(concat "Outgoing mail will now be "
|
||||
(if smtpmail-queue-mail "queued" "sent directly")))
|
||||
(mu4e~main-view)
|
||||
;; "queued" and "direct" have same length.
|
||||
(mu4e:main-revert-buffer nil nil)
|
||||
(goto-char curpos)))
|
||||
|
||||
;; NEW
|
||||
;; Toggle queuing in any mu4e menu
|
||||
;; (dolist (keymap '(mu4e-main-mode-map mu4e-view-mode-map mu4e-compose-mode-map mu4e-headers-mode-map))
|
||||
;; (progn
|
||||
;; (define-key (symbol-value keymap) (kbd "C-c m") 'mu4e~main-toggle-mail-sending-mode))
|
||||
;; )
|
||||
|
||||
(provide 'mu4e-main)
|
||||
|
|
Loading…
Reference in New Issue