summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/files.el10
2 files changed, 13 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index bf1a3e309fd..fc88bbc3c60 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2008-05-28 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * files.el (basic-save-buffer-2): Pass nil rather than (point-min)
+ to write-region.
+
2008-05-28 Glenn Morris <rgm@gnu.org>
* Makefile.in (update-elclist): Work around non-portability of "\"
diff --git a/lisp/files.el b/lisp/files.el
index 9802f903eeb..14752752b79 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -4085,7 +4085,10 @@ Before and after saving the buffer, this function runs
(setq tempname
(make-temp-name
(expand-file-name "tmp" dir)))
- (write-region (point-min) (point-max)
+ ;; Pass in nil&nil rather than point-min&max
+ ;; cause we're saving the whole buffer.
+ ;; write-region-annotate-functions may use it.
+ (write-region nil nil
tempname nil realname
buffer-file-truename 'excl)
nil)
@@ -4119,7 +4122,10 @@ Before and after saving the buffer, this function runs
(let (success)
(unwind-protect
(progn
- (write-region (point-min) (point-max)
+ ;; Pass in nil&nil rather than point-min&max to indicate
+ ;; we're saving the buffer rather than just a region.
+ ;; write-region-annotate-functions may make us of it.
+ (write-region nil nil
buffer-file-name nil t buffer-file-truename)
(setq success t))
;; If we get an error writing the new file, and we made