diff options
Diffstat (limited to 'lisp/loadhist.el')
-rw-r--r-- | lisp/loadhist.el | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lisp/loadhist.el b/lisp/loadhist.el index a60d6b29095..59c002d3078 100644 --- a/lisp/loadhist.el +++ b/lisp/loadhist.el @@ -82,12 +82,6 @@ A library name is equivalent to the file name that `load-library' would load." (when (eq (car-safe x) 'require) (push (cdr x) requires))))) -(defsubst file-set-intersect (p q) - "Return the set intersection of two lists." - (let (ret) - (dolist (x p ret) - (when (memq x q) (push x ret))))) - (defun file-dependents (file) "Return the list of loaded libraries that depend on FILE. This can include FILE itself. @@ -97,7 +91,7 @@ A library name is equivalent to the file name that `load-library' would load." (dependents nil)) (dolist (x load-history dependents) (when (and (stringp (car x)) - (file-set-intersect provides (file-requires (car x)))) + (seq-intersection provides (file-requires (car x)) #'eq)) (push (car x) dependents))))) (defun read-feature (prompt &optional loaded-p) @@ -322,6 +316,13 @@ something strange, such as redefining an Emacs function." ;; Don't return load-history, it is not useful. nil) +;; Obsolete. + +(defsubst file-set-intersect (p q) + "Return the set intersection of two lists." + (declare (obsolete seq-intersection "28.1")) + (nreverse (seq-intersection p q #'eq))) + (provide 'loadhist) ;;; loadhist.el ends here |