emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 64fd1a5 4/6: (package-install-file): Install packag


From: Artur Malabarba
Subject: [Emacs-diffs] master 64fd1a5 4/6: (package-install-file): Install packages from directory.
Date: Sat, 17 Jan 2015 00:26:44 +0000

branch: master
commit 64fd1a5a59cfce55b0f91bdd68e13807fd52d03a
Author: Artur Malabarba <address@hidden>
Commit: Artur Malabarba <address@hidden>

    (package-install-file): Install packages from directory.
---
 lisp/ChangeLog             |    1 +
 lisp/emacs-lisp/package.el |    8 ++++++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 13a8722..b69df34 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  <address@hidden>
 
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 78138e9..f585c0b 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]