diff options
| author | Daniel Koning | 2020-06-22 19:03:20 -0500 |
|---|---|---|
| committer | Eli Zaretskii | 2020-07-04 10:55:42 +0300 |
| commit | 32b3856f850e1721b3be23b50f4b90f9f59fee8a (patch) | |
| tree | 55cd5b84183f97a0a18dfea3877d65615af2f7e3 | |
| parent | 5d1bac0ac951e25d0b0b39a9919f13053162d5df (diff) | |
| download | emacs-32b3856f850e1721b3be23b50f4b90f9f59fee8a.tar.gz emacs-32b3856f850e1721b3be23b50f4b90f9f59fee8a.zip | |
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." | |||
| 1622 | (let ((minibuffer-completing-symbol t)) | 1622 | (let ((minibuffer-completing-symbol t)) |
| 1623 | (minibuffer-with-setup-hook | 1623 | (minibuffer-with-setup-hook |
| 1624 | (lambda () | 1624 | (lambda () |
| 1625 | ;; FIXME: call emacs-lisp-mode (see also | 1625 | ;; FIXME: instead of just applying the syntax table, maybe |
| 1626 | ;; `eldoc--eval-expression-setup')? | 1626 | ;; use a special major mode tailored to reading Lisp |
| 1627 | ;; expressions from the minibuffer? (`emacs-lisp-mode' | ||
| 1628 | ;; doesn't preserve the necessary keybindings.) | ||
| 1629 | (set-syntax-table emacs-lisp-mode-syntax-table) | ||
| 1627 | (add-hook 'completion-at-point-functions | 1630 | (add-hook 'completion-at-point-functions |
| 1628 | #'elisp-completion-at-point nil t) | 1631 | #'elisp-completion-at-point nil t) |
| 1629 | (run-hooks 'eval-expression-minibuffer-setup-hook)) | 1632 | (run-hooks 'eval-expression-minibuffer-setup-hook)) |