unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: Re: Doc strings starting with a line break
Date: Sun, 18 Sep 2016 21:06:27 -0400	[thread overview]
Message-ID: <jwvpoo0iun2.fsf-monnier+gmane.emacs.devel@gnu.org> (raw)
In-Reply-To: 87lgyp16vt.fsf@linux-m68k.org

>> 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	other threads:[~2016-09-19  1:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-18 10:51 Doc strings starting with a line break Tino Calancha
2016-09-18 11:06 ` Richard Copley
2016-09-18 11:18   ` Tino Calancha
2016-09-18 15:58   ` Stefan Monnier
2016-09-18 16:59     ` Andreas Schwab
2016-09-19  1:06       ` Stefan Monnier [this message]
2016-09-18 12:27 ` Andreas Schwab
2016-09-18 12:29   ` Tino Calancha

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=jwvpoo0iun2.fsf-monnier+gmane.emacs.devel@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    /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).