From 5f45147ca556bd9c97d09ec37a39f429ae9dc3d6 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Fri, 9 Apr 2021 17:51:29 -0500 Subject: Load slime-helper.el if it exists I couldn't find a function that would return a filename /if/ it exists, so I had to write one: `expand-file-name-exists-p'. Might change the name at some point. --- lisp/acdw.el | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lisp') diff --git a/lisp/acdw.el b/lisp/acdw.el index fd33514..44d15d0 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el @@ -62,6 +62,14 @@ each hook in HOOKS." (when (file-exists-p file) (load-file file)))) +(defun expand-file-name-exists-p (&rest expand-file-name-args) + "Call `expand-file-name' on EXPAND-FILE-NAME-ARGS, returning + its name if it exists, or NIL otherwise." + (let ((file (apply #'expand-file-name expand-file-name-args))) + (if (file-exists-p file) + file + nil))) + (defun acdw/dir (&optional file make-directory) "Place Emacs files in one place. -- cgit 1.4.1-21-gabe81