changeset 92618:42c38aef74a3

(diff-ignore-whitespace-hunk): Bind inhibit-read-only before trying to change the buffer.
author Dan Nicolaescu <dann@ics.uci.edu>
date Sat, 08 Mar 2008 07:56:13 +0000
parents 56549e89b88c
children 6c9be1557979
files lisp/ChangeLog lisp/diff-mode.el
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sat Mar 08 04:33:27 2008 +0000
+++ b/lisp/ChangeLog	Sat Mar 08 07:56:13 2008 +0000
@@ -1,3 +1,8 @@
+2008-03-08  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* diff-mode.el (diff-ignore-whitespace-hunk): Bind
+	inhibit-read-only before trying to change the buffer.
+
 2008-03-08  Glenn Morris  <rgm@gnu.org>
 
 	* calendar/appt.el (appt): Move custom group here from calendar.el.
--- a/lisp/diff-mode.el	Sat Mar 08 04:33:27 2008 +0000
+++ b/lisp/diff-mode.el	Sat Mar 08 07:56:13 2008 +0000
@@ -1695,13 +1695,13 @@
 	 (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