Commit 6b3d752c authored by Stefan Monnier's avatar Stefan Monnier
Browse files

* 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.
parent b75d7f28
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 "\"
......
......@@ -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
......
2008-05-28 Stefan Monnier <monnier@iro.umontreal.ca>
* fileio.c (Fwrite_region): Delay the defaulting to beg&z to after
calling build_annotations.
2008-05-28 Juanma Barranquero <lekktu@gmail.com>
* coding.c (Fdecode_coding_region, Fencode_coding_region)
......
......@@ -5079,8 +5079,11 @@ This does code conversion according to the value of
/* Special kludge to simplify auto-saving. */
if (NILP (start))
{
/* Do it later, so write-region-annotate-function can work differently
if we save "the buffer" vs "a region".
This is useful in tar-mode. --Stef
XSETFASTINT (start, BEG);
XSETFASTINT (end, Z);
XSETFASTINT (end, Z); */
Fwiden ();
}
......@@ -5100,6 +5103,12 @@ This does code conversion according to the value of
}
}
if (NILP (start))
{
XSETFASTINT (start, BEGV);
XSETFASTINT (end, ZV);
}
UNGCPRO;
GCPRO5 (start, filename, annotations, visit_file, lockname);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment