Fix key bindings.
[bpt/emacs.git] / src / buffer.c
index db2d3d8..3d73dd7 100644 (file)
@@ -420,9 +420,13 @@ NAME should be a string which is not the name of an existing buffer.")
     }
 
   /* Give the indirect buffer markers for its narrowing.  */
-  b->pt_marker = Fpoint_marker ();
-  b->begv_marker = Fpoint_min_marker ();
-  b->zv_marker = Fpoint_max_marker ();
+  b->pt_marker = Fmake_marker ();
+  Fset_marker (b->pt_marker, make_number (BUF_PT (b)), buf);
+  b->begv_marker = Fmake_marker ();
+  Fset_marker (b->begv_marker, make_number (BUF_BEGV (b)), buf);
+  b->zv_marker = Fmake_marker ();
+  Fset_marker (b->zv_marker, make_number (BUF_ZV (b)), buf);
+
   XMARKER (b->zv_marker)->insertion_type = 1;
 
   return buf;
@@ -474,9 +478,9 @@ reset_buffer_local_variables (b)
   b->mode_name = QSFundamental;
   b->minor_modes = Qnil;
   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;
+  b->upcase_table = XCHAR_TABLE (Vascii_downcase_table)->extras[0];
+  b->case_canon_table = XCHAR_TABLE (Vascii_downcase_table)->extras[1];
+  b->case_eqv_table = XCHAR_TABLE (Vascii_downcase_table)->extras[2];
   b->buffer_file_type = Qnil;
   b->invisibility_spec = Qt;
 
@@ -1013,7 +1017,8 @@ with `delete-process'.")
 
   /* Delete any auto-save file, if we saved it in this session.  */
   if (STRINGP (b->auto_save_file_name)
-      && b->auto_save_modified != 0)
+      && b->auto_save_modified != 0
+      && SAVE_MODIFF < b->auto_save_modified)
     {
       Lisp_Object tem;
       tem = Fsymbol_value (intern ("delete-auto-save-files"));
@@ -2500,6 +2505,8 @@ BEG and END may be integers or markers.")
   beg = Fset_marker (Fmake_marker (), beg, buffer);
   end = Fset_marker (Fmake_marker (), end, buffer);
 
+  XMARKER (end)->insertion_type = 1;
+
   overlay = allocate_misc ();
   XMISCTYPE (overlay) = Lisp_Misc_Overlay;
   XOVERLAY (overlay)->start = beg;
@@ -3347,6 +3354,7 @@ init_buffer_once ()
   XSETINT (buffer_local_flags.point_before_scroll, -1);
   XSETINT (buffer_local_flags.file_truename, -1);
   XSETINT (buffer_local_flags.invisibility_spec, -1);
+  XSETFASTINT (buffer_local_flags.file_format, -1);
 
   XSETFASTINT (buffer_local_flags.mode_line_format, 1);
   XSETFASTINT (buffer_local_flags.abbrev_mode, 2);
@@ -3366,7 +3374,6 @@ init_buffer_once ()
   XSETFASTINT (buffer_local_flags.display_table, 0x2000);
   XSETFASTINT (buffer_local_flags.syntax_table, 0x8000);
   XSETFASTINT (buffer_local_flags.cache_long_line_scans, 0x10000);
-  XSETFASTINT (buffer_local_flags.file_format, 0x20000);
 #ifdef DOS_NT
   XSETFASTINT (buffer_local_flags.buffer_file_type, 0x4000);
 #endif
@@ -3715,21 +3722,22 @@ Automatically becomes buffer-local when set in any fashion.");
                     Qnil,
     "Display table that controls display of the contents of current buffer.\n\
 Automatically becomes buffer-local when set in any fashion.\n\
-The display table is a vector created with `make-display-table'.\n\
-The first 256 elements control how to display each possible text character.\n\
-Each value should be a vector of characters or nil;\n\
+The display table is a char-table created with `make-display-table'.\n\
+The ordinary char-table elements control how to display each possible text\n\
+character.  Each value should be a vector of characters or nil;\n\
 nil means display the character in the default fashion.\n\
-The remaining six elements control the display of\n\
-  the end of a truncated screen line (element 256, a single character);\n\
-  the end of a continued line (element 257, a single character);\n\
+There are six extra slots to control the display of\n\
+  the end of a truncated screen line (extra-slot 0, a single character);\n\
+  the end of a continued line (extra-slot 1, a single character);\n\
   the escape character used to display character codes in octal\n\
-    (element 258, a single character);\n\
-  the character used as an arrow for control characters (element 259,\n\
+    (extra-slot 2, a single character);\n\
+  the character used as an arrow for control characters (extra-slot 3,\n\
     a single character);\n\
-  the decoration indicating the presence of invisible lines (element 260,\n\
+  the decoration indicating the presence of invisible lines (extra-slot 4,\n\
     a vector of characters);\n\
   the character used to draw the border between side-by-side windows\n\
-    (element 261, a single character).\n\
+    (extra-slot 5, a single character).\n\
+See also the functions `display-table-slot' and `set-display-table-slot'.\n\
 If this variable is nil, the value of `standard-display-table' is used.\n\
 Each window can have its own, overriding display table.");
 #endif