diff options
| author | Sam Steingold | 2014-12-17 16:57:09 -0500 |
|---|---|---|
| committer | Sam Steingold | 2014-12-17 16:57:09 -0500 |
| commit | 92bad2aa0589d837e48af58f09134b48b32cfbb7 (patch) | |
| tree | 555f2558c937260630a21f325b0843841b4871ab | |
| parent | a2c489badd31fcb25b0a34418cd4e02f4239f1a1 (diff) | |
| download | emacs-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/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/emacs-lisp/package.el | 9 |
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 @@ | |||
| 1 | 2014-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 | |||
| 1 | 2014-12-17 Teodor Zlatanov <tzz@lifelogs.com> | 6 | 2014-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. |
| 560 | Returns the `file-name-sans-extension' of each file, relative to | 560 | Returns the `file-name-sans-extension' of each file, relative to |
| 561 | DIR, sorted by most recently loaded last." | 561 | DIR, 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)) |