From: Stefan Monnier Date: Tue, 15 Aug 2023 03:01:12 +0000 (-0400) Subject: * lisp/emacs-lisp/pp.el (pp-fill): Fix bug#65159 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=eba0f091d9c1a2cffc45d11c6b3f0814901e4d0b;p=emacs.git * lisp/emacs-lisp/pp.el (pp-fill): Fix bug#65159 --- diff --git a/lisp/emacs-lisp/pp.el b/lisp/emacs-lisp/pp.el index 550fab2f4b3..95ad222cc4d 100644 --- a/lisp/emacs-lisp/pp.el +++ b/lisp/emacs-lisp/pp.el @@ -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