summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorPhil Sainty <psainty@orcon.net.nz>2015-09-08 02:15:53 +1200
committerArtur Malabarba <bruce.connor.am@gmail.com>2015-09-09 12:12:30 +0100
commitb074436925a0fe8329ef86d0a36238f5c593888c (patch)
tree01a2aec548b937b20dfa0833f26f199f1ac629f1 /lisp/emacs-lisp
parentb6c8cb57fc23f46d431ffc372abff9d8b2ed486c (diff)
downloademacs-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.el4
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))