Mercurial > emacs
diff lisp/files.el @ 95362:e886c765584a
* 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.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Wed, 28 May 2008 12:36:15 +0000 |
parents | edfe642dc91c |
children | 52e3cee99f90 |
line wrap: on
line diff
--- a/lisp/files.el Wed May 28 12:26:41 2008 +0000 +++ b/lisp/files.el Wed May 28 12:36:15 2008 +0000 @@ -4085,7 +4085,10 @@ (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 @@ (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