From f6b43579ea1de721fcf217d818e5c732be37bfe8 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Thu, 31 Jan 2019 17:24:52 +0100 Subject: emacs: skip mu4e if it has not been installed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- emacs/init.org | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'emacs/init.org') diff --git a/emacs/init.org b/emacs/init.org index 5ff8fcc..36d4191 100644 --- a/emacs/init.org +++ b/emacs/init.org @@ -1020,6 +1020,10 @@ provided in my [[https://github.com/mssola/dotfiles][dotfiles]] project to get m I'm using an RPM that I've built on [[https://build.opensuse.org/package/show/home:mssola/mu][OBS]] which installs mu4e globally. #+BEGIN_SRC elisp +(unless (file-directory-p "/usr/share/emacs/site-lisp/mu4e") + (message "Skipping mu4e because it's not installed.")) + +(when (file-directory-p "/usr/share/emacs/site-lisp/mu4e") (add-to-list 'load-path "/usr/share/emacs/site-lisp/mu4e") (require 'mu4e) @@ -1319,7 +1323,7 @@ And finally define a proper shortcut. #+BEGIN_SRC elisp ; The trailing parenthesis closes the "(when (featurep 'mu4e)" statement from ; the very beginning. - (global-set-key (kbd "C-c m") 'mu4e)) + (global-set-key (kbd "C-c m") 'mu4e))) #+END_SRC * org -- cgit v1.2.3