GNU bug report logs - #10939
24.0.94; backward-delete-char-untabify read-only error

Previous Next

Package: emacs;

Reported by: Leo <sdl.web <at> gmail.com>

Date: Sun, 4 Mar 2012 13:34:01 UTC

Severity: normal

Found in version 24.0.94

Done: Leo <sdl.web <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Leo <sdl.web <at> gmail.com>
Subject: bug#10939: closed (Re: bug#10939: 24.0.94; backward-delete-char-untabify
 read-only error)
Date: Mon, 05 Mar 2012 19:06:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#10939: 24.0.94; backward-delete-char-untabify read-only error

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 10939 <at> debbugs.gnu.org.

-- 
10939: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10939
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Leo <sdl.web <at> gmail.com>
To: 10939-done <at> debbugs.gnu.org
Subject: Re: bug#10939: 24.0.94; backward-delete-char-untabify read-only error
Date: Tue, 06 Mar 2012 03:03:57 +0800
Fixed in 24.1

[Message part 3 (message/rfc822, inline)]
From: Leo <sdl.web <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.0.94; backward-delete-char-untabify read-only error
Date: Sun, 04 Mar 2012 21:32:27 +0800
1. (setq backward-delete-char-untabify-method 'hungry)
2. (setq enable-recursive-minibuffers t)
3. M-: and then type some spaces
4. M-x backward-delete-char-untabify

You should see something like:
  delete-backward-char: Text is read-only

This patch fixes it:

diff --git a/lisp/simple.el b/lisp/simple.el
index c14d0d70..0faf54bc 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -3458,8 +3458,10 @@ (defun backward-delete-char-untabify (arg &optional killp)
                      ((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



This bug report was last modified 13 years and 163 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.