From 7b9b03cf75176b7ef6d19ac474122a9c65f60d42 Mon Sep 17 00:00:00 2001 From: "Taylor R. Campbell" Date: Tue, 2 Sep 2008 21:31:59 +0000 Subject: [PATCH] When diffing with a buffer, ignore whether it is modified or not. The user may want to see how a file has changed on disk even if the buffer in memory has not been touched. --- v7/src/edwin/diff.scm | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/v7/src/edwin/diff.scm b/v7/src/edwin/diff.scm index 294872b3e..68208e072 100644 --- a/v7/src/edwin/diff.scm +++ b/v7/src/edwin/diff.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: diff.scm,v 1.2 2006/06/16 18:33:21 riastradh Exp $ +$Id: diff.scm,v 1.3 2008/09/02 21:31:59 riastradh Exp $ This code is written by Taylor R. Campbell and placed in the Public Domain. All warranties are disclaimed. @@ -80,15 +80,13 @@ Domain. All warranties are disclaimed. (define (diff-buffer buffer pathname receiver) (select-buffer - (if (buffer-modified? buffer) - (call-with-temporary-file-pathname - (lambda (temporary-pathname) - (write-region (buffer-region buffer) - temporary-pathname - #f ;No message - #f) ;No line ending translation - (receiver temporary-pathname))) - (receiver pathname)))) + (call-with-temporary-file-pathname + (lambda (temporary-pathname) + (write-region (buffer-region buffer) + temporary-pathname + #f ;No message + #f) ;No line ending translation + (receiver temporary-pathname))))) (define (diff-to-buffer old-filename new-filename #!optional buffer) (let ((buffer (diff-to-buffer-argument buffer))) -- 2.25.1