Changeset 6653
- Timestamp:
- Jun 3, 2007, 2:49:19 AM (17 years ago)
- File:
-
- 1 edited
-
branches/ide-1.0/ccl/hemlock/src/buffer.lisp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/ide-1.0/ccl/hemlock/src/buffer.lisp
r2097 r6653 325 325 (buffer-point *current-buffer*)) 326 326 327 (defun current-point-for-insertion () 328 "Check to see if the current buffer can be modified at its 329 current point; error if not. If there's a selection in the 330 current buffer, delete it. Return the current point." 331 (let* ((buffer *current-buffer*) 332 (point (buffer-point buffer))) 333 (check-buffer-modification buffer point) 334 (let* ((region (%buffer-current-region buffer))) 335 (when region 336 (delete-region region)) 337 point))) 338 339 (defun current-point-for-deletion () 340 "Check to see if the current buffer can be modified at its 341 current point; error if not. If there's a selection in the 342 current buffer, delete it and return NIL, else return the 343 current point." 344 (let* ((buffer *current-buffer*) 345 (point (buffer-point buffer))) 346 (check-buffer-modification buffer point) 347 (let* ((region (%buffer-current-region buffer))) 348 (if region 349 (progn 350 (delete-region region) 351 nil) 352 point)))) 353 354 (defun current-point-unless-selection () 355 "Check to see if the current buffer can be modified at its 356 current point; error if not. If there's a selection in the 357 current buffer, return NIL, else return the current point." 358 (let* ((buffer *current-buffer*) 359 (point (buffer-point buffer))) 360 (check-buffer-modification buffer point) 361 (let* ((region (%buffer-current-region buffer))) 362 (unless region 363 point)))) 364 327 365 ;;; %SET-CURRENT-BUFFER -- Internal 328 366 ;;;
Note:
See TracChangeset
for help on using the changeset viewer.
