]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/simple.el (backward-delete-char-untabify): Constrain point to
authorLeo Liu <sdl.web@gmail.com>
Mon, 5 Mar 2012 15:53:34 +0000 (23:53 +0800)
committerLeo Liu <sdl.web@gmail.com>
Mon, 5 Mar 2012 15:53:34 +0000 (23:53 +0800)
field.

Fixes: debbugs:10939
lisp/ChangeLog
lisp/simple.el

index a6e04ca25dbb926736d943b5238c3d82ef90ac69..394e082ecc89589f78ee1751b48e2b1407beda36 100644 (file)
@@ -1,5 +1,8 @@
 2012-03-05  Leo Liu  <sdl.web@gmail.com>
 
+       * simple.el (backward-delete-char-untabify): Constrain point to
+       field (Bug#10939).
+
        * eshell/em-cmpl.el (eshell-cmpl-initialize): Fix shift-tab key.
 
 2012-03-05  Chong Yidong  <cyd@gnu.org>
index 2b4651ba697d8cf11573a3bc99078be6259182c2..45daf99f6147c0ca1d4de3948e4fb4721a6c316c 100644 (file)
@@ -3463,8 +3463,10 @@ and KILLP is t if a prefix arg was specified."
                      ((eq backward-delete-char-untabify-method 'all)
                       " \t\n\r")))
          (n (if skip
-                (let ((wh (- (point) (save-excursion (skip-chars-backward skip)
-                                                     (point)))))
+                (let* ((oldpt (point))
+                       (wh (- oldpt (save-excursion
+                                      (skip-chars-backward skip)
+                                      (constrain-to-field nil oldpt)))))
                   (+ arg (if (zerop wh) 0 (1- wh))))
               arg)))
     ;; Avoid warning about delete-backward-char