summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2001-09-18 01:19:51 +0000
committerMiles Bader <miles@gnu.org>2001-09-18 01:19:51 +0000
commit2b960ac0224a2107743a1408183d55bce025b7f8 (patch)
tree81e0ce1d5fd9d364787323c99a6b4b35d4f38681 /lisp
parent13efce4046b77fc7cd9a4fb00e0f05fbedfe39ce (diff)
downloademacs-2b960ac0224a2107743a1408183d55bce025b7f8.tar.gz
(diff-mode): Don't make the buffer read-only if it's empty (and thus
probably a new patch file about to be edited).
Diffstat (limited to 'lisp')
-rw-r--r--lisp/diff-mode.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el
index b01ea535ac0..6d630e5a8ad 100644
--- a/lisp/diff-mode.el
+++ b/lisp/diff-mode.el
@@ -1,6 +1,6 @@
;;; diff-mode.el --- A mode for viewing/editing context diffs
-;; Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@cs.yale.edu>
;; Keywords: patch diff
@@ -893,7 +893,8 @@ This mode runs `diff-mode-hook'.
;; (compilation-shell-minor-mode 1)
;; setup change hooks
- (toggle-read-only t)
+ (unless (and (bobp) (eobp))
+ (toggle-read-only t))
(if (not diff-update-on-the-fly)
(add-hook 'write-contents-hooks 'diff-write-contents-hooks)
(make-local-variable 'diff-unhandled-changes)