Skip to content

Commit 15e1117

Browse files
committed
Support prefixed syms in clojure-indent-function
When a Clojure lib uses the same var name as clojure.core, it may have prefer different indent rules. This change allows specific prefixed symbols to override the indent rule of the unprefixed symbol.
1 parent 92a9b4a commit 15e1117

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clojure-mode.el

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,8 @@ This function also returns nil meaning don't specify the indentation."
685685
(function-tail (first
686686
(last
687687
(split-string (substring-no-properties function) "/")))))
688-
(setq method (get (intern-soft function-tail) 'clojure-indent-function))
688+
(setq method (or (get (intern-soft function) 'clojure-indent-function)
689+
(get (intern-soft function-tail) 'clojure-indent-function)))
689690
(cond ((member (char-after open-paren) '(?\[ ?\{))
690691
(goto-char open-paren)
691692
(1+ (current-column)))

0 commit comments

Comments
 (0)