emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 9a89579: emacs-lisp/package.el (package-dir-info):


From: Artur Malabarba
Subject: [Emacs-diffs] master 9a89579: emacs-lisp/package.el (package-dir-info): Fix `while' logic.
Date: Wed, 21 Jan 2015 00:22:14 +0000

branch: master
commit 9a895795e862f8082d0ea00cb33f4ca36b7d8196
Author: Artur Malabarba <address@hidden>
Commit: Artur Malabarba <address@hidden>

    emacs-lisp/package.el (package-dir-info): Fix `while' logic.
---
 lisp/ChangeLog             |    4 ++++
 lisp/emacs-lisp/package.el |   11 ++++++++---
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b5824ab..c843bdd 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
+2015-01-20  Artur Malabarba  <address@hidden>
+
+       * emacs-lisp/package.el (package-dir-info): Fix `while' logic.
+
 2015-01-20  Stefan Monnier  <address@hidden>
 
        * emacs-lisp/eieio-generic.el: Remove.
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 0f094b5..88fc950 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.



reply via email to

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