From: Dan Nicolaescu Date: Sat, 8 Mar 2008 07:56:13 +0000 (+0000) Subject: (diff-ignore-whitespace-hunk): Bind X-Git-Tag: emacs-pretest-23.0.90~7360 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=14cf0430e43b65cadc93be549344600fc722dd3e;p=emacs.git (diff-ignore-whitespace-hunk): Bind inhibit-read-only before trying to change the buffer. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a80295f3613..c8fc4b869ca 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2008-03-08 Dan Nicolaescu + + * diff-mode.el (diff-ignore-whitespace-hunk): Bind + inhibit-read-only before trying to change the buffer. + 2008-03-08 Glenn Morris * calendar/appt.el (appt): Move custom group here from calendar.el. diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el index afd9399d1e5..d2b0ee84e17 100644 --- a/lisp/diff-mode.el +++ b/lisp/diff-mode.el @@ -1695,13 +1695,13 @@ For use in `add-log-current-defun-function'." (line-nb (and (or (looking-at "[^0-9]+\\([0-9]+\\)") (error "Can't find line number")) (string-to-number (match-string 1)))) + (inhibit-read-only t) (hunk (delete-and-extract-region (point) (save-excursion (diff-end-of-hunk) (point)))) (lead (make-string (1- line-nb) ?\n)) ;Line nums start at 1. (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