From 96e30cf2a0be20d6881aea05eff0bf09472d0ae2 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Sat, 9 May 2015 19:12:55 +0200 Subject: Cleanup auto-init function --- emacs/.emacs.d/init.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'emacs') diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el index 1d80996..2d6df93 100644 --- a/emacs/.emacs.d/init.el +++ b/emacs/.emacs.d/init.el @@ -45,10 +45,11 @@ The loaded file should be `LIBRARY-init', either `.el' or `.elc' will do." - `(with-eval-after-load ',library - (load ,(concat (if (symbolp library) - (symbol-name library) - library) "-init")))) + (let ((name (if (symbolp library) + (symbol-name library) + library))) + `(with-eval-after-load ',library + (load ,(concat name "-init"))))) ;; http://www.lunaryorn.com/2013/06/25/introducing-with-eval-after-load/ (defmacro stante-after (feature &rest forms) -- cgit v1.2.3-54-g00ecf