summaryrefslogtreecommitdiff
path: root/lisp/loadhist.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/loadhist.el')
-rw-r--r--lisp/loadhist.el17
1 files changed, 9 insertions, 8 deletions
diff --git a/lisp/loadhist.el b/lisp/loadhist.el
index a60d6b29095..0b12bdad058 100644
--- a/lisp/loadhist.el
+++ b/lisp/loadhist.el
@@ -1,4 +1,4 @@
-;;; loadhist.el --- lisp functions for working with feature groups
+;;; loadhist.el --- lisp functions for working with feature groups -*- lexical-binding: t -*-
;; Copyright (C) 1995, 1998, 2000-2021 Free Software Foundation, Inc.
@@ -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