]> git.eshelyaron.com Git - emacs.git/commitdiff
(diff-ignore-whitespace-hunk): Bind
authorDan Nicolaescu <dann@ics.uci.edu>
Sat, 8 Mar 2008 07:56:13 +0000 (07:56 +0000)
committerDan Nicolaescu <dann@ics.uci.edu>
Sat, 8 Mar 2008 07:56:13 +0000 (07:56 +0000)
inhibit-read-only before trying to change the buffer.

lisp/ChangeLog
lisp/diff-mode.el

index a80295f36138899c6b63ce41c5b1536d2e66fc81..c8fc4b869ca9939d97dc7905dd2004b560e24a4d 100644 (file)
@@ -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.
index afd9399d1e56f42394fbc5bd317fa9fbf15c85ee..d2b0ee84e17c67602e33e83be3e2da18c734e003 100644 (file)
@@ -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