calling build_annotations.
* lisp/files.el (basic-save-buffer-2): Pass nil rather than (point-min)
to write-region.
+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 "\"
(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)
(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)
/* 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 ();
}
}
}
+ if (NILP (start))
+ {
+ XSETFASTINT (start, BEGV);
+ XSETFASTINT (end, ZV);
+ }
+
UNGCPRO;
GCPRO5 (start, filename, annotations, visit_file, lockname);