diff options
author | Vincent Ambo <vincent@spotify.com> | 2013-08-05T13·34+0200 |
---|---|---|
committer | Vincent Ambo <vincent@spotify.com> | 2013-08-05T13·34+0200 |
commit | 1ba56be2ee45cf902199223d6ed86d04739c1399 (patch) | |
tree | ecfb1b178ef51cebdabac9857d1c30d71880f2d9 /init.el | |
parent | 9112881277a565613c42e63e7e7c89ca23a6de4e (diff) |
Only load irc.el and init-local if they exist
Diffstat (limited to 'init.el')
-rw-r--r-- | init.el | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/init.el b/init.el index 1bf161a5f0b0..a448bf2f2dde 100644 --- a/init.el +++ b/init.el @@ -68,12 +68,16 @@ (load "~/.emacs.d/init-bindings.el") (load "~/.emacs.d/init-eshell.el") -;; A file with machine specific settings -(load "~/.emacs.d/init-local.el") +(defun load-file-if-exists (filename) + (if (file-exists-p filename) + (load filename))) + +;; A file with machine specific settings. +(load-file-if-exists "~/.emacs.d/init-local.el") ;; IRC configuration (erc) ;; Actual servers and such are loaded from irc.el -(load "~/.emacs.d/irc") +(load-file-if-exists "~/.emacs.d/irc.el") ;; Load magnars' string manipulation library (require 's) |