diff options
author | Karoly Lorentey <lorentey@elte.hu> | 2006-06-12 07:27:12 +0000 |
---|---|---|
committer | Karoly Lorentey <lorentey@elte.hu> | 2006-06-12 07:27:12 +0000 |
commit | 476e9367ec1f440aa23904b7bc482ea4a3b8041c (patch) | |
tree | 4f7f5a5e9a6668f908834bb6e216c8fa3727d4b3 /lisp/diff-mode.el | |
parent | a13f8f50d4cc544d3bbfa78568e82ce09e68bded (diff) | |
parent | 6b519504c3297595101628e823e72c91e562ab45 (diff) | |
download | emacs-476e9367ec1f440aa23904b7bc482ea4a3b8041c.tar.gz |
Merged from emacs@sv.gnu.org.
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--patch-294
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-295
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-296
Update from CVS: admin/FOR-RELEASE: Update refcard section.
* emacs@sv.gnu.org/emacs--devo--0--patch-297
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-298
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-299
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-300
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-301
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-302
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-303
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-304
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-103
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-104
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-570
Diffstat (limited to 'lisp/diff-mode.el')
-rw-r--r-- | lisp/diff-mode.el | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el index 1a8402e06c4..7ea02352b0b 100644 --- a/lisp/diff-mode.el +++ b/lisp/diff-mode.el @@ -438,7 +438,8 @@ If the prefix ARG is given, restrict the view to the current file instead." (firsthunk (ignore-errors (goto-char start) (diff-beginning-of-file) (diff-hunk-next) (point))) - (nextfile (ignore-errors (diff-file-next) (point)))) + (nextfile (ignore-errors (diff-file-next) (point))) + (inhibit-read-only t)) (goto-char start) (if (and firsthunk (= firsthunk start) (or (null nexthunk) @@ -457,7 +458,8 @@ If the prefix ARG is given, restrict the view to the current file instead." (ignore-errors (diff-hunk-prev) (point)))) (index (save-excursion - (re-search-backward "^Index: " prevhunk t)))) + (re-search-backward "^Index: " prevhunk t))) + (inhibit-read-only t)) (when index (setq start index)) (diff-end-of-file) (if (looking-at "^\n") (forward-char 1)) ;`tla' generates such diffs. @@ -497,7 +499,8 @@ If the prefix ARG is given, restrict the view to the current file instead." (let* ((start1 (string-to-number (match-string 1))) (start2 (string-to-number (match-string 2))) (newstart1 (+ start1 (diff-count-matches "^[- \t]" (point) pos))) - (newstart2 (+ start2 (diff-count-matches "^[+ \t]" (point) pos)))) + (newstart2 (+ start2 (diff-count-matches "^[+ \t]" (point) pos))) + (inhibit-read-only t)) (goto-char pos) ;; Hopefully the after-change-function will not screw us over. (insert "@@ -" (number-to-string newstart1) ",1 +" @@ -993,8 +996,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) @@ -1355,6 +1357,7 @@ For use in `add-log-current-defun-function'." (file1 (make-temp-file "diff1")) (file2 (make-temp-file "diff2")) (coding-system-for-read buffer-file-coding-system) + (inhibit-read-only t) old new) (unwind-protect (save-excursion |