[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/fileio.c
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/src/fileio.c |
Date: |
Mon, 19 Nov 2001 16:50:44 -0500 |
Index: emacs/src/fileio.c
diff -u emacs/src/fileio.c:1.427 emacs/src/fileio.c:1.428
--- emacs/src/fileio.c:1.427 Sat Nov 17 16:08:43 2001
+++ emacs/src/fileio.c Mon Nov 19 16:50:44 2001
@@ -4697,13 +4697,8 @@
if (!NILP (start) && !STRINGP (start))
validate_region (&start, &end);
- GCPRO4 (start, filename, visit, lockname);
+ GCPRO5 (start, filename, visit, visit_file, lockname);
- /* Decide the coding-system to encode the data with. */
- choose_write_coding_system (start, end, filename,
- append, visit, lockname, &coding);
- Vlast_coding_system_used = coding.symbol;
-
filename = Fexpand_file_name (filename, Qnil);
if (!NILP (mustbenew) && !EQ (mustbenew, Qexcl))
@@ -4713,15 +4708,12 @@
visit_file = Fexpand_file_name (visit, Qnil);
else
visit_file = filename;
- UNGCPRO;
if (NILP (lockname))
lockname = visit_file;
annotations = Qnil;
- GCPRO5 (start, filename, annotations, visit_file, lockname);
-
/* If the file name has special constructs in it,
call the corresponding file handler. */
handler = Ffind_file_name_handler (filename, Qwrite_region);
@@ -4766,6 +4758,14 @@
UNGCPRO;
GCPRO5 (start, filename, annotations, visit_file, lockname);
+
+ /* Decide the coding-system to encode the data with.
+ We used to make this choice before calling build_annotations, but that
+ leads to problems when a write-annotate-function takes care of
+ unsavable chars (as was the case with X-Symbol). */
+ choose_write_coding_system (start, end, filename,
+ append, visit, lockname, &coding);
+ Vlast_coding_system_used = coding.symbol;
given_buffer = current_buffer;
annotations = build_annotations_2 (start, end,
- [Emacs-diffs] Changes to emacs/src/fileio.c, Richard M. Stallman, 2001/11/13
- [Emacs-diffs] Changes to emacs/src/fileio.c, Stefan Monnier, 2001/11/16
- [Emacs-diffs] Changes to emacs/src/fileio.c, Stefan Monnier, 2001/11/16
- [Emacs-diffs] Changes to emacs/src/fileio.c, Richard M. Stallman, 2001/11/17
- [Emacs-diffs] Changes to emacs/src/fileio.c,
Stefan Monnier <=
- [Emacs-diffs] Changes to emacs/src/fileio.c, Stefan Monnier, 2001/11/26
- [Emacs-diffs] Changes to emacs/src/fileio.c, Richard M. Stallman, 2001/11/28
- [Emacs-diffs] Changes to emacs/src/fileio.c, Pavel JanÃk, 2001/11/29