emacs-devel
[Top][All Lists]
Advanced

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

Re: Doc strings starting with a line break


From: Stefan Monnier
Subject: Re: Doc strings starting with a line break
Date: Sun, 18 Sep 2016 21:06:27 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

>> There's a special hack in the Lisp reader which reads such strings as
>> the constant 0 (under some circumstances) so that we don't allocate
>> memory for those strings which will soon after be replaced by
>> a reference to some part of the DOC file (via Snarf-documentation).
> That feature is only used in elc files, though (and some el files that
> are explicitly loaded noncompiled like loaddefs.el).

I'm fuzzy on the details, indeed.  But IIRC the .elc files never
contains strings that start with "\<lf> so this special hack doesn't
apply to them (we have another (related) hack for the (#$ . <N>) cons
cells of those preloaded .elc files).

IOW, it might be that nowadays this hack only applies to
loaddefs.el, really.  Funnily enough the patch below make Emacs crash,
rather than just changing its size.


        Stefan


diff --git a/src/lread.c b/src/lread.c
index ef58b20..21a8f01 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -3096,8 +3096,8 @@ read1 (Lisp_Object readcharfun, int *pch, bool 
first_in_list)
        /* 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)
-         return make_number (0);
+       /* if (!NILP (Vpurify_flag) && NILP (Vdoc_file_name) && cancel)
+        *   return make_number (0); */
 
        if (! force_multibyte && force_singlebyte)
          {




reply via email to

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