about summary refs log tree commit diff stats
path: root/.emacs.d
diff options
context:
space:
mode:
Diffstat (limited to '.emacs.d')
-rw-r--r--.emacs.d/lisp/init-clojure.el4
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))