]> git.eshelyaron.com Git - emacs.git/commitdiff
emacs-lisp/package.el (package-dir-info): Fix `while' logic.
authorArtur Malabarba <bruce.connor.am@gmail.com>
Wed, 21 Jan 2015 00:20:22 +0000 (22:20 -0200)
committerArtur Malabarba <bruce.connor.am@gmail.com>
Wed, 21 Jan 2015 00:21:23 +0000 (22:21 -0200)
lisp/ChangeLog
lisp/emacs-lisp/package.el

index b5824abd01fc6f016baeef434b05318b5b5ff3e5..c843bdd56f2953cd68530849ba37709cb56e700f 100644 (file)
@@ -1,3 +1,7 @@
+2015-01-20  Artur Malabarba  <bruce.connor.am@gmail.com>
+
+       * emacs-lisp/package.el (package-dir-info): Fix `while' logic.
+
 2015-01-20  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * emacs-lisp/eieio-generic.el: Remove.
index 0f094b556ba93f69aab98ccaa7da47121a7eb156..88fc950ee219c2a88b1d992e7f28f570ee185025 100644 (file)
@@ -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.