1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-31 11:13:50 +00:00

* lisp/mpc.el (mpc-intersection): Fix commit 1760029b09

This commit is contained in:
Stefan Monnier 2021-06-03 18:05:01 -04:00
parent 58de11fe13
commit e490ffcf95

View File

@ -125,14 +125,13 @@
(unless (member elem seen) (push elem res)))))
(nreverse res)))
(defun mpc-intersection (l1 l2 &optional selectfun)
(defun mpc-intersection (l1 l2 selectfun)
"Return L1 after removing all elements not found in L2.
If SELECTFUN is non-nil, elements aren't compared directly, but instead
Elements aren't compared directly, but instead
they are passed through SELECTFUN before comparison."
(when selectfun
(setq l1 (mapcar selectfun l1))
(setq l2 (mapcar selectfun l2)))
(seq-intersection l1 l2))
(seq-intersection l1 l2 (lambda (x y)
(equal (funcall selectfun x)
(funcall selectfun y)))))
(defun mpc-event-set-point (event)
(condition-case nil (posn-set-point (event-end event))