Expose ->pos as buffer-pos

This commit is contained in:
Tony Garnock-Jones 2014-12-28 09:45:28 -05:00
parent 25d61d7ac9
commit 791ff539b5
1 changed files with 4 additions and 0 deletions

View File

@ -33,6 +33,7 @@
buffer-mark buffer-mark
buffer-mark-pos* buffer-mark-pos*
buffer-mark-pos buffer-mark-pos
buffer-pos
buffer-mark! buffer-mark!
buffer-clear-mark! buffer-clear-mark!
buffer-move-mark! buffer-move-mark!
@ -270,6 +271,9 @@
(or (buffer-mark-pos* buf mtype) (or (buffer-mark-pos* buf mtype)
(error what "Mark type ~v not found; available mark types ~v" mtype (buffer-mark-types buf)))) (error what "Mark type ~v not found; available mark types ~v" mtype (buffer-mark-types buf))))
(define (buffer-pos buf pos-or-mtype)
(->pos buf pos-or-mtype 'buffer-pos))
(define (buffer-mark! buf mtype pos-or-mtype #:value [value #t]) (define (buffer-mark! buf mtype pos-or-mtype #:value [value #t])
(buffer-lift replace-mark buf mtype (->pos buf pos-or-mtype 'buffer-mark!) value)) (buffer-lift replace-mark buf mtype (->pos buf pos-or-mtype 'buffer-mark!) value))