summaryrefslogtreecommitdiff
path: root/lisp/files.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/files.el')
-rw-r--r--lisp/files.el5
1 files changed, 2 insertions, 3 deletions
diff --git a/lisp/files.el b/lisp/files.el
index 14752752b79..0fcbcb2a397 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -4145,9 +4145,8 @@ This requires the external program `diff' to be in your `exec-path'."
(file-exists-p buffer-file-name))
(let ((tempfile (make-temp-file "buffer-content-")))
(unwind-protect
- (save-restriction
- (widen)
- (write-region (point-min) (point-max) tempfile nil 'nomessage)
+ (progn
+ (write-region nil nil tempfile nil 'nomessage)
(diff buffer-file-name tempfile nil t)
(sit-for 0))
(when (file-exists-p tempfile)