diff options
| author | Kim F. Storm | 2006-04-09 23:04:07 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2006-04-09 23:04:07 +0000 |
| commit | cf2114043632d3b1979c66f7a9da99c4d1c60590 (patch) | |
| tree | 7765a6e297da0ed57180fa4ee4f45e656484c503 | |
| parent | 398c9ffba6c6bbb593929e268bdae77bdfdc1288 (diff) | |
| download | emacs-cf2114043632d3b1979c66f7a9da99c4d1c60590.tar.gz emacs-cf2114043632d3b1979c66f7a9da99c4d1c60590.zip | |
(cua-delete-region, cua-paste)
(cua-repeat-replace-region): Use filter-buffer-substring.
| -rw-r--r-- | lisp/emulation/cua-base.el | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el index e7888dbdb0e..2d169e889cd 100644 --- a/lisp/emulation/cua-base.el +++ b/lisp/emulation/cua-base.el | |||
| @@ -769,7 +769,7 @@ Save a copy in register 0 if `cua-delete-copy-to-register-0' is non-nil." | |||
| 769 | (let ((start (mark)) (end (point))) | 769 | (let ((start (mark)) (end (point))) |
| 770 | (or (<= start end) | 770 | (or (<= start end) |
| 771 | (setq start (prog1 end (setq end start)))) | 771 | (setq start (prog1 end (setq end start)))) |
| 772 | (setq cua--last-deleted-region-text (buffer-substring start end)) | 772 | (setq cua--last-deleted-region-text (filter-buffer-substring start end)) |
| 773 | (if cua-delete-copy-to-register-0 | 773 | (if cua-delete-copy-to-register-0 |
| 774 | (set-register ?0 cua--last-deleted-region-text)) | 774 | (set-register ?0 cua--last-deleted-region-text)) |
| 775 | (delete-region start end) | 775 | (delete-region start end) |
| @@ -858,7 +858,7 @@ If global mark is active, copy from register or one character." | |||
| 858 | (if regtxt | 858 | (if regtxt |
| 859 | (cua--insert-at-global-mark regtxt) | 859 | (cua--insert-at-global-mark regtxt) |
| 860 | (when (not (eobp)) | 860 | (when (not (eobp)) |
| 861 | (cua--insert-at-global-mark (buffer-substring (point) (+ (point) count))) | 861 | (cua--insert-at-global-mark (filter-buffer-substring (point) (+ (point) count))) |
| 862 | (forward-char count)))) | 862 | (forward-char count)))) |
| 863 | (buffer-read-only | 863 | (buffer-read-only |
| 864 | (message "Cannot paste into a read-only buffer")) | 864 | (message "Cannot paste into a read-only buffer")) |
| @@ -875,7 +875,7 @@ If global mark is active, copy from register or one character." | |||
| 875 | (setq paste-lines (cua--delete-rectangle)) | 875 | (setq paste-lines (cua--delete-rectangle)) |
| 876 | (if (= paste-lines 1) | 876 | (if (= paste-lines 1) |
| 877 | (setq paste-lines nil))) ;; paste all | 877 | (setq paste-lines nil))) ;; paste all |
| 878 | (if (string= (buffer-substring (point) (mark)) | 878 | (if (string= (filter-buffer-substring (point) (mark)) |
| 879 | (car kill-ring)) | 879 | (car kill-ring)) |
| 880 | (current-kill 1)) | 880 | (current-kill 1)) |
| 881 | (cua-delete-region))) | 881 | (cua-delete-region))) |
| @@ -950,7 +950,7 @@ of text." | |||
| 950 | (setq s (car u) e (cdr u))))))) | 950 | (setq s (car u) e (cdr u))))))) |
| 951 | (setq cua--repeat-replace-text | 951 | (setq cua--repeat-replace-text |
| 952 | (cond ((and s e (<= s e) (= s (mark t))) | 952 | (cond ((and s e (<= s e) (= s (mark t))) |
| 953 | (buffer-substring-no-properties s e)) | 953 | (filter-buffer-substring s e nil t)) |
| 954 | ((and (null s) (eq u elt)) ;; nothing inserted | 954 | ((and (null s) (eq u elt)) ;; nothing inserted |
| 955 | "") | 955 | "") |
| 956 | (t | 956 | (t |