summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/package.el
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2015-01-20 22:20:22 -0200
committerArtur Malabarba <bruce.connor.am@gmail.com>2015-01-20 22:21:23 -0200
commit9a895795e862f8082d0ea00cb33f4ca36b7d8196 (patch)
tree3f7668c7e402bb16b0c103a4c3ce70489ef7158a /lisp/emacs-lisp/package.el
parent0dd19ac82662c5710e73852f438fd55e1d9225b7 (diff)
downloademacs-9a895795e862f8082d0ea00cb33f4ca36b7d8196.tar.gz
emacs-9a895795e862f8082d0ea00cb33f4ca36b7d8196.tar.bz2
emacs-9a895795e862f8082d0ea00cb33f4ca36b7d8196.zip
emacs-lisp/package.el (package-dir-info): Fix `while' logic.
Diffstat (limited to 'lisp/emacs-lisp/package.el')
-rw-r--r--lisp/emacs-lisp/package.el11
1 files changed, 8 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 0f094b556ba..88fc950ee21 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -1316,9 +1316,14 @@ The return result is a `package-desc'."
(while files
(with-temp-buffer
(insert-file-contents (pop files))
- (if (setq info (ignore-errors (package-buffer-info)))
- (setq files nil)
- (setf (package-desc-kind info) 'dir))))))))
+ ;; When we find the file with the data,
+ (when (setq info (ignore-errors (package-buffer-info)))
+ ;; stop looping,
+ (setq files nil)
+ ;; set the 'dir kind,
+ (setf (package-desc-kind info) 'dir))))
+ ;; and return the info.
+ info))))
(defun package--read-pkg-desc (kind)
"Read a `define-package' form in current buffer.