emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] master 5b5f441: read_key_sequence: correct the handlin


From: Stefan Monnier
Subject: Re: [Emacs-diffs] master 5b5f441: read_key_sequence: correct the handling of raw_keybuf in recursive calls
Date: Mon, 20 Nov 2017 13:41:54 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> +            outer_raw_keybuf_count = raw_keybuf_count;
> +            outer_raw_keybuf = raw_keybuf;
> +            inner_raw_keybuf_count_buffer = 0;
> +            raw_keybuf_count = &inner_raw_keybuf_count_buffer;
> +            raw_keybuf = &inner_raw_keybuf_buffer;

Looks good, thanks (tho I think I would have bundled the buf and the
count into a struct, so it's clear that they're switched together).

>           /* Calling read_char with COMMANDFLAG = -2 avoids
>              redisplay in read_char and its subroutines.  */
>           key = read_char (prevent_redisplay ? -2 : NILP (prompt),
>                            current_binding, last_nonmenu_event,
>                               &used_mouse_menu, NULL);
> +            raw_keybuf_count = outer_raw_keybuf_count;
> +            raw_keybuf = outer_raw_keybuf;

But here I worry: what if `read_char` exits non-locally because of
a signal or a throw?


        Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]