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: [PATCH] Fixing package-initialize, adding early init file Date: Tue, 19 Sep 2017 08:30:44 -0400 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1505825721 24617 195.159.176.226 (19 Sep 2017 12:55:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 19 Sep 2017 12:55:21 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 19 14:55:16 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 1duI3Y-00065o-GP for ged-emacs-devel@m.gmane.org; Tue, 19 Sep 2017 14:55:16 +0200 Original-Received: from localhost ([::1]:42681 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1duI3e-0008Ed-34 for ged-emacs-devel@m.gmane.org; Tue, 19 Sep 2017 08:55:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60686) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1duHg5-0004sd-9P for emacs-devel@gnu.org; Tue, 19 Sep 2017 08:31:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1duHg1-0005w7-Ah for emacs-devel@gnu.org; Tue, 19 Sep 2017 08:31:01 -0400 Original-Received: from [195.159.176.226] (port=34489 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1duHg1-0005vZ-2h for emacs-devel@gnu.org; Tue, 19 Sep 2017 08:30:57 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1duHfq-0001To-Ky for emacs-devel@gnu.org; Tue, 19 Sep 2017 14:30:46 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 30 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:EqzmKXi092fvCSe55r1VcLVkfLg= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] 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:218514 Archived-At: > Attached is a preliminary patch for fixing "the package-initialize > problem" (see [1] [2] [3]) by adding an early init file. Feedback > welcome. In particular, Thanks, comments below. > ;;;###autoload > (defun package-initialize (&optional no-activate) [...] > + (setq package-enable-at-startup nil) BTW, in a subsequent patch we could rename this to package-initialized, so the name reflects what the variable contains rather than what it's used for. > + DEFVAR_LISP ("early-init-file", Vearly_init_file, > + doc: /* File name, including directory, of user's early init file. > +If the file loaded had extension `.elc', and the corresponding source file > +exists, this variable contains the name of source file, suitable for use > +by functions like `custom-save-all' which edit the init file. > +While Emacs loads and evaluates the init file, value is the real name > +of the file, regardless of whether or not it has the `.elc' extension. */); > + Vearly_init_file = Qnil; This is not used from C code, so make it a plain old defvar in startup.el. I haven't yet looked at the startup.el part, sorry. Stefan