unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Po Lu <luangruo@yahoo.com>
Cc: owinebar@gmail.com, emacs-devel@gnu.org
Subject: Re: Docstring hack
Date: Sun, 31 Jul 2022 10:56:17 +0300	[thread overview]
Message-ID: <83o7x54swu.fsf@gnu.org> (raw)
In-Reply-To: <878ro9iw2q.fsf@yahoo.com> (message from Po Lu on Sun, 31 Jul 2022 15:24:13 +0800)

> From: Po Lu <luangruo@yahoo.com>
> Cc: owinebar@gmail.com,  emacs-devel@gnu.org
> Date: Sun, 31 Jul 2022 15:24:13 +0800
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > OK, but I still lack some glue to understand the issue.  Specifically:
> >
> >   . the OP said "strings that are erroneously treated as docstrings in
> >     dump mode" -- where's the code which makes that mistake, and how
> >     is read_literal_string related to that mistake?
> 
> He's referring to this part of lread.c:
> 
>   /* If purifying, and string starts with \ newline,
>      return zero instead.  This is for doc strings
>      that we are really going to find in etc/DOC.nn.nn.  */
>   if (!NILP (Vpurify_flag) && NILP (Vdoc_file_name) && cancel)
>     {
>       unbind_to (count, Qnil);
>       return make_fixnum (0);
>     }

Does this mean that just resetting purify-flag is enough to avoid the
problem?  If so, I think purify-flag is only meant for preloaded
packages, and dumping Emacs with additional packages isn't supposed to
set that flag.  Or maybe loadup.el should load an additional file
(beyond site-load and site-init), after it resets purify-flag?

An alternative is, of course, to make that code in lread.c smarter in
detecting doc strings and applying that handling only to doc strings.

> >   . why isn't there an alternative to fix read_literal_string not to
> >     generate zero instead of the format template? the other
> >     alternatives all look like partial kludges to me
> 
> I can't answer this question, sorry.  You'll have to ask the OP.

I did: the OP was on the CC list.

Thanks.



  reply	other threads:[~2022-07-31  7:56 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-30 12:14 Docstring hack Lynn Winebarger
2022-07-30 12:25 ` Po Lu
2022-07-30 12:50   ` Lynn Winebarger
2022-07-30 13:04     ` Lynn Winebarger
2022-07-30 13:32     ` Po Lu
2022-07-30 13:28 ` Eli Zaretskii
2022-07-30 13:36   ` Po Lu
2022-07-30 15:11     ` Eli Zaretskii
2022-07-30 15:38       ` Lynn Winebarger
2022-07-30 15:44         ` Eli Zaretskii
2022-07-30 16:32           ` Lynn Winebarger
2022-07-30 16:43             ` Eli Zaretskii
2022-07-31  2:17               ` Po Lu
2022-07-31  6:27                 ` Eli Zaretskii
2022-07-31  7:24                   ` Po Lu
2022-07-31  7:56                     ` Eli Zaretskii [this message]
2022-07-31  8:48                       ` Po Lu
2022-07-31  9:14                         ` Lars Ingebrigtsen
2022-07-31 22:31                           ` Stefan Monnier
2022-08-01 10:38                             ` Lars Ingebrigtsen
2022-08-04  4:12                         ` Lynn Winebarger
2022-07-31 12:53                       ` Lynn Winebarger
2022-07-31 13:05                         ` Eli Zaretskii
2022-07-31 20:29                           ` Lynn Winebarger
2022-08-01  1:05                             ` Po Lu
2022-08-01 11:07                             ` Eli Zaretskii
2022-07-31  8:03                   ` Stefan Monnier
2022-07-31 12:43                     ` Lynn Winebarger
2022-07-31 21:32                       ` Stefan Monnier
2022-08-02 16:55                         ` Lynn Winebarger
2022-07-31 11:57               ` Lynn Winebarger
2022-07-31  0:52       ` Po Lu
2022-07-31  7:52     ` Stefan Monnier

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83o7x54swu.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=luangruo@yahoo.com \
    --cc=owinebar@gmail.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).