From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Doc strings starting with a line break Date: Sun, 18 Sep 2016 21:06:27 -0400 Message-ID: References: <87lgyp16vt.fsf@linux-m68k.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1474247229 19499 195.159.176.226 (19 Sep 2016 01:07:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 19 Sep 2016 01:07:09 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 19 03:07:06 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bln2t-0003RZ-5b for ged-emacs-devel@m.gmane.org; Mon, 19 Sep 2016 03:06:55 +0200 Original-Received: from localhost ([::1]:52152 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bln2r-0007WX-GX for ged-emacs-devel@m.gmane.org; Sun, 18 Sep 2016 21:06:53 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55631) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bln2l-0007WP-H1 for emacs-devel@gnu.org; Sun, 18 Sep 2016 21:06:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bln2h-0004YE-3q for emacs-devel@gnu.org; Sun, 18 Sep 2016 21:06:46 -0400 Original-Received: from [195.159.176.226] (port=55908 helo=blaine.gmane.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bln2g-0004Xh-Sj for emacs-devel@gnu.org; Sun, 18 Sep 2016 21:06:43 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1bln2Z-000186-RD for emacs-devel@gnu.org; Mon, 19 Sep 2016 03:06:35 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 35 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:zAdVpHEej9vuzEeaEKrXnZ4UQHg= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:207594 Archived-At: >> 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 "\ so this special hack doesn't apply to them (we have another (related) hack for the (#$ . ) 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) {