mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 20:32:00 -08:00
Fix M-TAB completion of variables in 'cond'
* lisp/progmodes/elisp-mode.el (elisp-completion-at-point): Add special support for 'cond, 'cond*', and 'bind*'. (Bug#73330)
This commit is contained in:
parent
8816b4f342
commit
cbaf7edbb4
1 changed files with 7 additions and 2 deletions
|
|
@ -784,13 +784,18 @@ functions are annotated with \"<f>\" via the
|
|||
(list t (elisp--completion-local-symbols)
|
||||
:predicate (lambda (sym)
|
||||
(get sym 'error-conditions))))
|
||||
((and (or ?\( 'let 'let*)
|
||||
((and (or ?\( 'let 'let* 'cond 'cond* 'bind*)
|
||||
(guard (save-excursion
|
||||
(goto-char (1- beg))
|
||||
(when (eq parent ?\()
|
||||
(up-list -1))
|
||||
(forward-symbol -1)
|
||||
(looking-at "\\_<let\\*?\\_>"))))
|
||||
(or
|
||||
(looking-at
|
||||
"\\_<\\(let\\*?\\|bind\\*\\)\\_>")
|
||||
(and (not (eq parent ?\())
|
||||
(looking-at
|
||||
"\\_<cond\\*?\\_>"))))))
|
||||
(list t (elisp--completion-local-symbols)
|
||||
:predicate #'elisp--shorthand-aware-boundp
|
||||
:company-kind (lambda (_) 'variable)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue