unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Lynn Winebarger <owinebar@gmail.com>
To: Po Lu <luangruo@yahoo.com>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: Docstring hack
Date: Sat, 30 Jul 2022 09:04:46 -0400	[thread overview]
Message-ID: <CAM=F=bC5ys2czwj8=1jzvKJiJB5RT6krSjpsHwZD0D6ys6=HoQ@mail.gmail.com> (raw)
In-Reply-To: <CAM=F=bAHodvXYP_vSY_wDUoOsskRvkLuP0b-B-MaicUg3F-SUg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1815 bytes --]

On Sat, Jul 30, 2022, 8:50 AM Lynn Winebarger <owinebar@gmail.com> wrote:

> On Sat, Jul 30, 2022, 8:25 AM Po Lu <luangruo@yahoo.com> wrote:
>
>> Lynn Winebarger <owinebar@gmail.com> writes:
>> > 4) Make a special read syntax for literal docstrings, e.g. #", and do
>> away with the weird context-sensitive semantics of ordinary string literals
>> altogether.
>> >
>> > Also, the test in read_literal_string should probably be for
>> "will_dump_p" rather than the purify flag, since it's the dumping that
>> prompts the deferral of docstring
>> > loading, not the identification of constants.
>> >
>> > Any preferences?
>>
>> None in particular, except that option 4 is unacceptable as it is not
>> compatible with older code, and is completely different from all other
>> Lisp implementations.
>>
>
> Not compatible in what sense?
> I'm not that familiar with lisp implementations - isn't Emacs's treatment
> of a leading escaped literal newline already completely different?  Is
> there a typical use of #" as a reader macro?  It's"undefined" according to
> https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node191.html
>


Also, I'm only talking about the treatment of docstrings by the reader.
The byte compiler has much more accurate identification of docstrings that
can be relied on when using the bootstrap emacs to byte compile files to be
pre-loaded.
Another approach would to eliminate the special treatment by the reader
altogether to the extent it only saves space in the bootstrap dump, then
rely on lazy loading from byte-compiled files for docstrings in lisp
files.  That might require evicting those docstrings during the first
post-bootstrap dump, or just eliminating them from the function symbol
property during the bootstrap dump, since who is using the help system in
the bootstrap emacs?

Lynn

[-- Attachment #2: Type: text/html, Size: 3255 bytes --]

  reply	other threads:[~2022-07-30 13:04 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 [this message]
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
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='CAM=F=bC5ys2czwj8=1jzvKJiJB5RT6krSjpsHwZD0D6ys6=HoQ@mail.gmail.com' \
    --to=owinebar@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=luangruo@yahoo.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).