Mercurial > emacs
diff lisp/emulation/cua-gmrk.el @ 108467:114b70461f96
CUA mode: Fix use of `filter-buffer-substring' (rework previous change).
* emulation/cua-base.el (cua--filter-buffer-noprops): New function.
(cua-repeat-replace-region):
* emulation/cua-rect.el (cua--extract-rectangle, cua-incr-rectangle):
* emulation/cua-gmrk.el (cua-copy-region-to-global-mark)
(cua-cut-region-to-global-mark): Use it.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Mon, 10 May 2010 16:37:59 +0200 |
parents | 41220cd25ea8 |
children | 280c8ae2476d |
line wrap: on
line diff
--- a/lisp/emulation/cua-gmrk.el Mon May 10 12:09:27 2010 +0000 +++ b/lisp/emulation/cua-gmrk.el Mon May 10 16:37:59 2010 +0200 @@ -137,9 +137,8 @@ (let ((src-buf (current-buffer))) (save-excursion (if (equal (marker-buffer cua--global-mark-marker) src-buf) - (let ((text (filter-buffer-substring start end))) + (let ((text (cua--filter-buffer-noprops start end))) (goto-char (marker-position cua--global-mark-marker)) - (set-text-properties 0 (length text) text) (insert text)) (set-buffer (marker-buffer cua--global-mark-marker)) (goto-char (marker-position cua--global-mark-marker)) @@ -162,11 +161,10 @@ (if (and (< start (marker-position cua--global-mark-marker)) (< (marker-position cua--global-mark-marker) end)) (message "Can't move region into itself") - (let ((text (filter-buffer-substring start end)) + (let ((text (cua--filter-buffer-noprops start end)) (p1 (copy-marker start)) (p2 (copy-marker end))) (goto-char (marker-position cua--global-mark-marker)) - (set-text-properties 0 (length text) text) (insert text) (cua--activate-global-mark) (delete-region (marker-position p1) (marker-position p2))