From: Leo Liu Date: Mon, 5 Mar 2012 15:53:34 +0000 (+0800) Subject: * lisp/simple.el (backward-delete-char-untabify): Constrain point to X-Git-Tag: emacs-pretest-24.0.05~161 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=109aa8a95ecbbb2d7c62c2c98c10132885b1115f;p=emacs.git * lisp/simple.el (backward-delete-char-untabify): Constrain point to field. Fixes: debbugs:10939 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a6e04ca25db..394e082ecc8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2012-03-05 Leo Liu + * 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 diff --git a/lisp/simple.el b/lisp/simple.el index 2b4651ba697..45daf99f614 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -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