# HG changeset patch # User Kim F. Storm # Date 1025821226 0 # Node ID fe05a48a78e1a4783428fc08dde13ecdd216d0ce # Parent 6e82e521d3abd2d60acc8d0b05bc5a4c67fb3a8e (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. diff -r 6e82e521d3ab -r fe05a48a78e1 lisp/emulation/cua-rect.el --- a/lisp/emulation/cua-rect.el Thu Jul 04 22:19:57 2002 +0000 +++ b/lisp/emulation/cua-rect.el Thu Jul 04 22:20:26 2002 +0000 @@ -575,7 +575,7 @@ (forward-char 1)) (set-marker m (point)) (move-to-column l pad) - (if fct + (if (and fct (>= (current-column) l) (<= (current-column) r)) (let ((v t) (p (point))) (when sel (if (car (cdr sel)) @@ -614,7 +614,8 @@ (defun cua--delete-rectangle () (cua--rectangle-operation nil nil t 2 '(lambda (s e l r) - (delete-region s (if (> e s) e (1+ e)))))) + (if (and (> e s) (<= e (point-max))) + (delete-region s e))))) (defun cua--extract-rectangle () (let (rect)