From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Skipping unexec via a big .elc file Date: Sat, 11 Mar 2017 14:27:11 +0200 Message-ID: <831su4dmn4.fsf@gnu.org> References: <8360ojpndr.fsf@gnu.org> <83shrnm0k1.fsf@gnu.org> <075B0922-F07A-4FBA-AE71-027E964A5ED4@raeburn.org> <54AAC13A-CF56-4393-A932-DC6CBBF51259@raeburn.org> <3CC6BB36-1794-4202-8243-132E0345B236@raeburn.org> <52BDCC33-546C-4F47-A230-00EBC813B038@raeburn.org> <15CF14CC-C7DE-44BA-AC7D-F0BF1F160979@raeburn.org> <9463F91F-DB82-48E1-BE01-1E2BC8DA0766@raeburn.org> <831swxzbw8.fsf@gnu.org> <83y3z2wphb.fsf@gnu.org> <83tw9bb42m.fsf@gnu.org> <349ED8B9-C34B-495B-9FB5-E72CE6EFCA38@raeburn.org> <87inpni6xa.fsf@linux-m68k.org> <8360lmesso.fsf@gnu.org> <3B044D64-7C94-42D7-BE1B-7A9CA76C5A67@raeburn.org> <83k29xc49v.fsf@gnu.org> <2C5C5C6E-9D73-4613-948B-C15B93968717@raeburn.org> <83poiy8cnv.fsf@gnu.org> <83r32mqq5f.fsf@gnu.org> <83zih1jf37.fsf@gnu.org> <8A8DA980-13A7-4F8B-9D07-391728C673C9@raeburn.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1489235290 15440 195.159.176.226 (11 Mar 2017 12:28:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 11 Mar 2017 12:28:10 +0000 (UTC) Cc: emacs-devel@gnu.org To: Ken Raeburn Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 11 13:28:02 2017 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 1cmg7r-00034k-Ko for ged-emacs-devel@m.gmane.org; Sat, 11 Mar 2017 13:27:59 +0100 Original-Received: from localhost ([::1]:43044 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cmg7x-0001WE-IZ for ged-emacs-devel@m.gmane.org; Sat, 11 Mar 2017 07:28:05 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48459) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cmg7Q-0001W7-KI for emacs-devel@gnu.org; Sat, 11 Mar 2017 07:27:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cmg7N-0004zU-F1 for emacs-devel@gnu.org; Sat, 11 Mar 2017 07:27:32 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42818) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cmg7N-0004zM-B4; Sat, 11 Mar 2017 07:27:29 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1170 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cmg7M-00027J-G8; Sat, 11 Mar 2017 07:27:29 -0500 In-reply-to: <8A8DA980-13A7-4F8B-9D07-391728C673C9@raeburn.org> (message from Ken Raeburn on Mon, 6 Mar 2017 03:46:17 -0500) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:212901 Archived-At: > From: Ken Raeburn > Date: Mon, 6 Mar 2017 03:46:17 -0500 > Cc: emacs-devel@gnu.org > > On Mar 4, 2017, at 09:23, Eli Zaretskii wrote: > > >>> Also, it looks like the logic in startup.el that should bypass certain > >>> stuff under -Q isn't working, because I see my abbrevs being loaded > >>> even though I invoked "emacs -Q". Thoughts? > >> > >> Strange… this is also working for me. At least, settings from my .emacs aren’t being applied, when I use “emacs -Q”. > > > > This problem is still there. It has nothing to do with loading > > ~/.emacs, though: startup.el always loads your ~/.emacs.d/abbrev_defs, > > if that file exists. I'm not sure why it loads that file, but I > > verified that the master version does that as well. > > Odd, seems like -Q should skip that, with the rest of the user’s initializations. Maybe so, but this code has been there since about forever, and the documentation of -Q doesn't say user's abbrevs are bypassed, only under -batch. In any case, it's a separate problem. > > So the issue here is not that the file is loaded, but how it is > > processed. I only noticed this because my abbrev_defs file uses a > > function that is only defined in my .emacs. So "emacs -Q" on the > > raeburn-startup branch barfs because that function is not known. > > Strangely, "emacs -Q" on the master branch doesn't signal an error, > > and I don't even see Fsignal called if I set a breakpoint there. I > > don't (yet) understand why the different behavior. > > > > If you insert into your abbrev_defs file something that references a > > function which is not defined, do you see the same problem as I do? > > I added a line: > > (missing-function) > > in between some define-abbrev-table invocations, and “emacs -Q” on master (2-3 weeks old) and raeburn-startup both complain about it for me. I debugged this some more: this has nothing to do with unknown functions, you just need to have global abbrevs in the abbrev_defs file, for example: (define-abbrev-table 'global-abbrev-table '( ("abbout" "about" nil 0) ("abotu" "about" nil 0))) The problem seems to be that global-abbrev-table is not an abbrev table where startup.el calls quietly-read-abbrev-file (abbrev-table-p returns nil for it). If I make this change: diff --git a/lisp/startup.el b/lisp/startup.el index 4a04f9c..7f55962 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -1263,6 +1263,8 @@ command-line (deactivate-mark))) ;; If the user has a file of abbrevs, read it (unless -batch). + (or (abbrev-table-p global-abbrev-table) + (setq global-abbrev-table (make-abbrev-table))) (when (and (not noninteractive) (file-exists-p abbrev-file-name) (file-readable-p abbrev-file-name)) then "emacs -Q" starts up normally. Can you reproduce this? global-abbrev-table is defined in abbrev.el like this: (defvar global-abbrev-table (make-abbrev-table) "The abbrev table whose abbrevs affect all buffers. Each buffer may also have a local abbrev table. If it does, the local table overrides the global one for any particular abbrev defined in both.") So I think the issue could be that this defvar somehow doesn't end up in dumped.elc as an abbrev table under the new build procedure. Does that make sense?