summaryrefslogtreecommitdiff
path: root/src/syntax.c
diff options
context:
space:
mode:
authorJoão Távora <joaotavora@gmail.com>2021-09-21 22:20:17 +0100
committerJoão Távora <joaotavora@gmail.com>2021-09-27 01:07:11 +0100
commit90cbf0cb8d9959b94ba09f1faa0dcb50c8dbddbd (patch)
treee76f8770ee587a6cfc0f77bd20ec2ce2c199eca1 /src/syntax.c
parent68d73eb154c745cbba7b3fd6a0a0a087d7c157da (diff)
downloademacs-90cbf0cb8d9959b94ba09f1faa0dcb50c8dbddbd.tar.gz
emacs-90cbf0cb8d9959b94ba09f1faa0dcb50c8dbddbd.tar.bz2
emacs-90cbf0cb8d9959b94ba09f1faa0dcb50c8dbddbd.zip
Consider shorthands in Elisp's elisp-completion-at-point
Instead of referencing obarray directly, that function has to consider a collection of completions which includes the shorthand versions of some of the symbols. That collection changes from buffer to buffer, depending on the choice of elisp-shorthands. To make this process efficient, and avoid needless recalculation of the above collection, a new obarray-specific cache was invented. The Elisp variable obarray-cache is immediately nullified if something touches the obarray. * lisp/progmodes/elisp-mode.el : New helper. (elisp-completion-at-point): Use new helpers. (elisp--completion-local-symbols) (elisp--fboundp-considering-shorthands) (elisp--bboundp-considering-shorthands): New helpers * src/lread.c (intern_driver): Nullify Qobarray_cache. (syms_of_lread): Add Qobarray_cache. * test/lisp/progmodes/elisp-mode-tests.el (elisp-shorthand-completion-at-point): New test. * test/lisp/progmodes/elisp-resources/simple-shorthand-test.el (f-test-complete-me): New fixture.
Diffstat (limited to 'src/syntax.c')
0 files changed, 0 insertions, 0 deletions