aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Steingold2014-12-17 16:57:09 -0500
committerSam Steingold2014-12-17 16:57:09 -0500
commit92bad2aa0589d837e48af58f09134b48b32cfbb7 (patch)
tree555f2558c937260630a21f325b0843841b4871ab
parenta2c489badd31fcb25b0a34418cd4e02f4239f1a1 (diff)
downloademacs-92bad2aa0589d837e48af58f09134b48b32cfbb7.tar.gz
emacs-92bad2aa0589d837e48af58f09134b48b32cfbb7.zip
load-history may contain nil "filenames"
* lisp/emacs-lisp/package.el (package--list-loaded-files): Handle `(nil ...)' elements in `load-history'.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/emacs-lisp/package.el9
2 files changed, 11 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index a5672e52bdb..87c39447d0c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12014-12-17 Sam Steingold <sds@gnu.org>
2
3 * emacs-lisp/package.el (package--list-loaded-files): Handle
4 `(nil ...)' elements in `load-history'.
5
12014-12-17 Teodor Zlatanov <tzz@lifelogs.com> 62014-12-17 Teodor Zlatanov <tzz@lifelogs.com>
2 7
3 * net/tramp-sh.el (tramp-histfile-override): New variable. 8 * net/tramp-sh.el (tramp-histfile-override): New variable.
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 60beebd8a5f..199eac5cf6c 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."
559 "Recursively list all files in DIR which correspond to loaded features. 559 "Recursively list all files in DIR which correspond to loaded features.
560Returns the `file-name-sans-extension' of each file, relative to 560Returns the `file-name-sans-extension' of each file, relative to
561DIR, sorted by most recently loaded last." 561DIR, sorted by most recently loaded last."
562 (let* ((history (mapcar (lambda (x) (file-name-sans-extension (car x))) 562 (let* ((history (delq nil
563 load-history)) 563 (mapcar (lambda (x)
564 (let ((f (car x)))
565 (and f (file-name-sans-extension f))))
566 load-history)))
564 (dir (file-truename dir)) 567 (dir (file-truename dir))
565 ;; List all files that have already been loaded. 568 ;; List all files that have already been loaded.
566 (list-of-conflicts 569 (list-of-conflicts
567 (remove 570 (delq
568 nil 571 nil
569 (mapcar 572 (mapcar
570 (lambda (x) (let* ((file (file-relative-name x dir)) 573 (lambda (x) (let* ((file (file-relative-name x dir))