diff options
author | Dan Gudmundsson <[email protected]> | 2017-08-24 15:11:49 +0200 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2017-08-24 15:11:49 +0200 |
commit | 9bdd2e0fcbc0c9701dab05fed33aaef367c9500a (patch) | |
tree | 56f88fdde8fc9bb2a4a59f59a87b8cb3c8fc48cc /lib | |
parent | 8fffd1f476571d2c927e6d1f579c6e693dbd3137 (diff) | |
parent | 9762af0851da245444173b22509462b90c7cc7c6 (diff) | |
download | otp-9bdd2e0fcbc0c9701dab05fed33aaef367c9500a.tar.gz otp-9bdd2e0fcbc0c9701dab05fed33aaef367c9500a.tar.bz2 otp-9bdd2e0fcbc0c9701dab05fed33aaef367c9500a.zip |
Merge branch 'maint'
* maint:
Emacs: Fix default target for xref-find-references
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tools/emacs/erlang.el | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/tools/emacs/erlang.el b/lib/tools/emacs/erlang.el index 438abc2d29..012de479d3 100644 --- a/lib/tools/emacs/erlang.el +++ b/lib/tools/emacs/erlang.el @@ -3642,8 +3642,10 @@ The return value is a string of the form \"foo/1\"." (error nil))))) -;; Keeping erlang-get-function-under-point for backward compatibility. -;; It is used by erldoc.el and maybe other code out there. +;; erlang-get-function-under-point is replaced by +;; erlang-get-identifier-at-point as far as internal erlang.el usage +;; is concerned. But it is kept for backward compatibility. It is +;; used by erldoc.el and maybe other code out there. (defun erlang-get-function-under-point () "Return the module and function under the point, or nil. @@ -4881,7 +4883,12 @@ considered first when it is time to jump to the definition.") '(progn (cl-defmethod xref-backend-identifier-at-point ((_backend (eql erlang-etags))) - (erlang-id-to-string (erlang-get-identifier-at-point))) + (if (eq this-command 'xref-find-references) + (if (use-region-p) + (buffer-substring-no-properties (region-beginning) + (region-end)) + (thing-at-point 'symbol)) + (erlang-id-to-string (erlang-get-identifier-at-point)))) (cl-defmethod xref-backend-definitions ((_backend (eql erlang-etags)) identifier) |