Fix doom/help-search-loaded-files

Would throw a string type error because load-history doesn't only
contain sublists whose CARs are strings.
This commit is contained in:
Henrik Lissner
2020-05-19 17:33:57 -04:00
parent 265e80123a
commit 92b98bed11

View File

@@ -660,8 +660,9 @@ Uses the symbol at point or the current selection, if available."
Uses the symbol at point or the current selection, if available." Uses the symbol at point or the current selection, if available."
(interactive (interactive
(list (doom--help-search-prompt "Search loaded files: "))) (list (doom--help-search-prompt "Search loaded files: ")))
(let ((paths (cl-loop for (file . _) in load-history (doom--help-search
for filebase = (file-name-sans-extension file) (cl-loop for (file . _) in (cl-remove-if-not #'stringp load-history :key #'car)
if (file-exists-p! (format "%s.el" filebase)) for filebase = (file-name-sans-extension file)
collect it))) if (file-exists-p! (format "%s.el" filebase))
(doom--help-search paths query "Search loaded files: "))) collect it)
query "Search loaded files: "))