diff options
author | Sam Steingold <sds@gnu.org> | 2014-12-17 16:57:09 -0500 |
---|---|---|
committer | Sam Steingold <sds@gnu.org> | 2014-12-17 16:57:09 -0500 |
commit | 92bad2aa0589d837e48af58f09134b48b32cfbb7 (patch) | |
tree | 555f2558c937260630a21f325b0843841b4871ab /lisp/emacs-lisp | |
parent | a2c489badd31fcb25b0a34418cd4e02f4239f1a1 (diff) | |
download | emacs-92bad2aa0589d837e48af58f09134b48b32cfbb7.tar.gz emacs-92bad2aa0589d837e48af58f09134b48b32cfbb7.tar.bz2 emacs-92bad2aa0589d837e48af58f09134b48b32cfbb7.zip |
load-history may contain nil "filenames"
* lisp/emacs-lisp/package.el (package--list-loaded-files): Handle
`(nil ...)' elements in `load-history'.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/package.el | 9 |
1 files changed, 6 insertions, 3 deletions
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." "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)) |