From: Visuwesh <visuweshm@gmail.com>
To: 55478@debbugs.gnu.org
Subject: bug#55478: 29.0.50; pp-emacs-lisp-code prints '("a") as (a)
Date: Tue, 17 May 2022 15:48:31 +0530 [thread overview]
Message-ID: <87o7zwfonc.fsf@gmail.com> (raw)
In-Reply-To: <87sfp8fox3.fsf@gmail.com> (Visuwesh's message of "Tue, 17 May 2022 15:42:40 +0530")
[செவ்வாய் மே 17, 2022] Visuwesh wrote:
I hit send too early.
> Sorry for the awful subject line. To reproduce,
>
> 1. emacs -Q
> 2. (pp-emacs-lisp-code '("a"))
> 3. C-x C-e
>
> instead of (pp-emacs-lisp-code '("a")) you can also try
> (pp-emacs-lisp-code '("a" . "b")). However, if the argument is '("a"
> "b"), then there are no such problems.
>
> A quick through edebug shows that this is due to the usage of `princ'.
^^^^^^^^^^^^^^^^^^^^^^
A quick edebug through pp--insert-lisp shows that it is due to use of
`princ' in this condition,
(cons (cond
((consp (cdr sexp))
(if (and (length= sexp 2)
(memq (car sexp) '(quote function)))
(cond
((symbolp (cadr sexp))
(let ((print-quoted t))
(prin1 sexp (current-buffer))))
((consp (cadr sexp))
(insert (if (eq (car sexp) 'quote)
"'" "#'"))
(pp--format-list (cadr sexp)
(set-marker (make-marker) (1- (point))))))
(pp--format-list sexp)))
(t
(princ sexp (current-buffer)))))
^^^^^^^^^^^^^^^^^^^^^^^^^
next prev parent reply other threads:[~2022-05-17 10:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-17 10:12 bug#55478: 29.0.50; pp-emacs-lisp-code prints '("a") as (a) Visuwesh
2022-05-17 10:18 ` Visuwesh [this message]
2022-05-17 17:45 ` Lars Ingebrigtsen
[not found] ` <87sfp6ut7t.fsf@gmail.com>
2022-05-19 23:39 ` Lars Ingebrigtsen
2022-05-20 4:41 ` Visuwesh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o7zwfonc.fsf@gmail.com \
--to=visuweshm@gmail.com \
--cc=55478@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.