1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-05 11:45:45 +00:00

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

This commit is contained in:
Juanma Barranquero 2010-05-07 02:46:09 +02:00
parent 06304e031f
commit f83483ff69
3 changed files with 15 additions and 3 deletions

View File

@ -1,3 +1,11 @@
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

View File

@ -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
""))

View File

@ -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))