changeset 108276:41220cd25ea8

* cua-base.el, cua-gmrk.el: Fix use of `filter-buffer-substring'.
author Juanma Barranquero <lekktu@gmail.com>
date Fri, 07 May 2010 02:46:09 +0200
parents 6a5ab9099693
children 77714da1307b
files lisp/ChangeLog lisp/emulation/cua-base.el lisp/emulation/cua-gmrk.el
diffstat 3 files changed, 15 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Thu May 06 17:35:44 2010 -0700
+++ b/lisp/ChangeLog	Fri May 07 02:46:09 2010 +0200
@@ -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
--- a/lisp/emulation/cua-base.el	Thu May 06 17:35:44 2010 -0700
+++ b/lisp/emulation/cua-base.el	Fri May 07 02:46:09 2010 +0200
@@ -1040,7 +1040,9 @@
 		  (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
 		       ""))
--- a/lisp/emulation/cua-gmrk.el	Thu May 06 17:35:44 2010 -0700
+++ b/lisp/emulation/cua-gmrk.el	Fri May 07 02:46:09 2010 +0200
@@ -137,8 +137,9 @@
       (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 @@
 	      (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))