Skip to content

Commit 6e966d5

Browse files
vspinubbatsov
authored andcommitted
Recognize indented def-forms in imenu
1 parent f46cc5d commit 6e966d5

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
### New features
1111

1212
* Add imenu support for multimethods
13+
* Make imenu recognize indented def-forms
1314
* New interactive command `clojure-cycle-when`.
1415
* New interactive command `clojure-cycle-not`.
1516

clojure-mode.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ and `(match-end 1)'."
657657
Called by `imenu--generic-function'."
658658
;; we have to take into account namespace-definition forms
659659
;; e.g. s/defn
660-
(when (re-search-backward "^(\\([a-z0-9.-]+/\\)?\\(def\\sw*\\)" nil t)
660+
(when (re-search-backward "^[ \t]*(\\([a-z0-9.-]+/\\)?\\(def\\sw*\\)" nil t)
661661
(save-excursion
662662
(let (found?
663663
(deftype (match-string 2))

0 commit comments

Comments
 (0)