From 98dbd3303a0508e4a8918c9e6c7bb06ed183e3db Mon Sep 17 00:00:00 2001 From: Lars Tveito Date: Thu, 2 Jan 2014 15:32:16 +0100 Subject: [PATCH] Only add site-lisp directory if it exists. --- init.el | 5 +++-- init.org | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/init.el b/init.el index f706ad8..66f118b 100644 --- a/init.el +++ b/init.el @@ -86,8 +86,9 @@ PACKAGE is installed and the current version is deleted." ) (let ((default-directory (concat user-emacs-directory "site-lisp/"))) - (normal-top-level-add-to-load-path '(".")) - (normal-top-level-add-subdirs-to-load-path)) + (when (file-exists-p default-directory) + (normal-top-level-add-to-load-path '(".")) + (normal-top-level-add-subdirs-to-load-path))) (fset 'yes-or-no-p 'y-or-n-p) diff --git a/init.org b/init.org index 9e2c7c9..c63b13e 100644 --- a/init.org +++ b/init.org @@ -167,8 +167,9 @@ #+BEGIN_SRC emacs-lisp :tangle yes (let ((default-directory (concat user-emacs-directory "site-lisp/"))) - (normal-top-level-add-to-load-path '(".")) - (normal-top-level-add-subdirs-to-load-path)) + (when (file-exists-p default-directory) + (normal-top-level-add-to-load-path '(".")) + (normal-top-level-add-subdirs-to-load-path))) #+END_SRC Answering /yes/ and /no/ to each question from Emacs can be tedious, a