emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 92bad2a: load-history may contain nil "filenames"


From: Sam Steingold
Subject: [Emacs-diffs] master 92bad2a: load-history may contain nil "filenames"
Date: Wed, 17 Dec 2014 22:01:03 +0000

branch: master
commit 92bad2aa0589d837e48af58f09134b48b32cfbb7
Author: Sam Steingold <address@hidden>
Commit: Sam Steingold <address@hidden>

    load-history may contain nil "filenames"
    
    * lisp/emacs-lisp/package.el (package--list-loaded-files): Handle
    `(nil ...)' elements in `load-history'.
---
 lisp/ChangeLog             |    5 +++++
 lisp/emacs-lisp/package.el |    9 ++++++---
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index a5672e5..87c3944 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2014-12-17  Sam Steingold  <address@hidden>
+
+       * emacs-lisp/package.el (package--list-loaded-files): Handle
+       `(nil ...)' elements in `load-history'.
+
 2014-12-17  Teodor Zlatanov  <address@hidden>
 
        * net/tramp-sh.el (tramp-histfile-override): New variable.
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 60beebd..199eac5 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -559,12 +559,15 @@ Return the max version (as a string) if the package is 
held at a lower version."
   "Recursively list all files in DIR which correspond to loaded features.
 Returns the `file-name-sans-extension' of each file, relative to
 DIR, sorted by most recently loaded last."
-  (let* ((history (mapcar (lambda (x) (file-name-sans-extension (car x)))
-                    load-history))
+  (let* ((history (delq nil
+                        (mapcar (lambda (x)
+                                  (let ((f (car x)))
+                                    (and f (file-name-sans-extension f))))
+                                load-history)))
          (dir (file-truename dir))
          ;; List all files that have already been loaded.
          (list-of-conflicts
-          (remove
+          (delq
            nil
            (mapcar
                (lambda (x) (let* ((file (file-relative-name x dir))



reply via email to

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