diff options
| author | Juanma Barranquero | 2010-05-07 02:46:09 +0200 |
|---|---|---|
| committer | Juanma Barranquero | 2010-05-07 02:46:09 +0200 |
| commit | f83483ff69287a38536a0e3b9d10d3f9d729aed2 (patch) | |
| tree | 8f05ea75ae1decde36381cf649d145439bfcd537 | |
| parent | 06304e031fc9b5777a8fb10d1a3e22bf1dda2922 (diff) | |
| download | emacs-f83483ff69287a38536a0e3b9d10d3f9d729aed2.tar.gz emacs-f83483ff69287a38536a0e3b9d10d3f9d729aed2.zip | |
* cua-base.el, cua-gmrk.el: Fix use of `filter-buffer-substring'.
| -rw-r--r-- | lisp/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/emulation/cua-base.el | 4 | ||||
| -rw-r--r-- | 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 @@ | |||
| 1 | 2010-05-07 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | Fix use of `filter-buffer-substring' (4th arg NOPROPS removed). | ||
| 4 | * emulation/cua-base.el (cua-repeat-replace-region): | ||
| 5 | * emulation/cua-gmrk.el (cua-copy-region-to-global-mark) | ||
| 6 | (cua-cut-region-to-global-mark): | ||
| 7 | Remove text properties with `set-text-properties'. | ||
| 8 | |||
| 1 | 2010-05-06 Michael Albinus <michael.albinus@gmx.de> | 9 | 2010-05-06 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 10 | ||
| 3 | * net/tramp.el (top, with-progress-reporter): Use | 11 | * 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." | |||
| 1040 | (setq s (car u) e (cdr u))))))) | 1040 | (setq s (car u) e (cdr u))))))) |
| 1041 | (cond ((and s e (<= s e) (= s (mark t))) | 1041 | (cond ((and s e (<= s e) (= s (mark t))) |
| 1042 | (setq cua--repeat-replace-text | 1042 | (setq cua--repeat-replace-text |
| 1043 | (filter-buffer-substring s e nil t))) | 1043 | (filter-buffer-substring s e)) |
| 1044 | (set-text-properties 0 (length cua--repeat-replace-text) | ||
| 1045 | nil cua--repeat-replace-text)) | ||
| 1044 | ((and (null s) (eq u elt)) ;; nothing inserted | 1046 | ((and (null s) (eq u elt)) ;; nothing inserted |
| 1045 | (setq cua--repeat-replace-text | 1047 | (setq cua--repeat-replace-text |
| 1046 | "")) | 1048 | "")) |
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." | |||
| 137 | (let ((src-buf (current-buffer))) | 137 | (let ((src-buf (current-buffer))) |
| 138 | (save-excursion | 138 | (save-excursion |
| 139 | (if (equal (marker-buffer cua--global-mark-marker) src-buf) | 139 | (if (equal (marker-buffer cua--global-mark-marker) src-buf) |
| 140 | (let ((text (filter-buffer-substring start end nil t))) | 140 | (let ((text (filter-buffer-substring start end))) |
| 141 | (goto-char (marker-position cua--global-mark-marker)) | 141 | (goto-char (marker-position cua--global-mark-marker)) |
| 142 | (set-text-properties 0 (length text) text) | ||
| 142 | (insert text)) | 143 | (insert text)) |
| 143 | (set-buffer (marker-buffer cua--global-mark-marker)) | 144 | (set-buffer (marker-buffer cua--global-mark-marker)) |
| 144 | (goto-char (marker-position cua--global-mark-marker)) | 145 | (goto-char (marker-position cua--global-mark-marker)) |
| @@ -161,10 +162,11 @@ With prefix argument, don't jump to global mark when cancelling it." | |||
| 161 | (if (and (< start (marker-position cua--global-mark-marker)) | 162 | (if (and (< start (marker-position cua--global-mark-marker)) |
| 162 | (< (marker-position cua--global-mark-marker) end)) | 163 | (< (marker-position cua--global-mark-marker) end)) |
| 163 | (message "Can't move region into itself") | 164 | (message "Can't move region into itself") |
| 164 | (let ((text (filter-buffer-substring start end nil t)) | 165 | (let ((text (filter-buffer-substring start end)) |
| 165 | (p1 (copy-marker start)) | 166 | (p1 (copy-marker start)) |
| 166 | (p2 (copy-marker end))) | 167 | (p2 (copy-marker end))) |
| 167 | (goto-char (marker-position cua--global-mark-marker)) | 168 | (goto-char (marker-position cua--global-mark-marker)) |
| 169 | (set-text-properties 0 (length text) text) | ||
| 168 | (insert text) | 170 | (insert text) |
| 169 | (cua--activate-global-mark) | 171 | (cua--activate-global-mark) |
| 170 | (delete-region (marker-position p1) (marker-position p2)) | 172 | (delete-region (marker-position p1) (marker-position p2)) |