diff options
author | Daniel Koning <dk@danielkoning.com> | 2020-06-22 19:03:20 -0500 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2020-07-04 10:55:42 +0300 |
commit | 32b3856f850e1721b3be23b50f4b90f9f59fee8a (patch) | |
tree | 55cd5b84183f97a0a18dfea3877d65615af2f7e3 | |
parent | 5d1bac0ac951e25d0b0b39a9919f13053162d5df (diff) | |
download | emacs-32b3856f850e1721b3be23b50f4b90f9f59fee8a.tar.gz |
Use 'emacs-lisp-mode-syntax-table' for reading Lisp expressions
* lisp/simple.el (read--expression): Set syntax table to
'emacs-lisp-mode-syntax-table' when reading a Lisp expression
from the minibuffer. (Bug#41781)
Copyright-paperwork-exempt: yes
-rw-r--r-- | lisp/simple.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index a28d10fd4a5..2f92238e640 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1622,8 +1622,11 @@ display the result of expression evaluation." (let ((minibuffer-completing-symbol t)) (minibuffer-with-setup-hook (lambda () - ;; FIXME: call emacs-lisp-mode (see also - ;; `eldoc--eval-expression-setup')? + ;; FIXME: instead of just applying the syntax table, maybe + ;; use a special major mode tailored to reading Lisp + ;; expressions from the minibuffer? (`emacs-lisp-mode' + ;; doesn't preserve the necessary keybindings.) + (set-syntax-table emacs-lisp-mode-syntax-table) (add-hook 'completion-at-point-functions #'elisp-completion-at-point nil t) (run-hooks 'eval-expression-minibuffer-setup-hook)) |