aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtur Malabarba2015-01-13 00:03:59 -0200
committerArtur Malabarba2015-01-16 22:19:17 -0200
commit64fd1a5a59cfce55b0f91bdd68e13807fd52d03a (patch)
treea1f60f989a0840f8173259613523729441fa477c
parentbc2f8d064bad4da0325a09179b420f75c941ffd9 (diff)
downloademacs-64fd1a5a59cfce55b0f91bdd68e13807fd52d03a.tar.gz
emacs-64fd1a5a59cfce55b0f91bdd68e13807fd52d03a.zip
(package-install-file): Install packages from directory.
-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 @@
6 (package-dir-info): New function. Find package information for a 6 (package-dir-info): New function. Find package information for a
7 directory. The return result is a `package-desc'. 7 directory. The return result is a `package-desc'.
8 (package-install-from-buffer): Install packages from dired buffer. 8 (package-install-from-buffer): Install packages from dired buffer.
9 (package-install-file): Install packages from directory.
9 10
102015-01-16 Jorgen Schaefer <contact@jorgenschaefer.de> 112015-01-16 Jorgen Schaefer <contact@jorgenschaefer.de>
11 12
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."
1368The file can either be a tar file or an Emacs Lisp file." 1368The file can either be a tar file or an Emacs Lisp file."
1369 (interactive "fPackage file name: ") 1369 (interactive "fPackage file name: ")
1370 (with-temp-buffer 1370 (with-temp-buffer
1371 (insert-file-contents-literally file) 1371 (if (file-directory-p file)
1372 (when (string-match "\\.tar\\'" file) (tar-mode)) 1372 (progn
1373 (setq default-directory file)
1374 (dired-mode))
1375 (insert-file-contents-literally file)
1376 (when (string-match "\\.tar\\'" file) (tar-mode)))
1373 (package-install-from-buffer))) 1377 (package-install-from-buffer)))
1374 1378
1375(defun package-delete (pkg-desc) 1379(defun package-delete (pkg-desc)