diff options
| author | Miles Bader | 2001-09-18 01:19:51 +0000 |
|---|---|---|
| committer | Miles Bader | 2001-09-18 01:19:51 +0000 |
| commit | 2b960ac0224a2107743a1408183d55bce025b7f8 (patch) | |
| tree | 81e0ce1d5fd9d364787323c99a6b4b35d4f38681 | |
| parent | 13efce4046b77fc7cd9a4fb00e0f05fbedfe39ce (diff) | |
| download | emacs-2b960ac0224a2107743a1408183d55bce025b7f8.tar.gz emacs-2b960ac0224a2107743a1408183d55bce025b7f8.zip | |
(diff-mode): Don't make the buffer read-only if it's empty (and thus
probably a new patch file about to be edited).
| -rw-r--r-- | lisp/diff-mode.el | 5 |
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 @@ | |||
| 1 | ;;; diff-mode.el --- A mode for viewing/editing context diffs | 1 | ;;; diff-mode.el --- A mode for viewing/editing context diffs |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Stefan Monnier <monnier@cs.yale.edu> | 5 | ;; Author: Stefan Monnier <monnier@cs.yale.edu> |
| 6 | ;; Keywords: patch diff | 6 | ;; Keywords: patch diff |
| @@ -893,7 +893,8 @@ This mode runs `diff-mode-hook'. | |||
| 893 | ;; (compilation-shell-minor-mode 1) | 893 | ;; (compilation-shell-minor-mode 1) |
| 894 | 894 | ||
| 895 | ;; setup change hooks | 895 | ;; setup change hooks |
| 896 | (toggle-read-only t) | 896 | (unless (and (bobp) (eobp)) |
| 897 | (toggle-read-only t)) | ||
| 897 | (if (not diff-update-on-the-fly) | 898 | (if (not diff-update-on-the-fly) |
| 898 | (add-hook 'write-contents-hooks 'diff-write-contents-hooks) | 899 | (add-hook 'write-contents-hooks 'diff-write-contents-hooks) |
| 899 | (make-local-variable 'diff-unhandled-changes) | 900 | (make-local-variable 'diff-unhandled-changes) |