1 |
;;; gap-buffer.scm --- String buffer that supports point |
;;; gap-buffer.scm --- String buffer that supports point |
2 |
|
|
3 |
;;; Copyright (C) 2002 Free Software Foundation, Inc. |
;;; Copyright (C) 2002, 2003 Free Software Foundation, Inc. |
4 |
;;; |
;;; |
5 |
;; This library is free software; you can redistribute it and/or |
;; This library is free software; you can redistribute it and/or |
6 |
;; modify it under the terms of the GNU Lesser General Public |
;; modify it under the terms of the GNU Lesser General Public |
215 |
(aft-ofs! gb (all-sz: gb))) |
(aft-ofs! gb (all-sz: gb))) |
216 |
|
|
217 |
(define (point++n! gb n s gap-ofs aft-ofs) ; n>0; warning: reckless |
(define (point++n! gb n s gap-ofs aft-ofs) ; n>0; warning: reckless |
218 |
(substring-move-left! s aft-ofs (+ aft-ofs n) s gap-ofs) |
(substring-move! s aft-ofs (+ aft-ofs n) s gap-ofs) |
219 |
(gap-ofs! gb (+ gap-ofs n)) |
(gap-ofs! gb (+ gap-ofs n)) |
220 |
(aft-ofs! gb (+ aft-ofs n))) |
(aft-ofs! gb (+ aft-ofs n))) |
221 |
|
|
222 |
(define (point+-n! gb n s gap-ofs aft-ofs) ; n<0; warning: reckless |
(define (point+-n! gb n s gap-ofs aft-ofs) ; n<0; warning: reckless |
223 |
(substring-move-right! s (+ gap-ofs n) gap-ofs s (+ aft-ofs n)) |
(substring-move! s (+ gap-ofs n) gap-ofs s (+ aft-ofs n)) |
224 |
(gap-ofs! gb (+ gap-ofs n)) |
(gap-ofs! gb (+ gap-ofs n)) |
225 |
(aft-ofs! gb (+ aft-ofs n))) |
(aft-ofs! gb (+ aft-ofs n))) |
226 |
|
|