From f83483ff69287a38536a0e3b9d10d3f9d729aed2 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 7 May 2010 02:46:09 +0200 Subject: [PATCH] * cua-base.el, cua-gmrk.el: Fix use of `filter-buffer-substring'. --- lisp/ChangeLog | 8 ++++++++ lisp/emulation/cua-base.el | 4 +++- lisp/emulation/cua-gmrk.el | 6 ++++-- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5c7db67dfc3..4b3852bc3d5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2010-05-07 Juanma Barranquero + + 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 * net/tramp.el (top, with-progress-reporter): Use diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el index 39d3ff785ce..d8b36adf730 100644 --- a/lisp/emulation/cua-base.el +++ b/lisp/emulation/cua-base.el @@ -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 "")) diff --git a/lisp/emulation/cua-gmrk.el b/lisp/emulation/cua-gmrk.el index 6cb8bfe6e1c..6c69800d73c 100644 --- a/lisp/emulation/cua-gmrk.el +++ b/lisp/emulation/cua-gmrk.el @@ -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)) -- 2.39.2