diff options
author | Eli Zaretskii <eliz@gnu.org> | 2019-03-01 11:44:52 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2019-03-01 11:44:52 +0200 |
commit | 8eb94161b3419f3dd345871928ea37d986791963 (patch) | |
tree | 0f0d5f78d2e90d413bc7d92de49cce6b80892d4c /lisp/help-fns.el | |
parent | cb95d771a230716562b359c6a49e8ae1b822af14 (diff) | |
download | emacs-8eb94161b3419f3dd345871928ea37d986791963.tar.gz |
Be more defensive regarding elements of 'load-history'
* lisp/loadhist.el (file-dependents):
* lisp/apropos.el (apropos-library):
* lisp/help-fns.el (help-fns--autoloaded-p, help--loaded-p):
* lisp/emacs-lisp/package.el (package--list-loaded-files):
Don't assume 'load-history' elements must have a string as their
'car'. (Bug#34462)
Diffstat (limited to 'lisp/help-fns.el')
-rw-r--r-- | lisp/help-fns.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/help-fns.el b/lisp/help-fns.el index b4e93d36d4c..06b4ec8c209 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -76,7 +76,7 @@ The functions will receive the function name as argument.") (let* ((re (load-history-regexp file)) (done nil)) (dolist (x load-history) - (and (car x) (string-match-p re (car x)) (setq done t))) + (and (stringp (car x)) (string-match-p re (car x)) (setq done t))) done))) (defun help--load-prefixes (prefixes) @@ -521,7 +521,7 @@ FILE is the file where FUNCTION was probably defined." (target (cons t function)) found) (while (and load-hist (not found)) - (and (caar load-hist) + (and (stringp (caar load-hist)) (equal (file-name-sans-extension (caar load-hist)) file) (setq found (member target (cdar load-hist)))) (setq load-hist (cdr load-hist))) |