[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Proposal: emulation-mode-map-alist
From: |
Stefan Monnier |
Subject: |
Re: Proposal: emulation-mode-map-alist |
Date: |
Thu, 08 Nov 2001 18:13:23 -0500 |
> read_key_sequence. It is definitely desirable for read_key_sequence
> to be able to function without allocating memory, since many simple
> commands can execute without allocating any (in simple situations).
I was actually thinking of correctness rather than efficiency.
More specifically, I was referring to the following comment in
keymap.c (which I still haven't really understood, by the way):
If we used xrealloc/xmalloc and ran out of memory, they would throw
back to the command loop, which would try to read a key sequence,
which would call this function again, resulting in an infinite
loop. Instead, we'll use realloc/malloc and silently truncate the
list, let the key sequence be read, and hope some other piece of
code signals the error. */
The reason why I don't understand it is because read_key_sequence
seems to do memory allocation just fine (for example inside access_keymap
since it might run any elisp code), so it seems that it's only dangerous
in some portion of the function.
But then I'm wondering exactly during which part of read_key_sequence
is it dangerous to use xmalloc.
Stefan
- Proposal: emulation-mode-map-alist, Kim F. Storm, 2001/11/06
- Re: Proposal: emulation-mode-map-alist, Richard Stallman, 2001/11/07
- Re: Proposal: emulation-mode-map-alist, Kim F. Storm, 2001/11/07
- Re: Proposal: emulation-mode-map-alist, Stefan Monnier, 2001/11/07
- Re: Proposal: emulation-mode-map-alist, Kim F. Storm, 2001/11/07
- Re: Proposal: emulation-mode-map-alist, Stefan Monnier, 2001/11/07
- Re: Proposal: emulation-mode-map-alist, Richard Stallman, 2001/11/08
- Re: Proposal: emulation-mode-map-alist,
Stefan Monnier <=
- Re: Proposal: emulation-mode-map-alist, Richard Stallman, 2001/11/09
- Re: Proposal: emulation-mode-map-alist, Richard Stallman, 2001/11/11
- Re: Proposal: emulation-mode-map-alist, Kim F. Storm, 2001/11/11
- Re: Proposal: emulation-mode-map-alist, Richard Stallman, 2001/11/12