mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-05 11:45:45 +00:00
* 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.
This commit is contained in:
parent
b75d7f2882
commit
6b3d752c5d
@ -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>
|
2008-05-28 Glenn Morris <rgm@gnu.org>
|
||||||
|
|
||||||
* Makefile.in (update-elclist): Work around non-portability of "\"
|
* Makefile.in (update-elclist): Work around non-portability of "\"
|
||||||
|
@ -4085,7 +4085,10 @@ Before and after saving the buffer, this function runs
|
|||||||
(setq tempname
|
(setq tempname
|
||||||
(make-temp-name
|
(make-temp-name
|
||||||
(expand-file-name "tmp" dir)))
|
(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
|
tempname nil realname
|
||||||
buffer-file-truename 'excl)
|
buffer-file-truename 'excl)
|
||||||
nil)
|
nil)
|
||||||
@ -4119,7 +4122,10 @@ Before and after saving the buffer, this function runs
|
|||||||
(let (success)
|
(let (success)
|
||||||
(unwind-protect
|
(unwind-protect
|
||||||
(progn
|
(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)
|
buffer-file-name nil t buffer-file-truename)
|
||||||
(setq success t))
|
(setq success t))
|
||||||
;; If we get an error writing the new file, and we made
|
;; If we get an error writing the new file, and we made
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
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>
|
2008-05-28 Juanma Barranquero <lekktu@gmail.com>
|
||||||
|
|
||||||
* coding.c (Fdecode_coding_region, Fencode_coding_region)
|
* coding.c (Fdecode_coding_region, Fencode_coding_region)
|
||||||
|
11
src/fileio.c
11
src/fileio.c
@ -5079,8 +5079,11 @@ This does code conversion according to the value of
|
|||||||
/* Special kludge to simplify auto-saving. */
|
/* Special kludge to simplify auto-saving. */
|
||||||
if (NILP (start))
|
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 (start, BEG);
|
||||||
XSETFASTINT (end, Z);
|
XSETFASTINT (end, Z); */
|
||||||
Fwiden ();
|
Fwiden ();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5100,6 +5103,12 @@ This does code conversion according to the value of
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (NILP (start))
|
||||||
|
{
|
||||||
|
XSETFASTINT (start, BEGV);
|
||||||
|
XSETFASTINT (end, ZV);
|
||||||
|
}
|
||||||
|
|
||||||
UNGCPRO;
|
UNGCPRO;
|
||||||
|
|
||||||
GCPRO5 (start, filename, annotations, visit_file, lockname);
|
GCPRO5 (start, filename, annotations, visit_file, lockname);
|
||||||
|
Loading…
Reference in New Issue
Block a user