diff options
author | David Morgan <djm_uk@protonmail.com> | 2022-10-05 16:28:49 +0100 |
---|---|---|
committer | David Morgan <djm_uk@protonmail.com> | 2022-10-05 16:28:49 +0100 |
commit | 3f0c36c91e09cf557391791a9b90f3da568ff021 (patch) | |
tree | 63f98e262199e8c3425fcacaa0943ac991c98a84 | |
parent | fa0387cc465d6aaf5cd8897f55ec387bb8122c6b (diff) | |
download | dotfiles-3f0c36c91e09cf557391791a9b90f3da568ff021.tar.gz |
Fix issues with clj-uniquify-get-proposed-name
-rw-r--r-- | .emacs.d/lisp/init-clojure.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/.emacs.d/lisp/init-clojure.el b/.emacs.d/lisp/init-clojure.el index 810dd7e..b76a237 100644 --- a/.emacs.d/lisp/init-clojure.el +++ b/.emacs.d/lisp/init-clojure.el @@ -37,10 +37,12 @@ (let-routes 1) (context 2)) + :init ;; Always show more of the path in clj buffer names. ;; Using setq-local in clojure-mode-hook is not enough, as it runs too late (defun clj-uniquify-get-proposed-name (orig base dirname &optional depth original-dirname) - (when (and (string= ".clj" (substring base -4)) + (when (and (> (length base) 4) + (string= ".clj" (substring base -4)) (not (string= "project.clj" base))) (setq-local uniquify-min-dir-content 3)) (funcall orig base dirname depth original-dirname)) |