(re (concat "\\(?:\\`\\|[\\/]\\)" (regexp-quote file)
"\\(\\.\\|\\'\\)")))
(while (and lh (null lh-entry))
- (if (and (caar lh) (string-match re (caar lh)))
+ (if (and (stringp (caar lh)) (string-match re (caar lh)))
(setq lh-entry (car lh))
(setq lh (cdr lh)))))
(unless lh-entry (error "Unknown library `%s'" file)))
(let* ((history (delq nil
(mapcar (lambda (x)
(let ((f (car x)))
- (and f (file-name-sans-extension f))))
+ (and (stringp f)
+ (file-name-sans-extension f))))
load-history)))
(dir (file-truename dir))
;; List all files that have already been loaded.
(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)
(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)))
(let ((provides (file-provides file))
(dependents nil))
(dolist (x load-history dependents)
- (when (file-set-intersect provides (file-requires (car x)))
+ (when (and (stringp (car x))
+ (file-set-intersect provides (file-requires (car x))))
(push (car x) dependents)))))
(defun read-feature (prompt &optional loaded-p)