all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Phil Sainty <psainty@orcon.net.nz>
To: 21423@debbugs.gnu.org
Subject: bug#21423: 24.5; (package-initialize) added to init.el without (setq package-enable-at-startup nil)
Date: Mon, 07 Sep 2015 01:18:46 +1200	[thread overview]
Message-ID: <55EC3D36.8060007@orcon.net.nz> (raw)
In-Reply-To: <55EC1F21.8080702@orcon.net.nz>

[-- Attachment #1: Type: text/plain, Size: 386 bytes --]

...and I'd copied and pasted an unwanted paren from the original line,
so that patch was broken anyway. Now fixed and tested.

In addition I realised the comments needed tweaking to match the change;
and I spotted another (related) bug whereby the code which looks for
calls to (package-initialize) doesn't take its optional argument into
account, so I've modified those searches too.


[-- Attachment #2: 0001-Disable-package-enable-at-startup-when-forcing-packa.patch --]
[-- Type: text/x-patch, Size: 2230 bytes --]

From c8287af963e5de462c572c7b0a95554fb96bba7d Mon Sep 17 00:00:00 2001
From: Phil Sainty <psainty@orcon.net.nz>
Date: Sun, 6 Sep 2015 23:05:34 +1200
Subject: [PATCH] Disable package-enable-at-startup when forcing
 package-initialize

---
 lisp/emacs-lisp/package.el | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index d4a2f02..3b70880 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -1833,12 +1833,12 @@ add a call to it along with some explanatory comments."
                     (save-restriction
                       (widen)
                       (goto-char (point-min))
-                      (search-forward "(package-initialize)" nil 'noerror))))
+                      (re-search-forward "(package-initialize\\_>" nil 'noerror))))
               ;; Don't visit the file if we don't have to.
               (with-temp-buffer
                 (insert-file-contents user-init-file)
                 (goto-char (point-min))
-                (search-forward "(package-initialize)" nil 'noerror)))))
+                (re-search-forward "(package-initialize\\_>" nil 'noerror)))))
       (unless contains-init
         (with-current-buffer (or buffer
                                  (let ((delay-mode-hooks t))
@@ -1853,9 +1853,10 @@ add a call to it along with some explanatory comments."
               (insert
                "\n"
                ";; Added by Package.el.  This must come before configurations of\n"
-               ";; installed packages.  Don't delete this line.  If you don't want it,\n"
-               ";; just comment it out by adding a semicolon to the start of the line.\n"
-               ";; You may delete these explanatory comments.\n"
+               ";; installed packages.  Don't delete these lines.  If you don't want\n"
+               ";; them, just comment them out by adding a semicolon to the start of\n"
+               ";; each line.  You may delete these explanatory comments.\n"
+               "(setq package-enable-at-startup nil)\n"
                "(package-initialize)\n")
               (unless (looking-at-p "$")
                 (insert "\n"))
-- 
2.1.0


      parent reply	other threads:[~2015-09-06 13:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-06 11:01 bug#21423: 24.5; (package-initialize) added to init.el without (setq package-enable-at-startup nil) Phil Sainty
2015-09-06 11:10 ` Phil Sainty
2015-09-06 12:59   ` Artur Malabarba
2015-09-06 13:29     ` Phil Sainty
2015-09-06 15:21       ` Artur Malabarba
2015-09-06 22:33         ` Stefan Monnier
2015-09-07 10:26           ` Artur Malabarba
2015-09-06 13:18   ` Phil Sainty [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55EC3D36.8060007@orcon.net.nz \
    --to=psainty@orcon.net.nz \
    --cc=21423@debbugs.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.