unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Docstring hack
@ 2022-07-30 12:14 Lynn Winebarger
  2022-07-30 12:25 ` Po Lu
  2022-07-30 13:28 ` Eli Zaretskii
  0 siblings, 2 replies; 33+ messages in thread
From: Lynn Winebarger @ 2022-07-30 12:14 UTC (permalink / raw)
  To: emacs-devel

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

The core emacs lisp libraries are riddled with strings that are erroneously
treated as docstrings in dump mode, which causes problems in the build
when, say, format gets a 0 as its template string in a macro expansion.
There are a few possible fixes I see, I'm not sure which is most likely to
be accepted.
1) Change every non-docstring that starts with and explicit escaped newline
to start with \n instead (there are a lot of them)
2) Change read_literal_string in lread.c to respect the setting of the
dynamic-docstring setting the way the byte compiler does, and change all
the lisp files not in loadup.el to set it to nil
3) Like 2, but make the default setting of dynamic-docstring nil and either
set it as a local variable in the files in loadup, or set it in loadup when
dump-mode is set
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?

Lynn

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

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2022-08-04  4:12 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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).