From: Sam Steingold Date: Wed, 17 Dec 2014 21:57:09 +0000 (-0500) Subject: load-history may contain nil "filenames" X-Git-Tag: emacs-25.0.90~2635^2~46 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=92bad2aa0589d837e48af58f09134b48b32cfbb7;p=emacs.git load-history may contain nil "filenames" * lisp/emacs-lisp/package.el (package--list-loaded-files): Handle `(nil ...)' elements in `load-history'. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a5672e52bdb..87c39447d0c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-12-17 Sam Steingold + + * emacs-lisp/package.el (package--list-loaded-files): Handle + `(nil ...)' elements in `load-history'. + 2014-12-17 Teodor Zlatanov * 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." "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))