change api to MAKE-SELECT-LIST
This commit is contained in:
parent
026c86a317
commit
5e8bdf3229
|
@ -10,9 +10,12 @@
|
||||||
(lambda (r)
|
(lambda (r)
|
||||||
`(element ,(element-marked? r) ,(element-text r))))
|
`(element ,(element-marked? r) ,(element-text r))))
|
||||||
|
|
||||||
(define (make-unmarked-element markable? value text)
|
(define (make-unmarked-element value markable? text)
|
||||||
(make-element markable? #f value text))
|
(make-element markable? #f value text))
|
||||||
|
|
||||||
|
(define (make-marked-element value markable? text)
|
||||||
|
(make-element markable? #t value text))
|
||||||
|
|
||||||
(define-record-type select-list :select-list
|
(define-record-type select-list :select-list
|
||||||
(really-make-select-list elements view-index cursor-index num-lines)
|
(really-make-select-list elements view-index cursor-index num-lines)
|
||||||
select-list?
|
select-list?
|
||||||
|
@ -27,12 +30,10 @@
|
||||||
(view-index ,(select-list-view-index r))
|
(view-index ,(select-list-view-index r))
|
||||||
(num-lines ,(select-list-num-lines r)))))
|
(num-lines ,(select-list-num-lines r)))))
|
||||||
|
|
||||||
(define (make-select-list value/markable/text-tuples num-lines)
|
(define (make-select-list elements num-lines)
|
||||||
(really-make-select-list
|
(if (and (proper-list? elements) (every element? elements))
|
||||||
(map (lambda (value/markable/text)
|
(really-make-select-list elements 0 0 num-lines)
|
||||||
(apply make-unmarked-element value/markable/text))
|
(error "wrong argument type" elements)))
|
||||||
value/markable/text-tuples)
|
|
||||||
0 0 num-lines))
|
|
||||||
|
|
||||||
(define key-m 109)
|
(define key-m 109)
|
||||||
|
|
||||||
|
@ -63,6 +64,7 @@
|
||||||
(let ((el (car element.i))
|
(let ((el (car element.i))
|
||||||
(i (cadr element.i)))
|
(i (cadr element.i)))
|
||||||
(cons (make-element
|
(cons (make-element
|
||||||
|
(element-markable? el)
|
||||||
(if (and (element-markable? el)
|
(if (and (element-markable? el)
|
||||||
(= index i))
|
(= index i))
|
||||||
mark
|
mark
|
||||||
|
|
Loading…
Reference in New Issue