[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r114047: * lisp/emacs-lisp/package.el (package-activ
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] trunk r114047: * lisp/emacs-lisp/package.el (package-activate-1): Don't add unnecessarily |
Date: |
Wed, 28 Aug 2013 17:57:21 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 114047
revision-id: address@hidden
parent: address@hidden
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Wed 2013-08-28 13:57:12 -0400
message:
* lisp/emacs-lisp/package.el (package-activate-1): Don't add unnecessarily
to load-path.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/emacs-lisp/package.el package.el-20100617020707-ybavz666awsxwin6-2
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-08-28 16:39:51 +0000
+++ b/lisp/ChangeLog 2013-08-28 17:57:12 +0000
@@ -1,3 +1,8 @@
+2013-08-28 Stefan Monnier <address@hidden>
+
+ * emacs-lisp/package.el (package-activate-1): Don't add unnecessarily
+ to load-path.
+
2013-08-28 Juri Linkov <address@hidden>
* isearch.el (isearch-reread-key-sequence-naturally): Use non-nil
=== modified file 'lisp/emacs-lisp/package.el'
--- a/lisp/emacs-lisp/package.el 2013-08-27 08:01:13 +0000
+++ b/lisp/emacs-lisp/package.el 2013-08-28 17:57:12 +0000
@@ -457,19 +457,26 @@
(defun package-activate-1 (pkg-desc)
(let* ((name (package-desc-name pkg-desc))
- (pkg-dir (package-desc-dir pkg-desc)))
+ (pkg-dir (package-desc-dir pkg-desc))
+ (pkg-dir-dir (file-name-as-directory pkg-dir)))
(unless pkg-dir
(error "Internal error: unable to find directory for `%s'"
(package-desc-full-name pkg-desc)))
+ ;; Add to load path, add autoloads, and activate the package.
+ (let ((old-lp load-path))
+ (load (expand-file-name (format "%s-autoloads" name) pkg-dir) nil t)
+ (when (and (eq old-lp load-path)
+ (not (or (member pkg-dir load-path)
+ (member pkg-dir-dir load-path))))
+ ;; Old packages don't add themselves to the `load-path', so we have to
+ ;; do it ourselves.
+ (push pkg-dir load-path)))
;; Add info node.
(when (file-exists-p (expand-file-name "dir" pkg-dir))
;; FIXME: not the friendliest, but simple.
(require 'info)
(info-initialize)
(push pkg-dir Info-directory-list))
- ;; Add to load path, add autoloads, and activate the package.
- (push pkg-dir load-path)
- (load (expand-file-name (format "%s-autoloads" name) pkg-dir) nil t)
(push name package-activated-list)
;; Don't return nil.
t))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r114047: * lisp/emacs-lisp/package.el (package-activate-1): Don't add unnecessarily,
Stefan Monnier <=