summaryrefslogtreecommitdiff
path: root/lisp/htmlfontify.el
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2021-04-05 01:13:54 +0200
committerStefan Kangas <stefan@marxist.se>2021-04-05 11:14:34 +0200
commit1760029b092724271f9527543dbd9830b377704f (patch)
tree6ac67c4ee0d0a5ed2b46e67084a2bacb0a9e4081 /lisp/htmlfontify.el
parent46b8d7087c8270c92d6a3b94e811de5e3cc99701 (diff)
downloademacs-1760029b092724271f9527543dbd9830b377704f.tar.gz
emacs-1760029b092724271f9527543dbd9830b377704f.tar.bz2
emacs-1760029b092724271f9527543dbd9830b377704f.zip
Replace local intersection functions with seq-intersection
* lisp/doc-view.el (doc-view-intersection): * lisp/gnus/gnus-range.el (gnus-intersection): * lisp/htmlfontify.el (hfy-interq): * lisp/loadhist.el (file-set-intersect): * lisp/mail/smtpmail.el (smtpmail-intersection): Make obsolete in favor of seq-intersection. Update all callers. * lisp/url/url-dav.el (url-intersection): Redefine as obsolete function alias for seq-intersection. Update callers. * lisp/mpc.el (mpc-intersection, mpc-cmd-list, mpc-reorder): Use seq-intersection.
Diffstat (limited to 'lisp/htmlfontify.el')
-rw-r--r--lisp/htmlfontify.el20
1 files changed, 10 insertions, 10 deletions
diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el
index 550083d0e28..b453061388f 100644
--- a/lisp/htmlfontify.el
+++ b/lisp/htmlfontify.el
@@ -528,15 +528,6 @@ therefore no longer care about) will be invalid at any time.\n
(group xdigit xdigit)
(group xdigit xdigit)))
-(defun hfy-interq (set-a set-b)
- "Return the intersection (using `eq') of two lists SET-A and SET-B."
- (let ((sa set-a) (interq nil) (elt nil))
- (while sa
- (setq elt (car sa)
- sa (cdr sa))
- (if (memq elt set-b) (setq interq (cons elt interq))))
- interq))
-
(defun hfy-color-vals (color)
"Where COLOR is a color name or #XXXXXX style triplet, return a
list of three (16 bit) rgb values for said color.\n
@@ -884,7 +875,9 @@ See also `hfy-display-class' for details of valid values for CLASS."
(setq score 0) (ignore "t match"))
((not (cdr (assq key face-class))) ;Neither good nor bad.
nil (ignore "non match, non collision"))
- ((setq x (hfy-interq val (cdr (assq key face-class))))
+ ((setq x (nreverse
+ (seq-intersection val (cdr (assq key face-class))
+ #'eq)))
(setq score (+ score (length x)))
(ignore "intersection"))
(t ;; nope.
@@ -2352,6 +2345,13 @@ You may also want to set `hfy-page-header' and `hfy-page-footer'."
(let ((file (hfy-initfile)))
(load file 'NOERROR nil nil) ))
+;; Obsolete.
+
+(defun hfy-interq (set-a set-b)
+ "Return the intersection (using `eq') of two lists SET-A and SET-B."
+ (declare (obsolete seq-intersection "28.1"))
+ (nreverse (seq-intersection set-a set-b #'eq)))
+
(provide 'htmlfontify)
;;; htmlfontify.el ends here