summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/package.el
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2015-01-13 00:03:59 -0200
committerArtur Malabarba <bruce.connor.am@gmail.com>2015-01-16 22:19:17 -0200
commit64fd1a5a59cfce55b0f91bdd68e13807fd52d03a (patch)
treea1f60f989a0840f8173259613523729441fa477c /lisp/emacs-lisp/package.el
parentbc2f8d064bad4da0325a09179b420f75c941ffd9 (diff)
downloademacs-64fd1a5a59cfce55b0f91bdd68e13807fd52d03a.tar.gz
emacs-64fd1a5a59cfce55b0f91bdd68e13807fd52d03a.tar.bz2
emacs-64fd1a5a59cfce55b0f91bdd68e13807fd52d03a.zip
(package-install-file): Install packages from directory.
Diffstat (limited to 'lisp/emacs-lisp/package.el')
-rw-r--r--lisp/emacs-lisp/package.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 78138e9ebcd..f585c0be47a 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -1368,8 +1368,12 @@ Downloads and installs required packages as needed."
The file can either be a tar file or an Emacs Lisp file."
(interactive "fPackage file name: ")
(with-temp-buffer
- (insert-file-contents-literally file)
- (when (string-match "\\.tar\\'" file) (tar-mode))
+ (if (file-directory-p file)
+ (progn
+ (setq default-directory file)
+ (dired-mode))
+ (insert-file-contents-literally file)
+ (when (string-match "\\.tar\\'" file) (tar-mode)))
(package-install-from-buffer)))
(defun package-delete (pkg-desc)