GNU bug report logs -
#69168
[BUG] 30.0.50; pp-emacs-lisp-code produces invalid elisp for backquoted forms
Previous Next
Full log
View this message in rfc822 format
> Cc: 69168 <at> debbugs.gnu.org
> Date: Sun, 25 Feb 2024 06:00:38 +0100
> From: Michael Heerdegen via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>
>
> Michael Heerdegen <michael_heerdegen <at> web.de> writes:
>
> > The second problem is that the recursive calls of `pp--insert-lisp'
> > print symbols using `princ' (i.e., without quoting), so even the list
> > representation is wrong.
>
> I think we should print any symbol using `prin1', not `princ' - printing
> symbols that need quoting without quoting is not useful:
>
>
> From f493708a456608f59b29c3f2308ecc51177667ec Mon Sep 17 00:00:00 2001
> From: Michael Heerdegen <michael_heerdegen <at> web.de>
> Date: Sun, 18 Feb 2024 02:48:15 +0100
> Subject: [PATCH] Fix pp-emacs-lisp-code printing of symbols
>
> * lisp/emacs-lisp/pp.el (pp--insert-lisp): Print symbols
> readably (bug#69168).
> ---
> lisp/emacs-lisp/pp.el | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/lisp/emacs-lisp/pp.el b/lisp/emacs-lisp/pp.el
> index 1d722051406..944dd750839 100644
> --- a/lisp/emacs-lisp/pp.el
> +++ b/lisp/emacs-lisp/pp.el
> @@ -458,6 +458,8 @@ pp--insert-lisp
> (string
> (let ((print-escape-newlines t))
> (prin1 sexp (current-buffer))))
> + (symbol
> + (prin1 sexp (current-buffer)))
> (otherwise (princ sexp (current-buffer)))))
>
> (defun pp--format-vector (sexp)
> --
> 2.39.2
Thanks. Stefan, any comments?
This bug report was last modified 1 year and 76 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.