From: Artur Malabarba Date: Tue, 13 Jan 2015 02:03:59 +0000 (-0200) Subject: (package-install-file): Install packages from directory. X-Git-Tag: emacs-25.0.90~2597^2~18 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=64fd1a5a59cfce55b0f91bdd68e13807fd52d03a;p=emacs.git (package-install-file): Install packages from directory. --- 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 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)