emacs-diffs
[Top][All Lists]
Advanced

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

master 5d8b6ba89e: pp--insert-lisp: Don't bug out on certain forms at be


From: Lars Ingebrigtsen
Subject: master 5d8b6ba89e: pp--insert-lisp: Don't bug out on certain forms at beginning of buffer
Date: Sat, 28 May 2022 12:40:12 -0400 (EDT)

branch: master
commit 5d8b6ba89efdcddfd0189da77dd4099283466a05
Author: Visuwesh <visuweshm@gmail.com>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    pp--insert-lisp: Don't bug out on certain forms at beginning of buffer
    
    * pp.el (pp--insert): Check if point is in beginning of buffer before
    calling `looking-back' (bug#55677).
---
 lisp/emacs-lisp/pp.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/pp.el b/lisp/emacs-lisp/pp.el
index 3c849c2d01..a3ff2ecbaa 100644
--- a/lisp/emacs-lisp/pp.el
+++ b/lisp/emacs-lisp/pp.el
@@ -382,7 +382,7 @@ Use the `pp-max-width' variable to control the desired line 
length."
         (when (> (current-column) (pp--max-width))
           (condition-case ()
               (backward-up-list 1)
-            (:success (when (looking-back " " 2)
+            (:success (when (and (not (bobp)) (looking-back " " 2))
                         (insert "\n")))
             (error nil)))))))
 



reply via email to

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