1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-15 19:31:29 -07:00
emacs/test/lisp
Mattias Engdegård 4a44ac987e Infer identifier namespace in elisp xref backend
Improve the accuracy of `xref-find-definitions` by inferring the
likely namespace of the sought identifier from its context.
This reduces the number of irrelevant search hits when it is clear
what kind of identifier is being looked for (such as showing a
variable when the user looks for a function).

Co-written with Dmitry Gutov.

* lisp/progmodes/elisp-mode.el (elisp--xref-list-index)
(elisp--xref-infer-namespace, xref-backend-identifier-at-point): New.
(xref-backend-definitions): Use the buffer position for inferring.
(elisp--xref-find-definitions): Use the inferred namespace.
(xref-backend-apropos): Adapt call.
* test/lisp/progmodes/elisp-mode-tests.el (elisp-mode-test--with-buffer)
(elisp-mode-with-buffer, elisp-mode-infer-namespace): New tests.
2021-09-12 13:00:59 +02:00
..
align-resources Add some tests for align.el 2020-12-29 08:38:25 +01:00
bookmark-resources Add ability to mark/unmark/delete all bookmarks 2020-08-09 15:13:05 -05:00
calc Calc: control digits after decimal point (bug#47302) 2021-04-27 18:10:01 +02:00
calendar Add diary-offset to diary-lib.el 2021-09-04 09:12:10 +02:00
cedet ; Normalize and add missing first and last lines 2021-04-19 12:21:01 +02:00
custom-resources Avoid saving session customizations in the custom-file 2021-05-10 13:33:32 +02:00
emacs-lisp Propagate aliased lexical variables in byte compiler 2021-09-11 17:17:33 +02:00
emulation Update copyright year to 2021 2021-01-01 01:13:56 -08:00
epg-resources Move epg.el test data to follow our conventions 2020-10-24 02:36:55 +02:00
erc Accept string argument in erc-add-to-input-ring 2021-02-27 05:35:40 +01:00
eshell ; Normalize and add missing first and last lines 2021-04-19 12:21:01 +02:00
faces-resources Update copyright year to 2021 2021-01-01 01:13:56 -08:00
files-resources Make the test for auto-mode-alist from .dir-local.el stricter 2021-07-24 11:16:15 +02:00
gnus Fix nnrss-get-namespace-prefix (bug#34685) 2021-08-10 16:41:37 +02:00
hfy-cmap-resources * test/lisp/hfy-cmap-resources/rgb.txt: Add comment line. 2020-11-12 03:20:39 +01:00
image Update copyright year to 2021 2021-01-01 01:13:56 -08:00
international * test/lisp/international/ucs-normalize-tests.el: Save 30m on hydra. 2021-08-21 18:28:38 -07:00
mail Make rfc2368 obsolete and add rfc6068 2021-08-30 01:56:10 +02:00
mh-e mh-x-image-url-sane-p: accept "https" URLs 2021-08-21 17:25:46 -07:00
minibuffer-resources Move more test data to follow our conventions 2020-10-23 21:07:26 +02:00
net Tramp code cleanup 2021-09-11 15:35:51 +02:00
nxml ; Minor license statement fixes 2021-02-08 09:10:57 +01:00
obsolete Make rfc2368 obsolete and add rfc6068 2021-08-30 01:56:10 +02:00
org Update copyright year to 2021 2021-01-01 01:13:56 -08:00
pcmpl-linux-resources Use lexical-binding in pcmpl-linux.el and add tests 2020-09-02 12:53:02 +02:00
play ; Normalize and add missing first and last lines 2021-04-19 12:21:01 +02:00
progmodes Infer identifier namespace in elisp xref backend 2021-09-12 13:00:59 +02:00
saveplace-resources Use lexical-binding in saveplace.el and add tests 2020-08-08 01:40:38 +02:00
so-long-tests Make global-so-long-mode' use buffer-line-statistics' 2021-08-03 23:20:07 +12:00
term Update copyright year to 2021 2021-01-01 01:13:56 -08:00
textmodes ; Fix typos 2021-09-03 13:05:32 +02:00
time-resources Add missed file needed by time-tests.el 2020-10-22 18:51:00 +02:00
url Update copyright year to 2021 2021-01-01 01:13:56 -08:00
vc * test/lisp/vc/vc-tests.el (vc-test--version-diff): Git env tweak. 2021-09-06 19:12:30 -07:00
xdg-resources Move more test data to follow our conventions 2020-10-23 21:07:26 +02:00
abbrev-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
align-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
allout-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
allout-widgets-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
ansi-color-tests.el Revert "Add support for "bright" ANSI colors in ansi-color" 2021-08-26 15:22:28 +02:00
apropos-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
arc-mode-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
auth-source-pass-tests.el lisp/auth-source-pass.el: Keep legitimate spaces inside data 2021-07-02 12:53:35 +02:00
auth-source-tests.el Fix failing auth-source test 2021-04-27 01:27:58 +02:00
autoinsert-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
autorevert-tests.el Mark auto-revert-test02-auto-revert-deleted-file as unstable 2021-08-14 21:37:32 +02:00
battery-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
bookmark-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
buff-menu-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
button-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
calculator-tests.el Fix calculator-string-to-number yet again (bug#47694) 2021-04-11 14:00:09 +02:00
char-fold-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
color-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
comint-tests.el Add comint-password-prompt-regexp test for "zip -e ..." 2021-03-18 11:26:37 +01:00
completion-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
cus-edit-tests.el ; Finish customize-changed-options obsoletion 2021-02-09 12:58:51 +00:00
custom-tests.el Tweak a failing custom test 2021-08-20 02:32:02 +02:00
dabbrev-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
delim-col-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
descr-text-tests.el ; Normalize and add missing first and last lines 2021-04-19 12:21:01 +02:00
dired-aux-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
dired-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
dired-x-tests.el Fix dired-guess-default logic after previous change 2021-07-21 13:04:06 +02:00
dom-tests.el Add a new test for dom-search 2021-08-09 14:14:37 +02:00
electric-tests.el * test/lisp/electric-tests.el: Un-skip c-mode tests on hydra. 2021-08-21 09:41:16 -07:00
elide-head-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
epg-config-tests.el Use lexical-binding in epg-config.el and add tests 2021-04-01 11:07:06 +02:00
epg-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
faces-tests.el Tweak tty-find-type to allow TERM=screen.xterm 2021-01-20 17:25:40 +01:00
ffap-tests.el Improve ffap-ido-mode test 2021-08-06 13:29:31 +02:00
filenotify-tests.el Some further adaptions wrt Tramp file name locks 2021-07-08 07:48:40 +02:00
files-tests.el Fix failures in recent files tests 2021-08-21 17:45:24 +02:00
files-x-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
find-cmd-tests.el Use lexical-binding in find-cmd.el and add tests 2021-01-29 06:19:06 +01:00
font-lock-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
format-spec-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
help-fns-tests.el Rename feature nativecomp' into native-compile' 2021-05-05 22:27:29 +02:00
help-mode-tests.el Hyperlink symbol names without word syntax in Help 2021-01-10 13:37:38 +00:00
help-tests.el Update help-tests.el after minibuffer map change 2021-05-25 21:22:22 +02:00
hfy-cmap-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
hi-lock-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
htmlfontify-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
ibuffer-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
ido-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
image-file-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
image-tests.el ; * test/lisp/image-tests.el: fix previous commit 2021-05-06 17:27:14 +02:00
imenu-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
info-xref-tests.el ; Normalize and add missing first and last lines 2021-04-19 12:21:01 +02:00
isearch-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
jit-lock-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
json-tests.el Speed up json.el encoding 2021-03-06 18:25:44 +00:00
jsonrpc-tests.el Fix typos 2021-02-18 16:50:55 +01:00
kmacro-tests.el ; Fix typos in doc strings 2021-03-12 12:12:14 +01:00
loadhist-tests.el Use lexical-binding in loadhist.el and add tests 2021-04-09 13:44:44 +02:00
lpr-tests.el Use lexical-binding in lpr.el and add rudimentary tests 2021-03-30 23:11:24 +02:00
ls-lisp-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
makesum-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
man-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
md4-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
minibuffer-tests.el Add more completion tests 2021-05-16 15:50:41 +02:00
misc-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
mouse-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
mwheel-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
newcomment-tests.el ; * test/lisp/newcomment-tests.el: Fix copyright year. 2021-09-06 04:26:30 +02:00
obarray-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
paren-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
password-cache-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
pcmpl-linux-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
ps-print-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
register-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
replace-tests.el Keep track of match extents in occur-mode (bug#39121) 2021-07-25 10:29:09 +02:00
rot13-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
saveplace-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
scroll-lock-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
ses-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
shadowfile-tests.el Improve robustness of shadowfile.el 2021-08-26 13:14:19 +02:00
shell-tests.el Add a couple more shell-tests-split-string tests 2021-07-16 01:42:55 +02:00
simple-tests.el ; Fix paren typo 2021-08-18 11:50:42 -07:00
sort-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
soundex-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
startup-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
subr-tests.el Move cl-lib tests for caaXr to subr-tests.el 2021-09-03 10:18:54 +02:00
tabify-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
tar-mode-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
tempo-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
term-tests.el Revert "Add support for "bright" ANSI colors in term-mode" 2021-08-26 15:21:52 +02:00
thingatpt-tests.el Make thingatpt respect fields 2021-08-25 18:04:43 +02:00
thread-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
thumbs-tests.el Use lexical-binding in thumbs.el 2021-03-20 01:11:47 +01:00
time-stamp-tests.el Use string-replace instead of replace-regexp-in-string 2021-08-08 19:25:26 +02:00
time-tests.el Adjust time-tests.el to bug#30056 2021-07-23 14:46:12 +02:00
timezone-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
version-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
wdired-tests.el Use string-replace instead of replace-regexp-in-string 2021-08-08 19:25:26 +02:00
whitespace-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
wid-edit-tests.el Add test for the widget-color-match function (Bug#45829) 2021-01-19 09:11:37 -03:00
xdg-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
xml-tests.el ; Normalize and add missing first and last lines 2021-04-19 12:21:01 +02:00
xt-mouse-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00