diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2008-05-28 12:36:15 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2008-05-28 12:36:15 +0000 |
commit | 6b3d752c5df6b19f6ff20174e3cb0471ff3daa27 (patch) | |
tree | 88a9fb7048a5ed35727537dcc0ee1c1d76d4792a /lisp/files.el | |
parent | b75d7f28826a896fad4599b22f25599a4ee582d1 (diff) | |
download | emacs-6b3d752c5df6b19f6ff20174e3cb0471ff3daa27.tar.gz |
* src/fileio.c (Fwrite_region): Delay the defaulting to beg&z to after
calling build_annotations.
* lisp/files.el (basic-save-buffer-2): Pass nil rather than (point-min)
to write-region.
Diffstat (limited to 'lisp/files.el')
-rw-r--r-- | lisp/files.el | 10 |
1 files changed, 8 insertions, 2 deletions
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 |