core:select actions: stop at first match, do not collect all matching actions

This commit is contained in:
Helmut Merz 2024-08-30 16:21:12 +02:00
parent 974937cba7
commit 487279bc1b

View file

@ -31,13 +31,14 @@
acts))
(defun select (msg acts)
(let ((h (shape:head msg))
(hdlrs nil))
(let ((h (shape:head msg)))
;(hdlrs nil))
(dolist (a acts)
(if (match (pattern a) h)
(dolist (hdlr (handlers a))
(when (match (pattern a) h)
(return-from select (handlers a))))))
#| (dolist (hdlr (handlers a))
(push hdlr hdlrs))))
hdlrs))
hdlrs))|#
;(nreverse hdlrs)))
(defun match (pat h)