diff options
author | Chong Yidong <[email protected]> | 2006-06-06 14:06:13 +0000 |
---|---|---|
committer | Chong Yidong <[email protected]> | 2006-06-06 14:06:13 +0000 |
commit | 53dd481c3fc408b0ebf32ae37a5884b3bd47cfee (patch) | |
tree | bec76072886098a3ff1f411ab11c71e1de1a9d58 /lisp/diff-mode.el | |
parent | 2e8e9e91955f7b75e832246a9de8763347353936 (diff) |
* 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.
Diffstat (limited to 'lisp/diff-mode.el')
-rw-r--r-- | lisp/diff-mode.el | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el index 1a8402e06c..f78ce1ae15 100644 --- a/lisp/diff-mode.el +++ b/lisp/diff-mode.el @@ -993,8 +993,7 @@ a diff with \\[diff-reverse-direction]." ;; 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) |