1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-10 16:20:17 -08:00

Use delay-mode-hooks when visiting the init-file

* lisp/emacs-lisp/package.el (package--ensure-init-file):
delay-mode-hooks

* lisp/cus-edit.el (custom-save-all): delay-mode-hooks
This commit is contained in:
Artur Malabarba 2015-04-12 14:37:45 +01:00
parent 5fb807efcd
commit dfdd7e1944
2 changed files with 7 additions and 3 deletions

View file

@ -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)