1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-27 08:43:40 -07:00
Commit graph

328 commits

Author SHA1 Message Date
Kenichi Handa
ef38927ffd (Fwrite_region): Reflect the eol conversion
specification of default value of buffer-file-coding-system if is
is undefined.
1998-08-10 06:29:02 +00:00
Kenichi Handa
1255deb9a6 (Finsert_file_contents): Call Vset_auto_coding_function
with two arguments.
(Fwrite_region): If buffer-file-coding-system is set locally, use
the coding system whithout checking file-coding-system-alist.
(syms_of_fileio): Docstring of set-auto-coding-function adjusted
for the change of argument number.
1998-07-25 04:23:13 +00:00
Richard M. Stallman
20f6783d3c (Finsert_file_contents): When replacing, in multibyte bfr,
always extend the range to a character boundary.
1998-07-13 22:11:54 +00:00
Kenichi Handa
2df42e0965 (Finsert_file_contents): Cancel previous change. Setup
the variable coding even if the inserted bytes is zero.
1998-07-06 01:47:34 +00:00
Richard M. Stallman
c1c4693e69 (Ffile_regular_p) [WINDOWSNT]: Bind
`w32-get-true-file-attributes' to t while calling stat.
(Finsert_file_contents) [WINDOWSNT]: Likewise.
(Fwrite_region): Don't try seeking to end of FILENAME for
appending if not a regular file.
1998-07-03 20:01:02 +00:00
Kenichi Handa
e921460071 (Finsert_file_contents): Do not set Vlast_coding_system
if inserted bytes is zero.
1998-07-03 04:33:12 +00:00
Richard M. Stallman
a79485afb8 (Faccess_file): Check type of second argument STRING.
(Fread_file_name): Bind minibuffer-completing-file-name to t.
1998-07-02 07:01:56 +00:00
Kenichi Handa
57515cfea1 (Finsert_file_contents): Call setup_raw_text_coding_system. 1998-06-26 03:29:15 +00:00
Kenichi Handa
81a7030d5f (syms_of_fileio): Doc-string of the variable
set-auto-coding-function modified for the change above.
1998-06-15 01:20:26 +00:00
Kenichi Handa
f736ffbf3a (Finsert_file_contents): Redo the change for handling
set-auto-coding while adding a kludgy code to avoid a compiler
bug.
1998-06-15 01:11:27 +00:00
Richard M. Stallman
26a047151b (Finsert_file_contents): Fix change to set INSERTED. 1998-06-14 05:51:03 +00:00
Kenichi Handa
54369368a3 (Finsert_file_contents): Undo the previous change for
handling set-ault-coding.
1998-06-12 08:44:43 +00:00
Kenichi Handa
b69a8fdc6c (Finsert_file_contents): After calling handler,
get INSERTED from the handler's value.
1998-06-12 08:35:09 +00:00
Kenichi Handa
b413243374 (set_auto_coding_unwind): New function.
(Finsert_file_contents): If the current buffer is empty, decide
the coding system after the file is inserted in the buffer.  If
not, insert the head and tail of a file in a temporary buffer and
call set-auto-coding-function.
(e_write): If there are carryover bytes in encoding because of
incomplete multibyte form, write them out as is.
1998-06-12 01:38:07 +00:00
Karl Heuer
6cf71bf1f7 (Finsert_file_contents): Always update
Vlast_coding_system_used when we actually perform IO.
(Fwrite_region): Update documentation.
1998-06-05 16:02:11 +00:00
Karl Heuer
cadf50ff82 (Finsert_file_contents): Fix char signedness mismatches. 1998-06-01 03:32:52 +00:00
Richard M. Stallman
ba14e174a6 (Ffile_name_directory, Ffile_name_nondirectory)
[DOS_NT]: Handle the special construct "/:" when followed by d:foo.
1998-05-21 02:06:21 +00:00
Richard M. Stallman
3ea2d8b25c (Fexpand_file_name): Change conditional
in previous change from WINDOWSNT to DOS_NT.
1998-05-17 21:37:02 +00:00
Richard M. Stallman
f5321b5c8a (Fexpand_file_name) [WINDOWSNT]: Be careful not to
concatenate the directory prefix and file name to accidentally
create a network share name.
1998-05-16 19:56:07 +00:00
Richard M. Stallman
6b3a18963a (Finsert_file_contents): Don't check non-regular
files for a coding: specification.
1998-05-14 03:54:50 +00:00
Richard M. Stallman
feb9dc27d7 (Finsert_file_contents): Check that a -*- coding: -*- spec
or a local variables list exists, before Vset_auto_coding_function.
1998-05-13 06:47:40 +00:00
Richard M. Stallman
70697733d4 (Finsert_file_contents): Don't use the fast replace code
if coding needs eol conversion.
(Finsert_file_contents) [DOS_NT]: When setting buffer_file_type,
if code conversion is needed, file is not binary.
1998-05-12 23:10:15 +00:00
Richard M. Stallman
f0f95d3101 (Fexpand_file_name) [DOS_NT]: Note when special escape
prefix /: is present, and reinsert after name has been expanded.
Only recognize drive specifier at beginning of name.

(Fexpand_file_name): Don't strip trailing slash if newdir is just /.
1998-05-07 23:11:57 +00:00
Richard M. Stallman
643c73b90b (barf_or_query_if_file_exists): Encode file name.
(Finsert_file_contents): Don't use gap pos to set point
if del_range_byte deleted 0 characters.
1998-05-05 19:32:02 +00:00
Richard M. Stallman
f6a492a9f2 Comment change. 1998-05-03 04:30:10 +00:00
Richard M. Stallman
8a7777fc1a (Fmake_temp_name): Improve randomness of generated file names. 1998-05-02 06:00:42 +00:00
Eli Zaretskii
7990d02a2d Include msdos.h after lisp.h. 1998-04-27 14:26:43 +00:00
Geoff Voelker
f9ba66ce95 (Fcopy_file): Skip dev/inode check on Windows. 1998-04-23 23:42:09 +00:00
Richard M. Stallman
3ce839e460 (Fmake_temp_name): Complete rewrite. 1998-04-20 18:13:03 +00:00
Karl Heuer
154a307db3 (file_name_as_directory): For empty arg, return `./'. 1998-04-15 06:12:48 +00:00
Andreas Schwab
b266ae04d7 (Fwrite_region): Fix mixing of Lisp_Object and int. 1998-04-14 12:58:24 +00:00
Andreas Schwab
dfcf069d56 Fix -Wimplicit warnings. 1998-04-14 12:25:56 +00:00
Andreas Schwab
e9cea9474c (Finsert_file_contents): Call adjust_after_insert also
in unibyte mode.
1998-04-14 10:20:03 +00:00
Karl Heuer
d8afad26de (Fmake_temp_name): Detect error return from mktemp. 1998-04-08 07:08:28 +00:00
Kenichi Handa
12fccb8562 (Finsert_file_contents): Call adjust_after_insert when
a text is inserted in a multibyte buffer without any code
conversion.
1998-03-30 06:00:54 +00:00
Richard M. Stallman
b8b29dc948 (barf_or_query_if_file_exists): New arg QUICK. All calls changed. 1998-03-28 08:25:53 +00:00
Richard M. Stallman
fc932ac6c7 Use STRING_BYTES and SET_STRING_BYTES. 1998-03-21 07:06:14 +00:00
Kenichi Handa
f4ac86afc5 (Finsert_file_contents): Comment modified. Give
adjust_after_replace the new arg REPLACE as 0.
1998-03-16 05:51:07 +00:00
Kenichi Handa
f8198e198d (Finsert_file_contents): Don't do position adjustments
and handling post-read-conversion here, they are done in
code_convert_region.  Even if a file is read by no-conversion,
call adjust_after_replace to adjust positions.
1998-03-12 00:38:28 +00:00
Kenichi Handa
cd913586ad (ENCODE_FILE): This macro is moved to coding.h.
(Vdefault_file_name_coding_system): New variable.
(syms_of_fileio): Defsubr it.
(Ffile_symlink_p): Use DECODE_FILE.
(Ffile_name_directory): Use size_byte member of XSTRING (filename).
(Ffile_name_as_directory): Likewise.
(Fdirectory_file_name): Likewise.
(Fsubstitute_in_file_name): Likewise.
(expand_and_dir_to_file): Likewise.
(Fdo_auto_save): Likewise.
(Fread_file_name): Likewise.
1998-03-03 07:18:46 +00:00
Kenichi Handa
8fc91a858f (Ffile_name_nondirectory): Use size_byte member of
XSTRING (filename).
1998-03-03 01:29:16 +00:00
Richard M. Stallman
de1d012702 (auto_save_1): Pass new arg to Fwrite_region.
(Fwrite_region): New arg CONFIRM.  If non-nil, confirm overwriting.
1998-03-02 19:08:05 +00:00
Kenichi Handa
55a7907fc8 (Fwrite_region): When writing a string, give byte size
to a_write.
(a_write): Handle annotations correctly when writing a string.
1998-02-20 11:14:32 +00:00
Kenichi Handa
64e0ae2a6a (Finsert_file_contents): Read a file contents into the
correct buffer (byte) position.  Adjusted for the change of
code_convert_region.
1998-02-20 01:40:47 +00:00
Richard M. Stallman
62f555a5af (Fread_file_name): Alter the history
to contain just the actual file name, and not any
other preinserted text that is not really used.
1998-02-14 08:41:32 +00:00
Richard M. Stallman
8aa3a244a3 (file_name_as_directory): For an empty name, return "/". 1998-01-27 20:07:30 +00:00
Kenichi Handa
76b233658b (Finsert_file_contents): Fix previous change. 1998-01-22 02:15:35 +00:00
Kenichi Handa
c8a6d68aed (Finsert_file_contents): Even if
enable-multibyte-characters is nil, we must check `coding:' tag
and `file-coding-system-alist' to handle eol-conversion.

(Finsert_file_contents): Adjusted for the change of
struct coding_system and function decode_coding.  For normail file
reading, use code_convert_region.
(Fwrite_region): Adjusted for the change of struct coding_system.
(e_write): Adjusted for the change of encode_coding.
1998-01-22 01:26:45 +00:00
Richard M. Stallman
418cd8ca01 (Fsubstitute_in_file_name): Use unibyte_char_to_multibyte. 1998-01-21 22:53:11 +00:00
Richard M. Stallman
1354debd3f (Finsert_file_contents): When not decoding,
properly calculate number of chars in the text.
Fix error message.

(file_name_as_directory): Error if arg is empty.
(Fwrite_region): Don't flush the encoding buffer if failure is set.
1998-01-16 18:14:58 +00:00