diff options
author | Juanma Barranquero <lekktu@gmail.com> | 2010-05-10 16:37:59 +0200 |
---|---|---|
committer | Juanma Barranquero <lekktu@gmail.com> | 2010-05-10 16:37:59 +0200 |
commit | c5eb971bec053d053e41fa5463fe3b925b314633 (patch) | |
tree | 218a437de67c79ae91ddfece3682e0268535c3de /lisp/emulation/cua-rect.el | |
parent | 1fdf5102be10625fece506324e57af3b735f67f0 (diff) | |
download | emacs-c5eb971bec053d053e41fa5463fe3b925b314633.tar.gz |
CUA mode: Fix use of `filter-buffer-substring' (rework previous change).
* emulation/cua-base.el (cua--filter-buffer-noprops): New function.
(cua-repeat-replace-region):
* emulation/cua-rect.el (cua--extract-rectangle, cua-incr-rectangle):
* emulation/cua-gmrk.el (cua-copy-region-to-global-mark)
(cua-cut-region-to-global-mark): Use it.
Diffstat (limited to 'lisp/emulation/cua-rect.el')
-rw-r--r-- | lisp/emulation/cua-rect.el | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/emulation/cua-rect.el b/lisp/emulation/cua-rect.el index 4ac8ce58b3e..2b41f6435ee 100644 --- a/lisp/emulation/cua-rect.el +++ b/lisp/emulation/cua-rect.el @@ -625,7 +625,7 @@ If command is repeated at same position, delete the rectangle." (if (not (cua--rectangle-virtual-edges)) (cua--rectangle-operation nil nil nil nil nil ; do not tabify '(lambda (s e l r) - (setq rect (cons (filter-buffer-substring s e nil t) rect)))) + (setq rect (cons (cua--filter-buffer-noprops s e) rect)))) (cua--rectangle-operation nil 1 nil nil nil ; do not tabify '(lambda (s e l r v) (let ((copy t) (bs 0) (as 0) row) @@ -643,7 +643,7 @@ If command is repeated at same position, delete the rectangle." (setq as (- r (max (current-column) l)) e (point))) (setq row (if (and copy (> e s)) - (filter-buffer-substring s e nil t) + (cua--filter-buffer-noprops s e) "")) (when (> bs 0) (setq row (concat (make-string bs ?\s) row))) @@ -1124,12 +1124,12 @@ The length of STRING need not be the same as the rectangle width." '(lambda (s e l r) (cond ((re-search-forward "0x\\([0-9a-fA-F]+\\)" e t) - (let* ((txt (filter-buffer-substring (match-beginning 1) (match-end 1) nil t)) + (let* ((txt (cua--filter-buffer-noprops (match-beginning 1) (match-end 1))) (n (string-to-number txt 16)) (fmt (format "0x%%0%dx" (length txt)))) (replace-match (format fmt (+ n increment))))) ((re-search-forward "\\( *-?[0-9]+\\)" e t) - (let* ((txt (filter-buffer-substring (match-beginning 1) (match-end 1) nil t)) + (let* ((txt (cua--filter-buffer-noprops (match-beginning 1) (match-end 1))) (prefix (if (= (aref txt 0) ?0) "0" "")) (n (string-to-number txt 10)) (fmt (format "%%%s%dd" prefix (length txt)))) |