diff options
| -rw-r--r-- | lisp/emacs-lisp/package.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 6fb5ba45468..f3333751606 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el | |||
| @@ -1781,7 +1781,9 @@ using `package-compute-transaction'." | |||
| 1781 | (contains-init | 1781 | (contains-init |
| 1782 | (if buffer | 1782 | (if buffer |
| 1783 | (with-current-buffer buffer | 1783 | (with-current-buffer buffer |
| 1784 | (search-forward "(package-initialize)" nil 'noerror)) | 1784 | (save-excursion |
| 1785 | (goto-char (point-min)) | ||
| 1786 | (search-forward "(package-initialize)" nil 'noerror))) | ||
| 1785 | (with-temp-buffer | 1787 | (with-temp-buffer |
| 1786 | (insert-file-contents user-init-file) | 1788 | (insert-file-contents user-init-file) |
| 1787 | (goto-char (point-min)) | 1789 | (goto-char (point-min)) |