[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 32b3856: Use 'emacs-lisp-mode-syntax-table' for reading Lisp expr

From: Eli Zaretskii
Subject: master 32b3856: Use 'emacs-lisp-mode-syntax-table' for reading Lisp expressions
Date: Sat, 4 Jul 2020 03:57:26 -0400 (EDT)

branch: master
commit 32b3856f850e1721b3be23b50f4b90f9f59fee8a
Author: Daniel Koning <dk@danielkoning.com>
Commit: Eli Zaretskii <eliz@gnu.org>

    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
 lisp/simple.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lisp/simple.el b/lisp/simple.el
index a28d10f..2f92238 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1622,8 +1622,11 @@ display the result of expression evaluation."
   (let ((minibuffer-completing-symbol t))
         (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))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]