bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#70868: 30.0.50; pp--insert-lisp prints small integers as characters


From: Michael Heerdegen
Subject: bug#70868: 30.0.50; pp--insert-lisp prints small integers as characters
Date: Sat, 11 May 2024 12:58:24 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

No Wayman <iarchivedmywholelife@gmail.com> writes:

> $ emacs -q --batch --eval '(pp-emacs-lisp-code `(:comments 59))'
> Error: scan-error ("Unbalanced parentheses" 1 16)
>  forward-sexp-default-function(1)
>  forward-sexp(1)
>  indent-sexp()
>  pp-emacs-lisp-code((:comments 59))
>  eval((pp-emacs-lisp-code `(:comments 59)) t)
>  command-line-1(("--eval" "(pp-emacs-lisp-code `(:comments   59))"))
>  command-line()
>  normal-top-level()
> Scan error: "Unbalanced parentheses", 1, 16

A good catch!  59 is the character ;.  This is a bug in the printer:

#+begin_src emacs-lisp
(let ((print-integers-as-characters t))
   (princ ?\; (current-buffer)))
#+end_src

prints "?;" instead of "?\;" - it fails to quote the character.  Binding
`print-quoted' doesn't help.  This needs to be fixed.


Michael.





reply via email to

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