Use UTF-8 for most files with non-ASCII characters.
[bpt/emacs.git] / src / keymap.c
index 922c170..e759214 100644 (file)
@@ -565,7 +565,8 @@ map_keymap_char_table_item (Lisp_Object args, Lisp_Object key, Lisp_Object val)
 {
   if (!NILP (val))
     {
-      map_keymap_function_t fun = XSAVE_POINTER (args, 0);
+      map_keymap_function_t fun
+       = (map_keymap_function_t) XSAVE_POINTER (args, 0);
       /* If the key is a range, make a copy since map_char_table modifies
         it in place.  */
       if (CONSP (key))
@@ -610,7 +611,8 @@ map_keymap_internal (Lisp_Object map,
        }
       else if (CHAR_TABLE_P (binding))
        map_char_table (map_keymap_char_table_item, Qnil, binding,
-                       make_save_value ("ppo", fun, data, args));
+                       make_save_value (SAVE_TYPE_PTR_PTR_OBJ,
+                                        fun, data, args));
     }
   UNGCPRO;
   return tail;
@@ -1554,8 +1556,8 @@ like in the respective argument of `key-binding'.  */)
       window = POSN_WINDOW (position);
 
       if (WINDOWP (window)
-         && BUFFERP (XWINDOW (window)->buffer)
-         && XBUFFER (XWINDOW (window)->buffer) != current_buffer)
+         && BUFFERP (XWINDOW (window)->contents)
+         && XBUFFER (XWINDOW (window)->contents) != current_buffer)
        {
          /* Arrange to go back to the original buffer once we're done
             processing the key sequence.  We don't use
@@ -1565,7 +1567,7 @@ like in the respective argument of `key-binding'.  */)
             things the same.
          */
          record_unwind_current_buffer ();
-         set_buffer_internal (XBUFFER (XWINDOW (window)->buffer));
+         set_buffer_internal (XBUFFER (XWINDOW (window)->contents));
        }
     }
 
@@ -2061,7 +2063,7 @@ For an approximate inverse of this, see `kbd'.  */)
     size += XINT (Flength (prefix));
 
   /* This has one extra element at the end that we don't pass to Fconcat.  */
-  if (min (PTRDIFF_MAX, SIZE_MAX) / word_size / 4 < size)
+  if (size > min (PTRDIFF_MAX, SIZE_MAX) / word_size / 4)
     memory_full (SIZE_MAX);
   SAFE_ALLOCA_LISP (args, size * 4);
 
@@ -2310,7 +2312,6 @@ around function keys and event symbols.  */)
     return Fcopy_sequence (key);
   else
     error ("KEY must be an integer, cons, symbol, or string");
-  return Qnil;
 }
 
 static char *