X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fbuffer.c;h=6cbfb9cd3fa97de0676aafe9562c4ffed7dcd7ce;hb=112b4eb6a71cd613a534b4246b4cc024ed9bf22e;hp=ce9f92b1c4390367c2baed16818ee8a02cea71e4;hpb=1d9bc86590766427e2431876a50d78206a99edd5;p=chise%2Fxemacs-chise.git- diff --git a/src/buffer.c b/src/buffer.c index ce9f92b..6cbfb9c 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -2,6 +2,7 @@ Copyright (C) 1985-1989, 1992-1995 Free Software Foundation, Inc. Copyright (C) 1995 Sun Microsystems, Inc. Copyright (C) 1995, 1996 Ben Wing. + Copyright (C) 1999,2000,2001 MORIOKA Tomohiko This file is part of XEmacs. @@ -29,6 +30,7 @@ Boston, MA 02111-1307, USA. */ list per frame.) Mly: a few changes for buffer-local vars, 19.8 or 19.9. Ben Wing: some changes and cleanups for Mule, 19.12. + MORIOKA Tomohiko: some changes for XEmacs UTF-2000. */ /* This file contains functions that work with buffer objects. @@ -70,6 +72,7 @@ Boston, MA 02111-1307, USA. */ #include "buffer.h" #include "chartab.h" +#include "casetab.h" #include "commands.h" #include "elhash.h" #include "extents.h" @@ -207,8 +210,8 @@ Lisp_Object Qfind_file_compare_truenames; Lisp_Object Qswitch_to_buffer; /* Two thresholds controlling how much undo information to keep. */ -int undo_threshold; -int undo_high_threshold; +Fixnum undo_threshold; +Fixnum undo_high_threshold; int find_file_compare_truenames; int find_file_use_truenames; @@ -697,28 +700,6 @@ reset_buffer_local_variables (struct buffer *b, int first_time) } #include "bufslots.h" #undef MARKED_SLOT -#if 0 -#define STRING256_P(obj) \ - (STRINGP (obj) && XSTRING_CHAR_LENGTH (obj) == 256) - /* If the standard case table has been altered and invalidated, - fix up its insides first. */ - if (!(STRING256_P(Vascii_upcase_table) && - STRING256_P(Vascii_canon_table) && - STRING256_P(Vascii_eqv_table))) - { - Fset_standard_case_table (Vascii_downcase_table); - } - b->downcase_table = Vascii_downcase_table; - b->upcase_table = Vascii_upcase_table; - b->case_canon_table = Vascii_canon_table; - b->case_eqv_table = Vascii_eqv_table; -#ifdef MULE - b->mirror_downcase_table = Vmirror_ascii_downcase_table; - b->mirror_upcase_table = Vmirror_ascii_upcase_table; - b->mirror_case_canon_table = Vmirror_ascii_canon_table; - b->mirror_case_eqv_table = Vmirror_ascii_eqv_table; -#endif -#endif } @@ -1280,7 +1261,9 @@ with `delete-process'. /* #### This is a problem if this buffer is in a dedicated window. Need to undedicate any windows of this buffer first (and delete them?) */ - Freplace_buffer_in_windows (buf, Qnil, Qnil); + GCPRO1 (buf); + Freplace_buffer_in_windows (buf, Qnil, Qall); + UNGCPRO; font_lock_buffer_was_killed (b); @@ -2243,7 +2226,11 @@ doesn't work with hard links (nothing does). See also the variable `find-file-use-truenames'. */ ); +#if defined(CYGWIN) || defined(WIN32_NATIVE) + find_file_compare_truenames = 1; +#else find_file_compare_truenames = 0; +#endif DEFVAR_BOOL ("find-file-use-truenames", &find_file_use_truenames /* If this is true, then a buffer's visited file-name will always be @@ -2443,21 +2430,15 @@ common_init_complex_vars_of_buffer (void) defs->mode_name = QSFundamental; defs->abbrev_table = Qnil; /* real default setup by Lisp code */ - defs->downcase_table = Vascii_downcase_table; - defs->upcase_table = Vascii_upcase_table; - defs->case_canon_table = Vascii_canon_table; - defs->case_eqv_table = Vascii_eqv_table; + defs->case_table = Vstandard_case_table; #ifdef MULE - defs->mirror_downcase_table = Vmirror_ascii_downcase_table; - defs->mirror_upcase_table = Vmirror_ascii_upcase_table; - defs->mirror_case_canon_table = Vmirror_ascii_canon_table; - defs->mirror_case_eqv_table = Vmirror_ascii_eqv_table; - defs->category_table = Vstandard_category_table; #endif /* MULE */ defs->syntax_table = Vstandard_syntax_table; +#ifndef UTF2000 defs->mirror_syntax_table = XCHAR_TABLE (Vstandard_syntax_table)->mirror_table; +#endif defs->modeline_format = build_string ("%-"); /* reset in loaddefs.el */ defs->case_fold_search = Qt; defs->selective_display_ellipses = Qt; @@ -2470,6 +2451,7 @@ common_init_complex_vars_of_buffer (void) defs->auto_save_modified = 0; defs->auto_save_failure_time = -1; defs->invisibility_spec = Qt; + defs->buffer_local_face_property = 0; defs->indirect_children = Qnil; syms->indirect_children = Qnil; @@ -2515,10 +2497,7 @@ common_init_complex_vars_of_buffer (void) buffer_local_flags.generated_modeline_string = always_local_no_default; buffer_local_flags.keymap = resettable; - buffer_local_flags.downcase_table = resettable; - buffer_local_flags.upcase_table = resettable; - buffer_local_flags.case_canon_table = resettable; - buffer_local_flags.case_eqv_table = resettable; + buffer_local_flags.case_table = resettable; buffer_local_flags.syntax_table = resettable; #ifdef MULE buffer_local_flags.category_table = resettable; @@ -2592,8 +2571,8 @@ complex_vars_of_buffer (void) syms = XBUFFER (Vbuffer_local_symbols); buffer_defaults_saved_slots = &defs->BUFFER_SLOTS_FIRST_NAME; buffer_local_symbols_saved_slots = &syms->BUFFER_SLOTS_FIRST_NAME; - dumpstruct (&buffer_defaults_saved_slots, &buffer_slots_description); - dumpstruct (&buffer_local_symbols_saved_slots, &buffer_slots_description); + dump_add_root_struct_ptr (&buffer_defaults_saved_slots, &buffer_slots_description); + dump_add_root_struct_ptr (&buffer_local_symbols_saved_slots, &buffer_slots_description); DEFVAR_BUFFER_DEFAULTS ("default-modeline-format", modeline_format /* Default value of `modeline-format' for buffers that don't override it.