]> code.delx.au - gnu-emacs/blobdiff - src/keymap.c
Separate read and write access to Lisp_Object slots of Lisp_Process.
[gnu-emacs] / src / keymap.c
index 6cc7670054260c68cfa544fe8c26d3b330786942..a0a3528513158e6271fb38e1fb8115c35513d4b3 100644 (file)
@@ -1560,8 +1560,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 (WGET (XWINDOW (window), buffer))
+         && XBUFFER (WGET (XWINDOW (window), buffer)) != current_buffer)
        {
          /* Arrange to go back to the original buffer once we're done
             processing the key sequence.  We don't use
@@ -1573,7 +1573,7 @@ like in the respective argument of `key-binding'. */)
 
          record_unwind_protect (Fset_buffer, Fcurrent_buffer ());
 
-         set_buffer_internal (XBUFFER (XWINDOW (window)->buffer));
+         set_buffer_internal (XBUFFER (WGET (XWINDOW (window), buffer)));
        }
     }
 
@@ -2069,7 +2069,7 @@ The `kbd' macro is an approximate inverse of this.  */)
     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) / sizeof (Lisp_Object) / 4 < size)
+  if (min (PTRDIFF_MAX, SIZE_MAX) / word_size / 4 < size)
     memory_full (SIZE_MAX);
   SAFE_ALLOCA_LISP (args, size * 4);
 
@@ -2141,7 +2141,7 @@ The `kbd' macro is an approximate inverse of this.  */)
                continue;
            }
          else
-           XSETINT (key, (XINT (key) | meta_modifier) & ~0x80);
+           XSETINT (key, XINT (key) | meta_modifier);
          add_meta = 0;
        }
       else if (EQ (key, meta_prefix_char))
@@ -2304,11 +2304,10 @@ around function keys and event symbols.  */)
     {
       if (NILP (no_angles))
        {
-         char *buffer;
          Lisp_Object result;
          USE_SAFE_ALLOCA;
-         SAFE_ALLOCA (buffer, char *,
-                      sizeof "<>" + SBYTES (SYMBOL_NAME (key)));
+         char *buffer = SAFE_ALLOCA (sizeof "<>"
+                                     + SBYTES (SYMBOL_NAME (key)));
          esprintf (buffer, "<%s>", SDATA (SYMBOL_NAME (key)));
          result = build_string (buffer);
          SAFE_FREE ();