diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2022-05-19 09:08:20 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2022-05-19 17:18:21 -0700 |
commit | e0e4f36954cf27d9bc7a0092c8e89b21110f9383 (patch) | |
tree | f32f403aebef3951e5eb9fc294e7d92c4bf82bbf /.emacs.d | |
parent | ba0720bfa83c723e3538a82f31ba6bc96a5ad372 (diff) | |
download | dotfiles-e0e4f36954cf27d9bc7a0092c8e89b21110f9383.tar.gz |
spw/when-library-available: rewrite
Diffstat (limited to '.emacs.d')
-rw-r--r-- | .emacs.d/init.el | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 70a21fc6..7918ae0a 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -348,10 +348,11 @@ Use this only after `package-initialize' has been called, i.e. not in `early-init-file', so that places LIBRARIES might be available are present in the `load-path'." (declare (indent 1)) - (let ((libs (mapcar (lambda (l) (if (symbolp l) (symbol-name l) l)) - (if (listp libraries) libraries (list libraries))))) - `(unless (memq nil (mapcar #'locate-library ',libs)) - ,@forms))) + `(when ,(if (listp libraries) + `(cl-every #'locate-library + ',(mapcar (apply-partially #'format "%s") libraries)) + `(locate-library ,(format "%s" libraries))) + ,@forms)) (defmacro spw/reclaim-keys-from (feature map &rest keys) "Unbind each of KEYS in MAP after FEATURE is loaded." |