]> code.delx.au - gnu-emacs/blobdiff - lisp/emulation/cua-rect.el
Fix ccl encoding of unibyte source.
[gnu-emacs] / lisp / emulation / cua-rect.el
index 11dc1b039f6111f6dbeb3b5f6a34b54cbeb3ef38..4398b5aa1af4366f7a33ef2880601c0bcc74b26d 100644 (file)
@@ -1,7 +1,7 @@
 ;;; cua-rect.el --- CUA unified rectangle support
 
 ;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;;   2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
 ;; Author: Kim F. Storm <storm@cua.dk>
 ;; Keywords: keyboard emulations convenience CUA
@@ -847,7 +847,7 @@ If command is repeated at same position, delete the rectangle."
              (move-to-column col t))
         (cond
          (to-col (indent-to to-col))
-         (ch (insert ch))
+         ((and ch (not (eq ch ?\t))) (insert ch))
          (t (tab-to-tab-stop)))
          (if (cua--rectangle-right-side t)
              (cua--rectangle-insert-col (current-column))
@@ -1198,8 +1198,7 @@ The numbers are formatted according to the FORMAT string."
             (- (cua--rectangle-right) (cua--rectangle-left) -1)))
         (r (or setup-fct (cua--extract-rectangle)))
         y z (tr 0))
-    (save-excursion
-      (set-buffer auxbuf)
+    (with-current-buffer auxbuf
       (erase-buffer)
       (if setup-fct
           (funcall setup-fct)