File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 99
1010### New features
1111
12+ * Add imenu support for multimethods
1213* New interactive command ` clojure-cycle-when ` .
1314* New interactive command ` clojure-cycle-not ` .
1415
Original file line number Diff line number Diff line change @@ -657,23 +657,28 @@ and `(match-end 1)'."
657657Called 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 " ^(\\ ([a-z0-9.-]+/\\ )?\\ ( def\\ sw*\\ ) " nil t )
661661 (save-excursion
662662 (let (found?
663+ (deftype (match-string 2 ))
663664 (start (point )))
664665 (down-list )
665666 (forward-sexp )
666667 (while (not found?)
667668 (ignore-errors
668669 (forward-sexp ))
669- (or (if (char-equal ?[ (char-after (point )))
670- (backward-sexp ))
671- ( if (char-equal ?) (char-after (point )))
670+ (or (when (char-equal ?[ (char-after (point )))
671+ (backward-sexp ))
672+ ( when (char-equal ?) (char-after (point )))
672673 (backward-sexp )))
673674 (cl-destructuring-bind (def-beg . def-end) (bounds-of-thing-at-point 'sexp )
674675 (if (char-equal ?^ (char-after def-beg))
675676 (progn (forward-sexp ) (backward-sexp ))
676677 (setq found? t )
678+ (when (string= deftype " defmethod" )
679+ (setq def-end (progn (goto-char def-end)
680+ (forward-sexp )
681+ (point ))))
677682 (set-match-data (list def-beg def-end)))))
678683 (goto-char start)))))
679684
You can’t perform that action at this time.
0 commit comments