diff options
| author | Visuwesh | 2022-05-28 12:54:32 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2022-05-28 18:39:43 +0200 |
| commit | 5d8b6ba89efdcddfd0189da77dd4099283466a05 (patch) | |
| tree | 4cca71e15045d46406a2e90c08555337e7b19b71 | |
| parent | 2301f13a677aa4ea05bfa2372bdc66c458c0ff38 (diff) | |
| download | emacs-5d8b6ba89efdcddfd0189da77dd4099283466a05.tar.gz emacs-5d8b6ba89efdcddfd0189da77dd4099283466a05.zip | |
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).
| -rw-r--r-- | lisp/emacs-lisp/pp.el | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/pp.el b/lisp/emacs-lisp/pp.el index 3c849c2d01b..a3ff2ecbaa6 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." | |||
| 382 | (when (> (current-column) (pp--max-width)) | 382 | (when (> (current-column) (pp--max-width)) |
| 383 | (condition-case () | 383 | (condition-case () |
| 384 | (backward-up-list 1) | 384 | (backward-up-list 1) |
| 385 | (:success (when (looking-back " " 2) | 385 | (:success (when (and (not (bobp)) (looking-back " " 2)) |
| 386 | (insert "\n"))) | 386 | (insert "\n"))) |
| 387 | (error nil))))))) | 387 | (error nil))))))) |
| 388 | 388 | ||