summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/package.el
diff options
context:
space:
mode:
authorKenichi Handa <handa@gnu.org>2013-06-18 23:49:59 +0900
committerKenichi Handa <handa@gnu.org>2013-06-18 23:49:59 +0900
commitde86fd6193edf3e78c9b8074f9cf475b3cc560f9 (patch)
treed58ae133163d5269d73c3ce247b663ff2cd5e8d9 /lisp/emacs-lisp/package.el
parent3c542890fe6fb88ecdca7e38c9f85e7360980110 (diff)
parent7946c240f94fb9802e89ab90d0e4c239e337f266 (diff)
downloademacs-de86fd6193edf3e78c9b8074f9cf475b3cc560f9.tar.gz
emacs-de86fd6193edf3e78c9b8074f9cf475b3cc560f9.tar.bz2
emacs-de86fd6193edf3e78c9b8074f9cf475b3cc560f9.zip
merge emacs
Diffstat (limited to 'lisp/emacs-lisp/package.el')
-rw-r--r--lisp/emacs-lisp/package.el37
1 files changed, 21 insertions, 16 deletions
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index cd7852af550..ae4ebb87ee2 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -420,10 +420,9 @@ This is, approximately, the inverse of `version-to-list'.
(with-temp-buffer
(insert-file-contents pkg-file)
(goto-char (point-min))
- (with-syntax-table emacs-lisp-mode-syntax-table
- (let ((pkg-desc (package-process-define-package
- (read (current-buffer)) pkg-file)))
- (setf (package-desc-dir pkg-desc) pkg-dir)))))))
+ (let ((pkg-desc (package-process-define-package
+ (read (current-buffer)) pkg-file)))
+ (setf (package-desc-dir pkg-desc) pkg-dir))))))
(defun package-load-all-descriptors ()
"Load descriptors for installed Emacs Lisp packages.
@@ -641,7 +640,8 @@ untar into a directory named DIR; otherwise, signal an error."
;; FIXME: should we delete PKG-DIR if it exists?
(let* ((default-directory (file-name-as-directory package-user-dir)))
(package-untar-buffer dirname)
- (package--make-autoloads-and-compile package pkg-dir))))
+ (package--make-autoloads-and-compile package pkg-dir)
+ pkg-dir)))
(defun package--make-autoloads-and-compile (name pkg-dir)
"Generate autoloads and do byte-compilation for package named NAME.
@@ -697,7 +697,8 @@ PKG-DIR is the name of the package directory."
nil
pkg-file
nil nil nil 'excl))
- (package--make-autoloads-and-compile name pkg-dir))))
+ (package--make-autoloads-and-compile name pkg-dir)
+ pkg-dir)))
(defmacro package--with-work-buffer (location file &rest body)
"Run BODY in a buffer containing the contents of FILE at LOCATION.
@@ -923,16 +924,20 @@ using `package-compute-transaction'."
(hold (cadr (assq elt package-load-list)))
(v-string (or (and (stringp hold) hold)
(package-version-join (package-desc-version desc))))
- (kind (package-desc-kind desc)))
- (cond
- ((eq kind 'tar)
- (package-download-tar elt v-string))
- ((eq kind 'single)
- (package-download-single elt v-string
- (package-desc-summary desc)
- (package-desc-reqs desc)))
- (t
- (error "Unknown package kind: %s" (symbol-name kind))))
+ (kind (package-desc-kind desc))
+ (pkg-dir
+ (cond
+ ((eq kind 'tar)
+ (package-download-tar elt v-string))
+ ((eq kind 'single)
+ (package-download-single elt v-string
+ (package-desc-summary desc)
+ (package-desc-reqs desc)))
+ (t
+ (error "Unknown package kind: %s" (symbol-name kind))))))
+ ;; Update package-alist.
+ ;; FIXME: Check that the installed package's descriptor matches `desc'!
+ (package-load-descriptor pkg-dir)
;; If package A depends on package B, then A may `require' B
;; during byte compilation. So we need to activate B before
;; unpacking A.