emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: inhibit-read-only


From: Richard M. Stallman
Subject: Re: inhibit-read-only
Date: Wed, 15 Feb 2006 23:40:37 -0500

    Yes.  The problem is that `inhibit-read-only' is not buffer-local like
    `buffer-read-only'.  Hence, entering the debugger has a rather global
    side-effect.  I'm afraid there's nothing that could be done here.

We can make the buffer bind inhibit-read-only to nil, saving the
outside value.  It does that for other variables.

Does this change do it?


*** debug.el    07 Feb 2006 18:16:18 -0500      1.98
--- debug.el    15 Feb 2006 22:22:38 -0500      
***************
*** 88,93 ****
--- 88,94 ----
  (defvar debugger-outer-standard-output)
  (defvar debugger-outer-inhibit-redisplay)
  (defvar debugger-outer-cursor-in-echo-area)
+ (defvar debugger-outer-inhibit-read-only)
  (defvar debugger-will-be-back nil
    "Non-nil if we expect to get back in the debugger soon.")
  
***************
*** 151,156 ****
--- 152,158 ----
          (debugger-outer-standard-output standard-output)
          (debugger-outer-inhibit-redisplay inhibit-redisplay)
          (debugger-outer-cursor-in-echo-area cursor-in-echo-area)
+         (debugger-outer-inhibit-read-only inhibit-read-only)
          (debugger-with-timeout-suspend (with-timeout-suspend)))
        ;; Set this instead of binding it, so that `q'
        ;; will not restore it.
***************
*** 171,177 ****
             (or enable-recursive-minibuffers (> (minibuffer-depth) 0)))
            (standard-input t) (standard-output t)
            inhibit-redisplay
!           (cursor-in-echo-area nil))
        (unwind-protect
            (save-excursion
              (save-window-excursion
--- 173,180 ----
             (or enable-recursive-minibuffers (> (minibuffer-depth) 0)))
            (standard-input t) (standard-output t)
            inhibit-redisplay
!           (cursor-in-echo-area nil)
!           (inhibit-read-only nil))
        (unwind-protect
            (save-excursion
              (save-window-excursion
***************
*** 260,265 ****
--- 263,269 ----
        (setq standard-output debugger-outer-standard-output)
        (setq inhibit-redisplay debugger-outer-inhibit-redisplay)
        (setq cursor-in-echo-area debugger-outer-cursor-in-echo-area)
+       (setq inhibit-read-only debugger-outer-inhibit-read-only)
        (setq debug-on-next-call debugger-step-after-exit)
        debugger-value)))
  
***************
*** 541,547 ****
            (standard-input debugger-outer-standard-input)
            (standard-output debugger-outer-standard-output)
            (inhibit-redisplay debugger-outer-inhibit-redisplay)
!           (cursor-in-echo-area debugger-outer-cursor-in-echo-area))
        (set-match-data debugger-outer-match-data)
        (prog1
          (let ((save-ucc (with-no-warnings unread-command-char)))
--- 545,552 ----
            (standard-input debugger-outer-standard-input)
            (standard-output debugger-outer-standard-output)
            (inhibit-redisplay debugger-outer-inhibit-redisplay)
!           (cursor-in-echo-area debugger-outer-cursor-in-echo-area)
!         (inhibit-read-only debugger-outer-inhibit-read-only))
        (set-match-data debugger-outer-match-data)
        (prog1
          (let ((save-ucc (with-no-warnings unread-command-char)))
***************
*** 573,578 ****
--- 578,584 ----
          (setq debugger-outer-standard-output standard-output)
          (setq debugger-outer-inhibit-redisplay inhibit-redisplay)
          (setq debugger-outer-cursor-in-echo-area cursor-in-echo-area)
+       (setq debugger-outer-inhibit-read-only inhibit-read-only)
          ))))
  
  (defun debugger-eval-expression (exp)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]