summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog1
-rw-r--r--lisp/emacs-lisp/package.el8
2 files changed, 7 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 13a87225bad..b69df34e673 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -6,6 +6,7 @@
(package-dir-info): New function. Find package information for a
directory. The return result is a `package-desc'.
(package-install-from-buffer): Install packages from dired buffer.
+ (package-install-file): Install packages from directory.
2015-01-16 Jorgen Schaefer <contact@jorgenschaefer.de>
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)