Mercurial > hg > xemacs-beta
comparison src/fileio.c @ 5211:cdca98f2d36f
Move `default-file-system-ignore-case' to C; fix bug in directory hash tables
src/ChangeLog addition:
2010-05-16 Aidan Kehoe <kehoea@parhasard.net>
Move `default-file-system-ignore-case' to C; pay attention to it
in creating the directory hash tables for #'locate-file. Fix a bug
where #'eq was specified when creating directory hash tables in
dired.c.
* config.h.in (DEFAULT_FILE_SYSTEM_IGNORE_CASE): This is 1 on
Darwin.
* dired.c (make_directory_hash_table): If
#'file-system-ignore-case-p gives non-nil for a directory, created
the associated hash table with #'equalp as its test. Never use
#'eq as a directory hash table test.
* fileio.c (vars_of_fileio):
Move `default-file-system-ignore-case' here, so it can be a
constant boolean reflecting a compile-time #define.
* lisp.h: Update the declaration of make_directory_hash_table;
remove the declaration of wasteful_word_to_lisp, which was
#ifdef'd out.
* lread.c (Flocate_file): Take out a debugging statement from
this function.
(locate_file_refresh_hashing): Call make_directory_hash_table with
a Lisp string, not an Ibyte pointer.
(vars_of_lread): If DEFAULT_FILE_SYSTEM_IGNORE_CASE is defined,
use #'equalp as the hash table test for locate-file-hash-table,
not #'equal.
* s/win32-common.h (DEFAULT_FILE_SYSTEM_IGNORE_CASE):
Case should normally be ignored in file names on Win32.
lisp/ChangeLog addition:
2010-05-16 Aidan Kehoe <kehoea@parhasard.net>
* files.el (default-file-system-ignore-case):
Move this to fileio.c, where it's a constant boolean variable
initialised at dump time.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 16 May 2010 12:33:21 +0100 |
parents | bc3ede8f29a8 |
children | c096d8051f89 308d34e9f07d |
comparison
equal
deleted
inserted
replaced
5208:9fa29ec759e3 | 5211:cdca98f2d36f |
---|---|
105 int inhibit_auto_save_session; | 105 int inhibit_auto_save_session; |
106 | 106 |
107 int disable_auto_save_when_buffer_shrinks; | 107 int disable_auto_save_when_buffer_shrinks; |
108 | 108 |
109 Lisp_Object Vdirectory_sep_char; | 109 Lisp_Object Vdirectory_sep_char; |
110 | |
111 int default_file_system_ignore_case; | |
110 | 112 |
111 #ifdef HAVE_FSYNC | 113 #ifdef HAVE_FSYNC |
112 /* Nonzero means skip the call to fsync in Fwrite-region. */ | 114 /* Nonzero means skip the call to fsync in Fwrite-region. */ |
113 int write_region_inhibit_fsync; | 115 int write_region_inhibit_fsync; |
114 #endif | 116 #endif |
4558 This variable affects the built-in functions only on Windows, | 4560 This variable affects the built-in functions only on Windows, |
4559 on other platforms, it is initialized so that Lisp code can find out | 4561 on other platforms, it is initialized so that Lisp code can find out |
4560 what the normal separator is. | 4562 what the normal separator is. |
4561 */ ); | 4563 */ ); |
4562 Vdirectory_sep_char = make_char (DEFAULT_DIRECTORY_SEP); | 4564 Vdirectory_sep_char = make_char (DEFAULT_DIRECTORY_SEP); |
4565 | |
4566 DEFVAR_CONST_BOOL ("default-file-system-ignore-case", &default_file_system_ignore_case /* | |
4567 What `file-system-ignore-case-p' returns by default. | |
4568 This is in the case that nothing in `file-system-case-alist' matches. | |
4569 */ ); | |
4570 #ifdef DEFAULT_FILE_SYSTEM_IGNORE_CASE | |
4571 default_file_system_ignore_case = DEFAULT_FILE_SYSTEM_IGNORE_CASE; | |
4572 #else | |
4573 default_file_system_ignore_case = 0; | |
4574 #endif | |
4563 } | 4575 } |
4564 | 4576 |
4565 void | 4577 void |
4566 reinit_vars_of_fileio (void) | 4578 reinit_vars_of_fileio (void) |
4567 { | 4579 { |