]> git.eshelyaron.com Git - emacs.git/commitdiff
Use 'emacs-lisp-mode-syntax-table' for reading Lisp expressions
authorDaniel Koning <dk@danielkoning.com>
Tue, 23 Jun 2020 00:03:20 +0000 (19:03 -0500)
committerEli Zaretskii <eliz@gnu.org>
Sat, 4 Jul 2020 07:55:42 +0000 (10:55 +0300)
* 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

lisp/simple.el

index a28d10fd4a5f2e5c79758b94631ebd2853c03705..2f92238e640521038fb519d037a38168891c08a1 100644 (file)
@@ -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))