summaryrefslogtreecommitdiff
path: root/lisp/doc-view.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/doc-view.el')
-rw-r--r--lisp/doc-view.el13
1 files changed, 7 insertions, 6 deletions
diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index cef09009d95..0ae22934b2c 100644
--- a/lisp/doc-view.el
+++ b/lisp/doc-view.el
@@ -1802,11 +1802,6 @@ If BACKWARD is non-nil, jump to the previous match."
(remove-overlays (point-min) (point-max) 'doc-view t)
(if (consp image-mode-winprops-alist) (setq image-mode-winprops-alist nil)))
-(defun doc-view-intersection (l1 l2)
- (let ((l ()))
- (dolist (x l1) (if (memq x l2) (push x l)))
- l))
-
(defun doc-view-set-doc-type ()
"Figure out the current document type (`doc-view-doc-type')."
(let ((name-types
@@ -1841,7 +1836,7 @@ If BACKWARD is non-nil, jump to the previous match."
((looking-at "AT&TFORM") '(djvu))))))
(setq-local
doc-view-doc-type
- (car (or (doc-view-intersection name-types content-types)
+ (car (or (nreverse (seq-intersection name-types content-types #'eq))
(when (and name-types content-types)
(error "Conflicting types: name says %s but content says %s"
name-types content-types))
@@ -2146,6 +2141,12 @@ See the command `doc-view-mode' for more information on this mode."
(add-hook 'bookmark-after-jump-hook show-fn-sym)
(bookmark-default-handler bmk)))
+;; Obsolete.
+
+(defun doc-view-intersection (l1 l2)
+ (declare (obsolete seq-intersection "28.1"))
+ (nreverse (seq-intersection l1 l2 #'eq)))
+
(provide 'doc-view)
;; Local Variables: