emacs-diffs
[Top][All Lists]
Advanced

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

master 3e7257c3ed: Improve pp-last-sexp ergonomics


From: Lars Ingebrigtsen
Subject: master 3e7257c3ed: Improve pp-last-sexp ergonomics
Date: Fri, 25 Mar 2022 11:44:36 -0400 (EDT)

branch: master
commit 3e7257c3ed3e7f5451d4dab0b222f93a2d1b2aa3
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Improve pp-last-sexp ergonomics
    
    * lisp/emacs-lisp/pp.el (pp-last-sexp): Ignore ,@?
    before a sexp, because eval-ing that will always lead to an error
    (bug#54537).
---
 lisp/emacs-lisp/pp.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lisp/emacs-lisp/pp.el b/lisp/emacs-lisp/pp.el
index e782cdb1da..ad693fa5a6 100644
--- a/lisp/emacs-lisp/pp.el
+++ b/lisp/emacs-lisp/pp.el
@@ -177,6 +177,10 @@ Also add the value to the front of the list in the 
variable `values'."
     (let ((pt (point)))
       (save-excursion
         (forward-sexp -1)
+        ;; Make `pp-eval-last-sexp' work the same way `eval-last-sexp'
+        ;; does.
+        (when (looking-at ",@?")
+          (goto-char (match-end 0)))
         (read
          ;; If first line is commented, ignore all leading comments:
          (if (save-excursion (beginning-of-line) (looking-at-p "[ \t]*;"))



reply via email to

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