jacktasia / dumb-jump

an Emacs "jump to definition" package for 50+ languages
GNU General Public License v3.0
1.56k stars 148 forks source link

Missing rule: defmacro for elisp #424

Closed chasecaleb closed 1 year ago

chasecaleb commented 2 years ago

Hi, I think a rule along the lines of this should be added:

(add-to-list 'dumb-jump-find-rules
               '(:type "function" :supports ("ag" "grep" "rg" "git-grep") :language "elisp"
                 :regex "\\\(defmacro\\s+JJJ\\j"
                 :tests ("(defmacro test (blah)" "(defmacro test\n"
                 :not ("(defmacro test-asdf (blah)" "(defmacro test-blah\n" "(defmacro tester (blah)"
                       "(defmacro test? (blah)" "(defmacro test- (blah)")))

I've tested it out briefly and it seems to work, but it's certainly possible I'm overlooking something. @jacktasia what do you think?

jacktasia commented 2 years ago

Looks good to me. Happy to merge a PR if you want to make one.

chasecaleb commented 1 year ago

I was just looking through some of my old contributions and noticed this issue was still open. Since #425 was merged, this issue is resolved so I'm closing it :+1: