the idea was that escape-quoted should be used *everywhere*. this is the only
way of guaranteeing that auto-save files actually restore exactly what was in
the buffer -- or at the very least, we do NOT want to be guessing the encoding
of an auto-save file.
i fixed this properly in my mule ws. for 21.1 you might want to go ahead and
apply kyle's patch since it's the easiest thing to do and will work most of the
time even if not totally reliable.
"Stephen J. Turnbull" wrote:
Thanks for the patch, Kyle.
>>>>> "Kyle" == Kyle Jones <kyle_jones(a)wonderworks.com>
writes:
Kyle> Looking at the XEmacs code, this seems to be intentional,
Kyle> though I don't know why.
Ben? I don't see how this could possibly work right for a non-ISO
2022 encoding that contains escape characters?
Kyle> Here's a patch. Recommended for the 21.1 code line because
Kyle> this problem corrupts autosave files of mail folders that
Kyle> have ISO-2022-JP encoded messages in them. I haven't looked
Kyle> at the development code line so I don't know if the patch is
The problem affects all XEmacsen since 21.1. I suspect Ben had his
reasons for using escape-quoted here, so he may have an alternative.
This works for me so I'm forwarding to xemacs-patches, pending comment
from Ben.
Kyle> approrpiate there. I also changed the MULE #ifdef to
Kyle> FILE_CODING because maintaining the current coding system
Kyle> looks like the right thing to do in that context also.
src/ChangeLog:
2001/10/31 Kyle Jones <kyle_jones(a)wonderworks.com>
* fileio.c (auto_save_1): Use current coding system, not
escape-quoted, for autosaves.
*** src/fileio.c 2001/10/31 04:21:24 1.1
--- src/fileio.c 2001/10/31 04:22:01
***************
*** 3825,3832 ****
return
/* !!#### need to deal with this 'escape-quoted everywhere */
Fwrite_region_internal (Qnil, Qnil, a, Qnil, Qlambda, Qnil,
! #ifdef MULE
! Qescape_quoted
#else
Qnil
#endif
--- 3825,3832 ----
return
/* !!#### need to deal with this 'escape-quoted everywhere */
Fwrite_region_internal (Qnil, Qnil, a, Qnil, Qlambda, Qnil,
! #ifdef FILE_CODING
! current_buffer->buffer_file_coding_system
#else
Qnil
#endif
--
Institute of Policy and Planning Sciences
http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Don't ask how you can "do" free software business;
ask what your business can "do for" free software.