From 845cb4a2ce9e32b12f2a916e3f5812d96ea56c77 Mon Sep 17 00:00:00 2001 From: Sam Steingold Date: Mon, 13 Apr 2015 23:27:02 -0400 Subject: [PATCH] package--ensure-init-file: widen before looking for "(package-initialize)" --- lisp/emacs-lisp/package.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index f3333751606..dd1c5dfc056 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1782,6 +1782,7 @@ using `package-compute-transaction'." (if buffer (with-current-buffer buffer (save-excursion + (widen) (goto-char (point-min)) (search-forward "(package-initialize)" nil 'noerror))) (with-temp-buffer -- 2.39.2