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

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

bug#44155: Print integers as characters


From: Andreas Schwab
Subject: bug#44155: Print integers as characters
Date: Fri, 23 Oct 2020 00:39:09 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

On Okt 22 2020, Juri Linkov wrote:

> diff --git a/src/print.c b/src/print.c
> index dca095f281..909c55efed 100644
> --- a/src/print.c
> +++ b/src/print.c
> @@ -1908,8 +1908,16 @@ print_object (Lisp_Object obj, Lisp_Object 
> printcharfun, bool escapeflag)
>      {
>      case_Lisp_Int:
>        {
> -     int len = sprintf (buf, "%"pI"d", XFIXNUM (obj));
> -     strout (buf, len, len, printcharfun);
> +        if (print_integers_as_characters && CHARACTERP (obj))
> +          {
> +            printchar ('?', printcharfun);
> +            print_string (CALLN (Fstring, obj), printcharfun);

That will create ambigous output.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."





reply via email to

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