[Top][All Lists]

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

Re: Docstring hack

From: Po Lu
Subject: Re: Docstring hack
Date: Sun, 31 Jul 2022 16:48:29 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

> 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?

Maybe this would work? (This question is also partly intended for Lynn)

diff --git a/lisp/loadup.el b/lisp/loadup.el
index 21a87dbd77..e81eccb58e 100644
--- a/lisp/loadup.el
+++ b/lisp/loadup.el
@@ -387,7 +387,8 @@
 ;; you may load them with a "site-load.el" file.
 ;; But you must also cause them to be scanned when the DOC file
 ;; is generated.
-(let ((lp load-path))
+(let ((lp load-path)
+      (purify-flag nil))
   (load "site-load" t)
   ;; We reset load-path after dumping.
   ;; For a permanent change in load-path, use configure's

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

Or perhaps what Stefan said about applying the kludge only to

reply via email to

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