[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: crash when function-key-map is nil
From: |
Richard Stallman |
Subject: |
Re: crash when function-key-map is nil |
Date: |
Mon, 31 Jul 2006 00:39:02 -0400 |
If function-key-map is nil but key-translation-map is not then further
down uninitialised values of keybuf are scanned (fkey.start = 31):
Does this patch fix it?
*** keyboard.c 27 Jul 2006 23:33:39 -0400 1.862
--- keyboard.c 30 Jul 2006 17:46:49 -0400
***************
*** 8381,8387 ****
such as Vfunction_key_map and Vkey_translation_map. */
typedef struct keyremap
{
! Lisp_Object map, parent;
int start, end;
} keyremap;
--- 8381,8395 ----
such as Vfunction_key_map and Vkey_translation_map. */
typedef struct keyremap
{
! /* This is the map originally specified for this use. */
! Lisp_Object parent;
! /* This is a submap reached by looking up, in PARENT,
! the events from START to END. */
! Lisp_Object map;
! /* Positions [START, END) in the key sequence buffer
! are the key that we have scanned so far.
! Those events are the ones that we will replace
! if PAREHT maps them into a key sequence. */
int start, end;
} keyremap;
***************
*** 8454,8460 ****
Lisp_Object next, key;
key = keybuf[fkey->end++];
! next = access_keymap_keyremap (fkey->map, key, prompt, doit);
/* If keybuf[fkey->start..fkey->end] is bound in the
map and we're in a position to do the key remapping, replace it with
--- 8462,8472 ----
Lisp_Object next, key;
key = keybuf[fkey->end++];
!
! if (KEYMAPP (fkey->parent))
! next = access_keymap_keyremap (fkey->map, key, prompt, doit);
! else
! next = Qnil;
/* If keybuf[fkey->start..fkey->end] is bound in the
map and we're in a position to do the key remapping, replace it with
***************
*** 8652,8659 ****
delayed_switch_frame = Qnil;
fkey.map = fkey.parent = Vfunction_key_map;
keytran.map = keytran.parent = Vkey_translation_map;
! /* If there is no translation-map, turn off scanning. */
! fkey.start = fkey.end = KEYMAPP (fkey.map) ? 0 : bufsize + 1;
keytran.start = keytran.end = KEYMAPP (keytran.map) ? 0 : bufsize + 1;
if (INTERACTIVE)
--- 8664,8670 ----
delayed_switch_frame = Qnil;
fkey.map = fkey.parent = Vfunction_key_map;
keytran.map = keytran.parent = Vkey_translation_map;
! fkey.start = fkey.end = 0;
keytran.start = keytran.end = KEYMAPP (keytran.map) ? 0 : bufsize + 1;
if (INTERACTIVE)
- crash when function-key-map is nil, Johan Bockgård, 2006/07/24
- Re: crash when function-key-map is nil, Richard Stallman, 2006/07/24
- Re: crash when function-key-map is nil, Johan Bockgård, 2006/07/25
- Re: crash when function-key-map is nil, Richard Stallman, 2006/07/25
- Re: crash when function-key-map is nil, Johan Bockgård, 2006/07/25
- Re: crash when function-key-map is nil, Richard Stallman, 2006/07/26
- Re: crash when function-key-map is nil, Johan Bockgård, 2006/07/26
- Re: crash when function-key-map is nil, Richard Stallman, 2006/07/27
- Re: crash when function-key-map is nil, Nick Roberts, 2006/07/28
- Re: crash when function-key-map is nil,
Richard Stallman <=
- Re: crash when function-key-map is nil, Nick Roberts, 2006/07/31
- Re: crash when function-key-map is nil, Richard Stallman, 2006/07/31
- Re: crash when function-key-map is nil, Nick Roberts, 2006/07/31