comparison src/buffer.c @ 380:8626e4521993 r21-2-5

Import from CVS: tag r21-2-5
author cvs
date Mon, 13 Aug 2007 11:07:10 +0200
parents 6240c7796c7a
children 4af0ddfb7c5b
comparison
equal deleted inserted replaced
379:76b7d63099ad 380:8626e4521993
78 #include "insdel.h" 78 #include "insdel.h"
79 #include "process.h" /* for kill_buffer_processes */ 79 #include "process.h" /* for kill_buffer_processes */
80 #ifdef REGION_CACHE_NEEDS_WORK 80 #ifdef REGION_CACHE_NEEDS_WORK
81 #include "region-cache.h" 81 #include "region-cache.h"
82 #endif 82 #endif
83 #include "specifier.h"
83 #include "syntax.h" 84 #include "syntax.h"
84 #include "sysdep.h" /* for getwd */ 85 #include "sysdep.h" /* for getwd */
85 #include "window.h" 86 #include "window.h"
86 87
87 #include "sysfile.h" 88 #include "sysfile.h"
225 /* Truncate undo information. */ 226 /* Truncate undo information. */
226 buf->undo_list = truncate_undo_list (buf->undo_list, 227 buf->undo_list = truncate_undo_list (buf->undo_list,
227 undo_threshold, 228 undo_threshold,
228 undo_high_threshold); 229 undo_high_threshold);
229 230
230 #define MARKED_SLOT(x) ((markobj) (buf->x)); 231 #define MARKED_SLOT(x) ((void) (markobj (buf->x)));
231 #include "bufslots.h" 232 #include "bufslots.h"
232 #undef MARKED_SLOT 233 #undef MARKED_SLOT
233 234
234 ((markobj) (buf->extent_info)); 235 markobj (buf->extent_info);
235 if (buf->text) 236 if (buf->text)
236 ((markobj) (buf->text->line_number_cache)); 237 markobj (buf->text->line_number_cache);
237 238
238 /* Don't mark normally through the children slot. 239 /* Don't mark normally through the children slot.
239 (Actually, in this case, it doesn't matter.) */ 240 (Actually, in this case, it doesn't matter.) */
240 if (! EQ (buf->indirect_children, Qnull_pointer)) 241 if (! EQ (buf->indirect_children, Qnull_pointer))
241 mark_conses_in_list (buf->indirect_children); 242 mark_conses_in_list (buf->indirect_children);
308 If the FRAME argument is t, then the global (non-frame) ordering is 309 If the FRAME argument is t, then the global (non-frame) ordering is
309 returned instead. 310 returned instead.
310 */ 311 */
311 (frame)) 312 (frame))
312 { 313 {
313 Lisp_Object list; 314 return Fmapcar (Qcdr,
314 if (EQ (frame, Qt)) 315 EQ (frame, Qt) ? Vbuffer_alist :
315 list = Vbuffer_alist; 316 decode_frame (frame)->buffer_alist);
316 else
317 list = decode_frame (frame)->buffer_alist;
318 return Fmapcar (Qcdr, list);
319 } 317 }
320 318
321 Lisp_Object 319 Lisp_Object
322 get_buffer (Lisp_Object name, int error_if_deleted_or_does_not_exist) 320 get_buffer (Lisp_Object name, int error_if_deleted_or_does_not_exist)
323 { 321 {
433 the search will still be done on `buffer-file-name'. 431 the search will still be done on `buffer-file-name'.
434 */ 432 */
435 (filename)) 433 (filename))
436 { 434 {
437 /* This function can GC. GC checked 1997.04.06. */ 435 /* This function can GC. GC checked 1997.04.06. */
438 REGISTER Lisp_Object tail, buf, tem; 436 REGISTER Lisp_Object buf;
439 struct gcpro gcpro1; 437 struct gcpro gcpro1;
440 438
441 #ifdef I18N3 439 #ifdef I18N3
442 /* DO NOT translate the filename. */ 440 /* DO NOT translate the filename. */
443 #endif 441 #endif
474 } 472 }
475 filename = fn; 473 filename = fn;
476 NUNGCPRO; 474 NUNGCPRO;
477 } 475 }
478 476
479 LIST_LOOP (tail, Vbuffer_alist) 477 {
480 { 478 Lisp_Object elt;
481 buf = Fcdr (XCAR (tail)); 479 LIST_LOOP_2 (elt, Vbuffer_alist)
482 if (!BUFFERP (buf)) continue; 480 {
483 if (!STRINGP (XBUFFER (buf)->filename)) continue; 481 buf = Fcdr (elt);
484 tem = Fstring_equal (filename, 482 if (!BUFFERP (buf)) continue;
485 (find_file_compare_truenames 483 if (!STRINGP (XBUFFER (buf)->filename)) continue;
486 ? XBUFFER (buf)->file_truename 484 if (!NILP (Fstring_equal (filename,
487 : XBUFFER (buf)->filename)); 485 (find_file_compare_truenames
488 if (!NILP (tem)) 486 ? XBUFFER (buf)->file_truename
489 return buf; 487 : XBUFFER (buf)->filename))))
490 } 488 return buf;
489 }
490 }
491 return Qnil; 491 return Qnil;
492 } 492 }
493 493
494 494
495 static void 495 static void
577 push_buffer_alist (name, buf); 577 push_buffer_alist (name, buf);
578 578
579 init_buffer_markers (b); 579 init_buffer_markers (b);
580 580
581 b->generated_modeline_string = Fmake_string (make_int (84), make_int (' ')); 581 b->generated_modeline_string = Fmake_string (make_int (84), make_int (' '));
582 b->modeline_extent_table = make_lisp_hashtable (20, HASHTABLE_KEY_WEAK, 582 b->modeline_extent_table = make_lisp_hash_table (20, HASH_TABLE_KEY_WEAK,
583 HASHTABLE_EQ); 583 HASH_TABLE_EQ);
584 584
585 return buf; 585 return buf;
586 } 586 }
587 587
588 DEFUN ("get-buffer-create", Fget_buffer_create, 1, 1, 0, /* 588 DEFUN ("get-buffer-create", Fget_buffer_create, 1, 1, 0, /*
2012 *Non-nil means delete auto-save file when a buffer is saved or killed. 2012 *Non-nil means delete auto-save file when a buffer is saved or killed.
2013 */ ); 2013 */ );
2014 delete_auto_save_files = 1; 2014 delete_auto_save_files = 1;
2015 } 2015 }
2016 2016
2017 /* DOC is ignored because it is snagged and recorded externally 2017 /* The docstrings for DEFVAR_* are recorded externally by make-docfile. */
2018 * by make-docfile */ 2018
2019 /* Renamed from DEFVAR_PER_BUFFER because FSFmacs D_P_B takes 2019 /* Renamed from DEFVAR_PER_BUFFER because FSFmacs D_P_B takes
2020 * a bogus extra arg, which confuses an otherwise identical make-docfile.c */ 2020 a bogus extra arg, which confuses an otherwise identical make-docfile.c */
2021
2021 /* Declaring this stuff as const produces 'Cannot reinitialize' messages 2022 /* Declaring this stuff as const produces 'Cannot reinitialize' messages
2022 from SunPro C's fix-and-continue feature (a way neato feature that 2023 from SunPro C's fix-and-continue feature (a way neato feature that
2023 makes debugging unbelievably more bearable) */ 2024 makes debugging unbelievably more bearable) */
2024 #define DEFVAR_BUFFER_LOCAL(lname, field_name) do { \ 2025 #define DEFVAR_BUFFER_LOCAL_1(lname, field_name, forward_type, magicfun) do { \
2025 static CONST_IF_NOT_DEBUG struct symbol_value_forward I_hate_C \ 2026 static CONST_IF_NOT_DEBUG struct symbol_value_forward I_hate_C \
2026 = { { { symbol_value_forward_lheader_initializer, \ 2027 = { { { symbol_value_forward_lheader_initializer, \
2027 (struct lcrecord_header *) &(buffer_local_flags.field_name), 69 }, \ 2028 (struct lcrecord_header *) &(buffer_local_flags.field_name), 69 }, \
2028 SYMVAL_CURRENT_BUFFER_FORWARD }, 0 }; \ 2029 forward_type }, magicfun }; \
2029 defvar_buffer_local ((lname), &I_hate_C); \ 2030 { \
2030 } while (0) 2031 int offset = ((char *)symbol_value_forward_forward (&I_hate_C) - \
2031 2032 (char *)&buffer_local_flags); \
2032 #define DEFVAR_BUFFER_LOCAL_MAGIC(lname, field_name, magicfun) do { \ 2033 defvar_magic (lname, &I_hate_C); \
2033 static CONST_IF_NOT_DEBUG struct symbol_value_forward I_hate_C \ 2034 \
2034 = { { { symbol_value_forward_lheader_initializer, \ 2035 *((Lisp_Object *)(offset + (char *)XBUFFER (Vbuffer_local_symbols))) \
2035 (struct lcrecord_header *) &(buffer_local_flags.field_name), 69 }, \ 2036 = intern (lname); \
2036 SYMVAL_CURRENT_BUFFER_FORWARD }, magicfun }; \ 2037 } \
2037 defvar_buffer_local ((lname), &I_hate_C); \ 2038 } while (0)
2038 } while (0) 2039
2039 2040 #define DEFVAR_BUFFER_LOCAL_MAGIC(lname, field_name, magicfun) \
2040 #define DEFVAR_CONST_BUFFER_LOCAL(lname, field_name) do { \ 2041 DEFVAR_BUFFER_LOCAL_1 (lname, field_name, \
2041 static CONST_IF_NOT_DEBUG struct symbol_value_forward I_hate_C \ 2042 SYMVAL_CURRENT_BUFFER_FORWARD, magicfun)
2042 = { { { symbol_value_forward_lheader_initializer, \ 2043 #define DEFVAR_BUFFER_LOCAL(lname, field_name) \
2043 (struct lcrecord_header *) &(buffer_local_flags.field_name), 69 }, \ 2044 DEFVAR_BUFFER_LOCAL_MAGIC (lname, field_name, 0)
2044 SYMVAL_CONST_CURRENT_BUFFER_FORWARD }, 0 }; \ 2045 #define DEFVAR_CONST_BUFFER_LOCAL_MAGIC(lname, field_name, magicfun) \
2045 defvar_buffer_local ((lname), &I_hate_C); \ 2046 DEFVAR_BUFFER_LOCAL_1 (lname, field_name, \
2046 } while (0) 2047 SYMVAL_CONST_CURRENT_BUFFER_FORWARD, magicfun)
2047 2048 #define DEFVAR_CONST_BUFFER_LOCAL(lname, field_name) \
2048 #define DEFVAR_CONST_BUFFER_LOCAL_MAGIC(lname, field_name, magicfun) do{\ 2049 DEFVAR_CONST_BUFFER_LOCAL_MAGIC (lname, field_name, 0)
2049 static CONST_IF_NOT_DEBUG struct symbol_value_forward I_hate_C \ 2050
2050 = { { { symbol_value_forward_lheader_initializer, \ 2051 #define DEFVAR_BUFFER_DEFAULTS_MAGIC(lname, field_name, magicfun) \
2051 (struct lcrecord_header *) &(buffer_local_flags.field_name), 69 }, \ 2052 DEFVAR_SYMVAL_FWD (lname, &(buffer_local_flags.field_name), \
2052 SYMVAL_CONST_CURRENT_BUFFER_FORWARD }, magicfun }; \ 2053 SYMVAL_DEFAULT_BUFFER_FORWARD, magicfun)
2053 defvar_buffer_local ((lname), &I_hate_C); \ 2054 #define DEFVAR_BUFFER_DEFAULTS(lname, field_name) \
2054 } while (0) 2055 DEFVAR_BUFFER_DEFAULTS_MAGIC (lname, field_name, 0)
2055
2056 static void
2057 defvar_buffer_local (CONST char *namestring,
2058 CONST struct symbol_value_forward *m)
2059 {
2060 int offset = ((char *)symbol_value_forward_forward (m)
2061 - (char *)&buffer_local_flags);
2062
2063 defvar_mumble (namestring, m, sizeof (*m));
2064
2065 *((Lisp_Object *)(offset + (char *)XBUFFER (Vbuffer_local_symbols)))
2066 = intern (namestring);
2067 }
2068
2069 /* DOC is ignored because it is snagged and recorded externally
2070 * by make-docfile */
2071 #define DEFVAR_BUFFER_DEFAULTS(lname, field_name) do { \
2072 static CONST_IF_NOT_DEBUG struct symbol_value_forward I_hate_C \
2073 = { { { symbol_value_forward_lheader_initializer, \
2074 (struct lcrecord_header *) &(buffer_local_flags.field_name), 69 }, \
2075 SYMVAL_DEFAULT_BUFFER_FORWARD }, 0 }; \
2076 defvar_mumble ((lname), &I_hate_C, sizeof (I_hate_C)); \
2077 } while (0)
2078
2079 #define DEFVAR_BUFFER_DEFAULTS_MAGIC(lname, field_name, magicfun) do { \
2080 static CONST_IF_NOT_DEBUG struct symbol_value_forward I_hate_C \
2081 = { { { symbol_value_forward_lheader_initializer, \
2082 (struct lcrecord_header *) &(buffer_local_flags.field_name), 69 }, \
2083 SYMVAL_DEFAULT_BUFFER_FORWARD }, magicfun }; \
2084 defvar_mumble ((lname), &I_hate_C, sizeof (I_hate_C)); \
2085 } while (0)
2086 2056
2087 static void 2057 static void
2088 nuke_all_buffer_slots (struct buffer *b, Lisp_Object zap) 2058 nuke_all_buffer_slots (struct buffer *b, Lisp_Object zap)
2089 { 2059 {
2090 zero_lcrecord (b); 2060 zero_lcrecord (b);
2061
2062 b->extent_info = Qnil;
2063 b->indirect_children = Qnil;
2064 b->own_text.line_number_cache = Qnil;
2091 2065
2092 #define MARKED_SLOT(x) b->x = (zap); 2066 #define MARKED_SLOT(x) b->x = (zap);
2093 #include "bufslots.h" 2067 #include "bufslots.h"
2094 #undef MARKED_SLOT 2068 #undef MARKED_SLOT
2095 } 2069 }
2115 /* Set up the non-nil default values of various buffer slots. 2089 /* Set up the non-nil default values of various buffer slots.
2116 Must do these before making the first buffer. */ 2090 Must do these before making the first buffer. */
2117 defs->major_mode = Qfundamental_mode; 2091 defs->major_mode = Qfundamental_mode;
2118 defs->mode_name = QSFundamental; 2092 defs->mode_name = QSFundamental;
2119 defs->abbrev_table = Qnil; /* real default setup by Lisp code */ 2093 defs->abbrev_table = Qnil; /* real default setup by Lisp code */
2120 defs->downcase_table = Vascii_downcase_table; 2094
2121 defs->upcase_table = Vascii_upcase_table; 2095 defs->downcase_table = Vascii_downcase_table;
2096 defs->upcase_table = Vascii_upcase_table;
2122 defs->case_canon_table = Vascii_canon_table; 2097 defs->case_canon_table = Vascii_canon_table;
2123 defs->case_eqv_table = Vascii_eqv_table; 2098 defs->case_eqv_table = Vascii_eqv_table;
2124 #ifdef MULE 2099 #ifdef MULE
2125 defs->mirror_downcase_table = Vmirror_ascii_downcase_table; 2100 defs->mirror_downcase_table = Vmirror_ascii_downcase_table;
2126 defs->mirror_upcase_table = Vmirror_ascii_upcase_table; 2101 defs->mirror_upcase_table = Vmirror_ascii_upcase_table;
2127 defs->mirror_case_canon_table = Vmirror_ascii_canon_table; 2102 defs->mirror_case_canon_table = Vmirror_ascii_canon_table;
2128 defs->mirror_case_eqv_table = Vmirror_ascii_eqv_table; 2103 defs->mirror_case_eqv_table = Vmirror_ascii_eqv_table;
2104
2129 defs->category_table = Vstandard_category_table; 2105 defs->category_table = Vstandard_category_table;
2130 #endif /* MULE */ 2106 #endif /* MULE */
2131 defs->syntax_table = Vstandard_syntax_table; 2107 defs->syntax_table = Vstandard_syntax_table;
2132 defs->mirror_syntax_table = 2108 defs->mirror_syntax_table =
2133 XCHAR_TABLE (Vstandard_syntax_table)->mirror_table; 2109 XCHAR_TABLE (Vstandard_syntax_table)->mirror_table;
2157 * >0 is mask. Var is local if ((buffer->local_var_flags & mask) != 0) 2133 * >0 is mask. Var is local if ((buffer->local_var_flags & mask) != 0)
2158 * Otherwise default is used. 2134 * Otherwise default is used.
2159 */ 2135 */
2160 Lisp_Object always_local_no_default = make_int (0); 2136 Lisp_Object always_local_no_default = make_int (0);
2161 Lisp_Object always_local_resettable = make_int (-1); 2137 Lisp_Object always_local_resettable = make_int (-1);
2162 Lisp_Object resettable = make_int (-3); 2138 Lisp_Object resettable = make_int (-3);
2163 2139
2164 /* Assign the local-flags to the slots that have default values. 2140 /* Assign the local-flags to the slots that have default values.
2165 The local flag is a bit that is used in the buffer 2141 The local flag is a bit that is used in the buffer
2166 to say that it has its own local value for the slot. 2142 to say that it has its own local value for the slot.
2167 The local flag bits are in the local_var_flags slot of the 2143 The local flag bits are in the local_var_flags slot of the
2168 buffer. */ 2144 buffer. */
2169 2145
2170 nuke_all_buffer_slots (&buffer_local_flags, make_int (-2)); 2146 nuke_all_buffer_slots (&buffer_local_flags, make_int (-2));
2171 buffer_local_flags.filename = always_local_no_default; 2147 buffer_local_flags.filename = always_local_no_default;
2172 buffer_local_flags.directory = always_local_no_default; 2148 buffer_local_flags.directory = always_local_no_default;
2173 buffer_local_flags.backed_up = always_local_no_default; 2149 buffer_local_flags.backed_up = always_local_no_default;
2174 buffer_local_flags.saved_size = always_local_no_default; 2150 buffer_local_flags.saved_size = always_local_no_default;
2175 buffer_local_flags.auto_save_file_name = always_local_no_default; 2151 buffer_local_flags.auto_save_file_name = always_local_no_default;
2176 buffer_local_flags.read_only = always_local_no_default; 2152 buffer_local_flags.read_only = always_local_no_default;
2177 2153
2178 buffer_local_flags.major_mode = always_local_resettable; 2154 buffer_local_flags.major_mode = always_local_resettable;
2179 buffer_local_flags.mode_name = always_local_resettable; 2155 buffer_local_flags.mode_name = always_local_resettable;
2180 buffer_local_flags.undo_list = always_local_no_default; 2156 buffer_local_flags.undo_list = always_local_no_default;
2181 #if 0 /* FSFmacs */ 2157 #if 0 /* FSFmacs */
2182 buffer_local_flags.mark_active = always_local_resettable; 2158 buffer_local_flags.mark_active = always_local_resettable;
2183 #endif 2159 #endif
2184 buffer_local_flags.point_before_scroll = always_local_resettable; 2160 buffer_local_flags.point_before_scroll = always_local_resettable;
2185 buffer_local_flags.file_truename = always_local_no_default; 2161 buffer_local_flags.file_truename = always_local_no_default;
2186 buffer_local_flags.invisibility_spec = always_local_resettable; 2162 buffer_local_flags.invisibility_spec = always_local_resettable;
2187 buffer_local_flags.file_format = always_local_resettable; 2163 buffer_local_flags.file_format = always_local_resettable;
2188 buffer_local_flags.generated_modeline_string = always_local_no_default; 2164 buffer_local_flags.generated_modeline_string = always_local_no_default;
2189 2165
2190 buffer_local_flags.keymap = resettable; 2166 buffer_local_flags.keymap = resettable;
2191 buffer_local_flags.downcase_table = resettable; 2167 buffer_local_flags.downcase_table = resettable;
2192 buffer_local_flags.upcase_table = resettable; 2168 buffer_local_flags.upcase_table = resettable;
2193 buffer_local_flags.case_canon_table = resettable; 2169 buffer_local_flags.case_canon_table = resettable;
2194 buffer_local_flags.case_eqv_table = resettable; 2170 buffer_local_flags.case_eqv_table = resettable;
2195 buffer_local_flags.syntax_table = resettable; 2171 buffer_local_flags.syntax_table = resettable;
2196 #ifdef MULE 2172 #ifdef MULE
2197 buffer_local_flags.category_table = resettable; 2173 buffer_local_flags.category_table = resettable;
2198 #endif 2174 #endif
2199 2175
2200 buffer_local_flags.modeline_format = make_int (1); 2176 buffer_local_flags.modeline_format = make_int (1<<0);
2201 buffer_local_flags.abbrev_mode = make_int (2); 2177 buffer_local_flags.abbrev_mode = make_int (1<<1);
2202 buffer_local_flags.overwrite_mode = make_int (4); 2178 buffer_local_flags.overwrite_mode = make_int (1<<2);
2203 buffer_local_flags.case_fold_search = make_int (8); 2179 buffer_local_flags.case_fold_search = make_int (1<<3);
2204 buffer_local_flags.auto_fill_function = make_int (0x10); 2180 buffer_local_flags.auto_fill_function = make_int (1<<4);
2205 buffer_local_flags.selective_display = make_int (0x20); 2181 buffer_local_flags.selective_display = make_int (1<<5);
2206 buffer_local_flags.selective_display_ellipses = make_int (0x40); 2182 buffer_local_flags.selective_display_ellipses = make_int (1<<6);
2207 buffer_local_flags.tab_width = make_int (0x80); 2183 buffer_local_flags.tab_width = make_int (1<<7);
2208 buffer_local_flags.truncate_lines = make_int (0x100); 2184 buffer_local_flags.truncate_lines = make_int (1<<8);
2209 buffer_local_flags.ctl_arrow = make_int (0x200); 2185 buffer_local_flags.ctl_arrow = make_int (1<<9);
2210 buffer_local_flags.fill_column = make_int (0x400); 2186 buffer_local_flags.fill_column = make_int (1<<10);
2211 buffer_local_flags.left_margin = make_int (0x800); 2187 buffer_local_flags.left_margin = make_int (1<<11);
2212 buffer_local_flags.abbrev_table = make_int (0x1000); 2188 buffer_local_flags.abbrev_table = make_int (1<<12);
2213 #ifdef REGION_CACHE_NEEDS_WORK 2189 #ifdef REGION_CACHE_NEEDS_WORK
2214 buffer_local_flags.cache_long_line_scans = make_int (0x2000); 2190 buffer_local_flags.cache_long_line_scans = make_int (1<<13);
2215 #endif 2191 #endif
2216 #ifdef FILE_CODING 2192 #ifdef FILE_CODING
2217 buffer_local_flags.buffer_file_coding_system = make_int (0x4000); 2193 buffer_local_flags.buffer_file_coding_system = make_int (1<<14);
2218 #endif 2194 #endif
2219 2195
2220 /* #### Warning, 0x4000000 (that's six zeroes) is the largest number 2196 /* #### Warning: 1<<28 is the largest number currently allowable
2221 currently allowable due to the XINT() handling of this value. 2197 due to the XINT() handling of this value. With some
2222 With some rearrangement you can get 4 more bits. */ 2198 rearrangement you can get 3 more bits. */
2223 } 2199 }
2224 2200
2225 DEFVAR_BUFFER_DEFAULTS ("default-modeline-format", modeline_format /* 2201 DEFVAR_BUFFER_DEFAULTS ("default-modeline-format", modeline_format /*
2226 Default value of `modeline-format' for buffers that don't override it. 2202 Default value of `modeline-format' for buffers that don't override it.
2227 This is the same as (default-value 'modeline-format). 2203 This is the same as (default-value 'modeline-format).
2427 its mnemonic abbreviation. 2403 its mnemonic abbreviation.
2428 2404
2429 The default value for this variable (which is normally used for 2405 The default value for this variable (which is normally used for
2430 buffers without associated files) is also used when automatic 2406 buffers without associated files) is also used when automatic
2431 detection of a file's encoding is called for and there was no 2407 detection of a file's encoding is called for and there was no
2432 discernable encoding in the file (i.e. it was entirely or almost 2408 discernible encoding in the file (i.e. it was entirely or almost
2433 entirely ASCII). The default value should generally *not* be set to 2409 entirely ASCII). The default value should generally *not* be set to
2434 nil (equivalent to `no-conversion'), because if extended characters 2410 nil (equivalent to `no-conversion'), because if extended characters
2435 are ever inserted into the buffer, they will be lost when the file is 2411 are ever inserted into the buffer, they will be lost when the file is
2436 written out. A good choice is `iso-2022-8' (the simple ISO 2022 8-bit 2412 written out. A good choice is `iso-2022-8' (the simple ISO 2022 8-bit
2437 encoding), which will write out ASCII and Latin-1 characters in the 2413 encoding), which will write out ASCII and Latin-1 characters in the
2455 particular operation, you should bind the variable 2431 particular operation, you should bind the variable
2456 `coding-system-for-read' rather than changing the other two 2432 `coding-system-for-read' rather than changing the other two
2457 variables just mentioned, which are intended to be used for 2433 variables just mentioned, which are intended to be used for
2458 global environment specification. 2434 global environment specification.
2459 */ ); 2435 */ );
2460 #endif 2436 #endif /* FILE_CODING */
2461 2437
2462 DEFVAR_BUFFER_LOCAL ("auto-fill-function", auto_fill_function /* 2438 DEFVAR_BUFFER_LOCAL ("auto-fill-function", auto_fill_function /*
2463 Function called (if non-nil) to perform auto-fill. 2439 Function called (if non-nil) to perform auto-fill.
2464 It is called after self-inserting a space at a column beyond `fill-column'. 2440 It is called after self-inserting a space at a column beyond `fill-column'.
2465 Each buffer has its own value of this variable. 2441 Each buffer has its own value of this variable.
2742 { 2718 {
2743 initial_directory[rc] = DIRECTORY_SEP; 2719 initial_directory[rc] = DIRECTORY_SEP;
2744 initial_directory[rc + 1] = '\0'; 2720 initial_directory[rc + 1] = '\0';
2745 } 2721 }
2746 /* XEmacs change: store buffer's default directory 2722 /* XEmacs change: store buffer's default directory
2747 using prefered (i.e. as defined at compile-time) 2723 using preferred (i.e. as defined at compile-time)
2748 directory separator. --marcpa */ 2724 directory separator. --marcpa */
2749 #ifdef DOS_NT 2725 #ifdef DOS_NT
2750 #define CORRECT_DIR_SEPS(s) \ 2726 #define CORRECT_DIR_SEPS(s) \
2751 do { if ('/' == DIRECTORY_SEP) dostounix_filename (s); \ 2727 do { if ('/' == DIRECTORY_SEP) dostounix_filename (s); \
2752 else unixtodos_filename (s); \ 2728 else unixtodos_filename (s); \