]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/emacs-lisp/pp.el (pp-fill): Fix bug#65159
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 15 Aug 2023 03:01:12 +0000 (23:01 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 15 Aug 2023 03:11:27 +0000 (23:11 -0400)
lisp/emacs-lisp/pp.el

index 550fab2f4b3cb9c76589da0c8a8cc9e2ea033e2d..95ad222cc4d9136241328d49b796de65c367bd55 100644 (file)
@@ -226,8 +226,10 @@ it inserts and pretty-prints that arg at point."
                     (if (eq lif 'defun) (setq lif 2))
                     (when (natnump lif)
                       (goto-char (match-end 0))
-                      (forward-sexp lif)
-                      (funcall newline)))))
+                      ;; Do nothing if there aren't enough args.
+                      (ignore-error scan-error
+                        (forward-sexp lif)
+                        (funcall newline))))))
               (save-excursion
                 (pp-fill (1+ paired) (1- (point)))))
             ;; Now the sexp either ends beyond `fill-column' or is