Changeset 12894 in project


Ignore:
Timestamp:
12/27/08 20:17:38 (11 years ago)
Author:
sjamaan
Message:

Add small improvement in clients procedure

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/wmiirc/trunk/wmiirc.scm

    r12889 r12894  
    318318  (delete "sel" (9p:directory *connection* "/tag")))
    319319
    320 (define (clients . rest)
    321   (let-optionals rest ((tag #f))
    322     (let ((clients (delete "sel" (9p:directory *connection* "/client"))))
    323       (if tag
    324           (filter! (lambda (c) (member tag (client-tags c) string=?)) clients)
    325           clients))))
     320(define (clients . tags)
     321  (let ((clients (delete "sel" (9p:directory *connection* "/client"))))
     322    (if (null? tags)
     323        clients
     324        (filter! (lambda (c)
     325                   (any (lambda (x) (member x tags string=?)) (client-tags c)))
     326                 clients))))
    326327
    327328(define (write-tab bar tab contents . rest)
Note: See TracChangeset for help on using the changeset viewer.