* lisp/emacs-lisp/package.el (package--ensure-init-file)
More robust check for `package-initialize' calls in init file. This function accepts an optional argument, but calls passing an argument would not have been detected.
This commit is contained in:
parent
b6c8cb57fc
commit
b074436925
1 changed files with 2 additions and 2 deletions
|
@ -1852,12 +1852,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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue