core:select actions: stop at first match, do not collect all matching actions
This commit is contained in:
parent
974937cba7
commit
487279bc1b
1 changed files with 6 additions and 5 deletions
|
@ -31,13 +31,14 @@
|
||||||
acts))
|
acts))
|
||||||
|
|
||||||
(defun select (msg acts)
|
(defun select (msg acts)
|
||||||
(let ((h (shape:head msg))
|
(let ((h (shape:head msg)))
|
||||||
(hdlrs nil))
|
;(hdlrs nil))
|
||||||
(dolist (a acts)
|
(dolist (a acts)
|
||||||
(if (match (pattern a) h)
|
(when (match (pattern a) h)
|
||||||
(dolist (hdlr (handlers a))
|
(return-from select (handlers a))))))
|
||||||
|
#| (dolist (hdlr (handlers a))
|
||||||
(push hdlr hdlrs))))
|
(push hdlr hdlrs))))
|
||||||
hdlrs))
|
hdlrs))|#
|
||||||
;(nreverse hdlrs)))
|
;(nreverse hdlrs)))
|
||||||
|
|
||||||
(defun match (pat h)
|
(defun match (pat h)
|
||||||
|
|
Loading…
Add table
Reference in a new issue