diff lisp/diff-mode.el @ 71248:3071d2ae4624

* diff-mode.el (diff-mode): Set buffer-read-only to t when diff-default-read-only is non-nill. * diff.el (diff-sentinel, diff): Set inhibit-read-only to t when modifying the *Diff* buffer. (diff-process-filter): New filter function for diff process that sets inhibit-read-only to t when modifying the *Diff* buffer.
author Chong Yidong <cyd@stupidchicken.com>
date Tue, 06 Jun 2006 14:06:13 +0000
parents ef7506f44a3a
children 3798a822991e
line wrap: on
line diff
--- a/lisp/diff-mode.el	Tue Jun 06 08:27:21 2006 +0000
+++ b/lisp/diff-mode.el	Tue Jun 06 14:06:13 2006 +0000
@@ -993,8 +993,7 @@
   ;; compile support
   (set (make-local-variable 'next-error-function) 'diff-next-error)
 
-  (when (and (> (point-max) (point-min)) diff-default-read-only)
-    (toggle-read-only t))
+  (setq buffer-read-only diff-default-read-only)
   ;; setup change hooks
   (if (not diff-update-on-the-fly)
       (add-hook 'write-contents-functions 'diff-write-contents-hooks nil t)