From 9a895795e862f8082d0ea00cb33f4ca36b7d8196 Mon Sep 17 00:00:00 2001 From: Artur Malabarba Date: Tue, 20 Jan 2015 22:20:22 -0200 Subject: emacs-lisp/package.el (package-dir-info): Fix `while' logic. --- lisp/emacs-lisp/package.el | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'lisp/emacs-lisp') 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. -- cgit v1.2.3