mu4e: Check file instead of symbol existence

master
Pierre Neidhardt 2017-07-27 13:53:23 +01:00
parent 4d7e644cf3
commit e221a83d77
2 changed files with 5 additions and 2 deletions

View File

@ -165,9 +165,12 @@
(global-set-key (kbd "C-x g") 'magit-status))
;;; Mail
(when (fboundp 'mu4e)
;; mu4e is usually site-local and not part of ELPA.
(when (delq nil (mapcar (lambda (path) (string-match "/mu4e/\\|/mu4e$" path)) load-path))
(nconc package-selected-packages '(helm-mu mu4e-maildirs-extension mu4e-alert)))
(with-eval-after-load 'mu4e (require 'init-mu4e))
;; TODO: It seems that calling `mu4e-headers-unread' directly does not initialize mu4e properly:
;; it won't fetch e-mails and won't complete addresses.
(autoload 'mu4e-headers-unread "mu4e")
;;; Makefile

View File

@ -80,7 +80,7 @@
(when (fboundp 'emms)
(exwm-input-set-key (kbd "s-a") #'emms-smart-browse)
(exwm-input-set-key (kbd "s-A") #'emms))
(when (fboundp 'mu4e)
(when (delq nil (mapcar (lambda (path) (string-match "/mu4e/\\|/mu4e$" path)) load-path))
(exwm-input-set-key (kbd "s-m") #'mu4e-headers-unread))
;;; External application shortcuts.