summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/generic.el7
-rw-r--r--lisp/emacs-lisp/package.el37
2 files changed, 23 insertions, 21 deletions
diff --git a/lisp/emacs-lisp/generic.el b/lisp/emacs-lisp/generic.el
index cb86a554335..3eb64f9f7f0 100644
--- a/lisp/emacs-lisp/generic.el
+++ b/lisp/emacs-lisp/generic.el
@@ -44,11 +44,8 @@
;; end at the end of the line.) Emacs does not support comment
;; strings of more than two characters in length.
;;
-;; * List of keywords to font-lock. Each keyword should be a string.
-;; If you have additional keywords which should be highlighted in a
-;; face different from `font-lock-keyword-face', you can use the
-;; convenience function `generic-make-keywords-list' (which see),
-;; and add the result to the following list:
+;; * List of keywords to font-lock in `font-lock-keyword-face'.
+;; Each keyword should be a string.
;;
;; * Additional expressions to font-lock. This should be a list of
;; expressions, each of which should be of the same form as those in
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.