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)) | ||||
| 
 | ||||
| (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) | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue