summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/package-x.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2013-06-20 23:08:47 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2013-06-20 23:08:47 -0400
commitfd846ab406e00ac85b6ed01a6715e795a549c02f (patch)
tree4134d89eb45a3a63fce8902d7d07f1f5ffd49e34 /lisp/emacs-lisp/package-x.el
parentd1f7f5a0d927a5a51c989fcf97688e57916bf9d9 (diff)
downloademacs-fd846ab406e00ac85b6ed01a6715e795a549c02f.tar.gz
* lisp/emacs-lisp/package.el: Use tar-mode rather than tar executable.
Consolidate the single-file vs tarball code. (package-desc-suffix): New function. (package-desc-full-name): Don't bother inlining it. (package-load-descriptor): Return the new package-desc. (package-mark-obsolete): Remove unused arg `package'. (package-unpack): Make it work for single files as well. Make it update package-alist. (package--make-autoloads-and-stuff): Rename from package--make-autoloads-and-compile. Don't compile any more. (package--compile): New function. (package-generate-description-file): New function, extracted from package-unpack-single. (package-unpack-single): Remove. (package--with-work-buffer): Add indentation and debugging info. (package-download-single): Remove. (package-install-from-archive): Rename from package-download-tar, make it take a pkg-desc, and make it work for single files as well. (package-download-transaction): Simplify. (package-tar-file-info): Remove `file' arg. Rewrite not to use an external tar program. (package-install-from-buffer): Remove `pkg-desc' argument. Use package-tar-file-info for tar-mode buffers. (package-install-file): Simplify accordingly. (package-archive-base): Change to take a pkg-desc. * lisp/tar-mode.el (tar--check-descriptor): New function, extracted from tar-get-descriptor. (tar-get-descriptor): Use it. (tar-get-file-descriptor): New function. (tar--extract): New function, extracted from tar-extract. (tar--extract): Use it. * lisp/emacs-lisp/package-x.el (package-upload-file): Decode the file, in case the summary uses non-ascii. Adjust to new calling convention of package-tar-file-info.
Diffstat (limited to 'lisp/emacs-lisp/package-x.el')
-rw-r--r--lisp/emacs-lisp/package-x.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/package-x.el b/lisp/emacs-lisp/package-x.el
index 3300e89ec1e..7d0d75f7cee 100644
--- a/lisp/emacs-lisp/package-x.el
+++ b/lisp/emacs-lisp/package-x.el
@@ -291,10 +291,11 @@ If `package-archive-upload-base' does not specify a valid upload
destination, prompt for one."
(interactive "fPackage file name: ")
(with-temp-buffer
- (insert-file-contents-literally file)
+ (insert-file-contents file)
(let ((pkg-desc
(cond
- ((string-match "\\.tar\\'" file) (package-tar-file-info file))
+ ((string-match "\\.tar\\'" file)
+ (tar-mode) (package-tar-file-info))
((string-match "\\.el\\'" file) (package-buffer-info))
(t (error "Unrecognized extension `%s'"
(file-name-extension file))))))