diff options
author | Phil Sainty <psainty@orcon.net.nz> | 2015-09-08 02:15:53 +1200 |
---|---|---|
committer | Artur Malabarba <bruce.connor.am@gmail.com> | 2015-09-09 12:12:30 +0100 |
commit | b074436925a0fe8329ef86d0a36238f5c593888c (patch) | |
tree | 01a2aec548b937b20dfa0833f26f199f1ac629f1 /lisp/emacs-lisp | |
parent | b6c8cb57fc23f46d431ffc372abff9d8b2ed486c (diff) | |
download | emacs-b074436925a0fe8329ef86d0a36238f5c593888c.tar.gz emacs-b074436925a0fe8329ef86d0a36238f5c593888c.tar.bz2 emacs-b074436925a0fe8329ef86d0a36238f5c593888c.zip |
* 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.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/package.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index b0d2ff96629..eb66e8f25a3 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -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)) |