Commit f83483ff authored by Juanma Barranquero's avatar Juanma Barranquero

* cua-base.el, cua-gmrk.el: Fix use of `filter-buffer-substring'.

parent 06304e03
2010-05-07 Juanma Barranquero <lekktu@gmail.com>
Fix use of `filter-buffer-substring' (4th arg NOPROPS removed).
* emulation/cua-base.el (cua-repeat-replace-region):
* emulation/cua-gmrk.el (cua-copy-region-to-global-mark)
(cua-cut-region-to-global-mark):
Remove text properties with `set-text-properties'.
2010-05-06 Michael Albinus <michael.albinus@gmx.de>
* net/tramp.el (top, with-progress-reporter): Use
......
......@@ -1040,7 +1040,9 @@ of text."
(setq s (car u) e (cdr u)))))))
(cond ((and s e (<= s e) (= s (mark t)))
(setq cua--repeat-replace-text
(filter-buffer-substring s e nil t)))
(filter-buffer-substring s e))
(set-text-properties 0 (length cua--repeat-replace-text)
nil cua--repeat-replace-text))
((and (null s) (eq u elt)) ;; nothing inserted
(setq cua--repeat-replace-text
""))
......
......@@ -137,8 +137,9 @@ With prefix argument, don't jump to global mark when cancelling it."
(let ((src-buf (current-buffer)))
(save-excursion
(if (equal (marker-buffer cua--global-mark-marker) src-buf)
(let ((text (filter-buffer-substring start end nil t)))
(let ((text (filter-buffer-substring 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))
......@@ -161,10 +162,11 @@ With prefix argument, don't jump to global mark when cancelling it."
(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 nil t))
(let ((text (filter-buffer-substring 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))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment