From 3f0c36c91e09cf557391791a9b90f3da568ff021 Mon Sep 17 00:00:00 2001 From: David Morgan Date: Wed, 5 Oct 2022 16:28:49 +0100 Subject: Fix issues with clj-uniquify-get-proposed-name --- .emacs.d/lisp/init-clojure.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to '.emacs.d/lisp') 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)) -- cgit 1.4.1-2-gfad0