diff --git a/init.org b/init.org index 5621aec..205f02d 100644 --- a/init.org +++ b/init.org @@ -2920,17 +2920,16 @@ _u_: next word ^_l_: edit lines^ _s_: next whole symbol ("a" ag "ag") ("h" find-grep "find-grep")) #+END_SRC + ** General #+BEGIN_SRC emacs-lisp -(require 'anaphora) - (defun my-compile-project (file &optional prefix cmd) "Enter ancestor directory containing FILE and run compile command CMD. If CMD is not supplied, use `compile-command'. With PREFIX argument and omitted CMD, prompt for command." (interactive "fDominating File: \nP") - (awhen (locate-dominating-file default-directory file) - (cd it)) + (when-let ((dir (locate-dominating-file default-directory file))) + (cd dir)) (compile (cond (prefix (compilation-read-command