Mercurial > emacs
comparison lisp/emulation/cua-rect.el @ 46180:fe05a48a78e1
(cua--rectangle-operation): Don't call
FCT if current column is outside rectangle.
(cua--delete-rectangle): Do nothing if zero width or out of bounds.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Thu, 04 Jul 2002 22:20:26 +0000 |
parents | 3ddab99699f4 |
children | 0d8b17d428b5 |
comparison
equal
deleted
inserted
replaced
46179:6e82e521d3ab | 46180:fe05a48a78e1 |
---|---|
573 (backward-char 1)) | 573 (backward-char 1)) |
574 (if (and tabpad (not pad) (looking-at "\t")) | 574 (if (and tabpad (not pad) (looking-at "\t")) |
575 (forward-char 1)) | 575 (forward-char 1)) |
576 (set-marker m (point)) | 576 (set-marker m (point)) |
577 (move-to-column l pad) | 577 (move-to-column l pad) |
578 (if fct | 578 (if (and fct (>= (current-column) l) (<= (current-column) r)) |
579 (let ((v t) (p (point))) | 579 (let ((v t) (p (point))) |
580 (when sel | 580 (when sel |
581 (if (car (cdr sel)) | 581 (if (car (cdr sel)) |
582 (setq v (looking-at (car sel))) | 582 (setq v (looking-at (car sel))) |
583 (setq v (re-search-forward (car sel) m t)) | 583 (setq v (re-search-forward (car sel) m t)) |
612 (cua--rectangle-operation nil nil t t))) | 612 (cua--rectangle-operation nil nil t t))) |
613 | 613 |
614 (defun cua--delete-rectangle () | 614 (defun cua--delete-rectangle () |
615 (cua--rectangle-operation nil nil t 2 | 615 (cua--rectangle-operation nil nil t 2 |
616 '(lambda (s e l r) | 616 '(lambda (s e l r) |
617 (delete-region s (if (> e s) e (1+ e)))))) | 617 (if (and (> e s) (<= e (point-max))) |
618 (delete-region s e))))) | |
618 | 619 |
619 (defun cua--extract-rectangle () | 620 (defun cua--extract-rectangle () |
620 (let (rect) | 621 (let (rect) |
621 (cua--rectangle-operation nil nil nil 1 | 622 (cua--rectangle-operation nil nil nil 1 |
622 '(lambda (s e l r) | 623 '(lambda (s e l r) |