diff options
| author | Joakim Verona | 2012-08-15 21:49:40 +0200 |
|---|---|---|
| committer | Joakim Verona | 2012-08-15 21:49:40 +0200 |
| commit | b648c26ec642a1dc58c0bd7e59d6011b964dbe37 (patch) | |
| tree | f0f3b38ffa9054702f475fc53622e28da14f97b1 /src/keymap.c | |
| parent | c8b0fc1999006af5a4317b44068fac13d9592143 (diff) | |
| parent | 94c9ece10275f8ca9323c38f93607f1046035c79 (diff) | |
| download | emacs-b648c26ec642a1dc58c0bd7e59d6011b964dbe37.tar.gz emacs-b648c26ec642a1dc58c0bd7e59d6011b964dbe37.zip | |
upstream
Diffstat (limited to 'src/keymap.c')
| -rw-r--r-- | src/keymap.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/keymap.c b/src/keymap.c index ed8542249e5..c550b37c1d6 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -1560,8 +1560,8 @@ like in the respective argument of `key-binding'. */) | |||
| 1560 | window = POSN_WINDOW (position); | 1560 | window = POSN_WINDOW (position); |
| 1561 | 1561 | ||
| 1562 | if (WINDOWP (window) | 1562 | if (WINDOWP (window) |
| 1563 | && BUFFERP (WVAR (XWINDOW (window), buffer)) | 1563 | && BUFFERP (XWINDOW (window)->buffer) |
| 1564 | && XBUFFER (WVAR (XWINDOW (window), buffer)) != current_buffer) | 1564 | && XBUFFER (XWINDOW (window)->buffer) != current_buffer) |
| 1565 | { | 1565 | { |
| 1566 | /* Arrange to go back to the original buffer once we're done | 1566 | /* Arrange to go back to the original buffer once we're done |
| 1567 | processing the key sequence. We don't use | 1567 | processing the key sequence. We don't use |
| @@ -1573,7 +1573,7 @@ like in the respective argument of `key-binding'. */) | |||
| 1573 | 1573 | ||
| 1574 | record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); | 1574 | record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); |
| 1575 | 1575 | ||
| 1576 | set_buffer_internal (XBUFFER (WVAR (XWINDOW (window), buffer))); | 1576 | set_buffer_internal (XBUFFER (XWINDOW (window)->buffer)); |
| 1577 | } | 1577 | } |
| 1578 | } | 1578 | } |
| 1579 | 1579 | ||
| @@ -1854,7 +1854,7 @@ If KEYMAP is nil, that means no local keymap. */) | |||
| 1854 | if (!NILP (keymap)) | 1854 | if (!NILP (keymap)) |
| 1855 | keymap = get_keymap (keymap, 1, 1); | 1855 | keymap = get_keymap (keymap, 1, 1); |
| 1856 | 1856 | ||
| 1857 | BVAR (current_buffer, keymap) = keymap; | 1857 | BSET (current_buffer, keymap, keymap); |
| 1858 | 1858 | ||
| 1859 | return Qnil; | 1859 | return Qnil; |
| 1860 | } | 1860 | } |
| @@ -2069,7 +2069,7 @@ The `kbd' macro is an approximate inverse of this. */) | |||
| 2069 | size += XINT (Flength (prefix)); | 2069 | size += XINT (Flength (prefix)); |
| 2070 | 2070 | ||
| 2071 | /* This has one extra element at the end that we don't pass to Fconcat. */ | 2071 | /* This has one extra element at the end that we don't pass to Fconcat. */ |
| 2072 | if (min (PTRDIFF_MAX, SIZE_MAX) / sizeof (Lisp_Object) / 4 < size) | 2072 | if (min (PTRDIFF_MAX, SIZE_MAX) / word_size / 4 < size) |
| 2073 | memory_full (SIZE_MAX); | 2073 | memory_full (SIZE_MAX); |
| 2074 | SAFE_ALLOCA_LISP (args, size * 4); | 2074 | SAFE_ALLOCA_LISP (args, size * 4); |
| 2075 | 2075 | ||
| @@ -2304,11 +2304,10 @@ around function keys and event symbols. */) | |||
| 2304 | { | 2304 | { |
| 2305 | if (NILP (no_angles)) | 2305 | if (NILP (no_angles)) |
| 2306 | { | 2306 | { |
| 2307 | char *buffer; | ||
| 2308 | Lisp_Object result; | 2307 | Lisp_Object result; |
| 2309 | USE_SAFE_ALLOCA; | 2308 | USE_SAFE_ALLOCA; |
| 2310 | SAFE_ALLOCA (buffer, char *, | 2309 | char *buffer = SAFE_ALLOCA (sizeof "<>" |
| 2311 | sizeof "<>" + SBYTES (SYMBOL_NAME (key))); | 2310 | + SBYTES (SYMBOL_NAME (key))); |
| 2312 | esprintf (buffer, "<%s>", SDATA (SYMBOL_NAME (key))); | 2311 | esprintf (buffer, "<%s>", SDATA (SYMBOL_NAME (key))); |
| 2313 | result = build_string (buffer); | 2312 | result = build_string (buffer); |
| 2314 | SAFE_FREE (); | 2313 | SAFE_FREE (); |