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: Eli Zaretskii
Subject: bug#70868: 30.0.50; pp--insert-lisp prints small integers as characters
Date: Sat, 11 May 2024 09:47:33 +0300

> From: No Wayman <iarchivedmywholelife@gmail.com>
> Date: Fri, 10 May 2024 20:10:43 -0400
> 
> No Wayman <iarchivedmywholelife@gmail.com> writes:
> 
> > From the body of pp--insert-lisp in pp.el:
> >
> >
> > ```emacs-lisp
> > ;; Print some of the smaller integers as characters, perhaps?
> > (integer
> > (if (<= ?0 sexp ?z)
> >     (let ((print-integers-as-characters t))
> >       (princ sexp (current-buffer)))
> >   (princ sexp (current-buffer))))
> > ```
> >
> > I stumbled on this behavior in a program of which pretty prints 
> > elisp forms as
> > part of a report.
> > I don't want characters when the input form originally included 
> > integers.
> > Why do we do this here? The commentary doesn't offer any insight 
> > and sounds
> > confused about the behavior, too.
> > Is it worth making configurable, or outright removing?
> 
> A side-effect that tilts me in favor of removing said behavior:
> 
> $ 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

Lars and Stefan, any comments?





reply via email to

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