From 8e91ce7cde8b426354f3adcedefc3ce9ffb40117 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Fri, 20 May 2016 09:11:45 +0200 Subject: emacs: Improve default tag search Add current module to non external functions calls. Also improves finding record and macro definitions. --- lib/tools/emacs/erlang.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/tools/emacs/erlang.el b/lib/tools/emacs/erlang.el index b808987e6e..3d20d86f43 100644 --- a/lib/tools/emacs/erlang.el +++ b/lib/tools/emacs/erlang.el @@ -3760,6 +3760,12 @@ In the future the list may contain more elements." (if (assoc fk (cdr (car imports))) (setq mod (car (car imports))) (setq imports (cdr imports)))) + (cond ((eq (preceding-char) ?#) + (setq fk (concat "-record(" fk))) + ((eq (preceding-char) ??) + (setq fk (concat "-define(" fk))) + ((and (null mod) (not (member fk erlang-int-bifs))) + (setq mod (erlang-get-module)))) (setq res (list mod fk))))) (store-match-data md) res))) -- cgit v1.2.3