summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/package.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index ded2faa54f6..bdb2cc03495 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -1778,7 +1778,9 @@ using `package-compute-transaction'."
(goto-char (point-min))
(search-forward "(package-initialize)" nil 'noerror)))))
(unless contains-init
- (with-current-buffer (or buffer (find-file-noselect user-init-file))
+ (with-current-buffer (or buffer
+ (let ((delay-mode-hooks t))
+ (find-file-noselect user-init-file)))
(save-excursion
(save-restriction
(widen)