From e112cc3727670af0514df84f372e4d640d52ed20 Mon Sep 17 00:00:00 2001 From: Enami Tsugutomo Date: Tue, 25 Oct 2011 12:27:47 +0800 Subject: * sysdep.c (init_sys_modes): Fix the check for the controlling terminal. Fixes: debbugs:6649 --- src/ChangeLog | 5 +++++ src/sysdep.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 3f9b5beeab6..cee48bd1731 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-10-25 Enami Tsugutomo + + * sysdep.c (init_sys_modes): Fix the check for the controlling + terminal (Bug#6649). + 2011-10-20 Eli Zaretskii * dispextern.h (struct bidi_it): New member next_en_type. diff --git a/src/sysdep.c b/src/sysdep.c index b0d5a1abbe3..d666f8dbb79 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -854,6 +854,7 @@ void init_sys_modes (struct tty_display_info *tty_out) { struct emacs_tty tty; + Lisp_Object terminal; Vtty_erase_char = Qnil; @@ -907,7 +908,9 @@ init_sys_modes (struct tty_display_info *tty_out) tty.main.c_cflag &= ~PARENB;/* Don't check parity */ } #endif - if (tty_out->input == stdin) + + XSETTERMINAL(terminal, tty_out->terminal); + if (!NILP (Fcontrolling_tty_p (terminal))) { tty.main.c_cc[VINTR] = quit_char; /* C-g (usually) gives SIGINT */ /* Set up C-g for both SIGQUIT and SIGINT. -- cgit v1.2.1 From e6346438e26069017f0eb5e1b15c53c30587462e Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 25 Oct 2011 08:54:04 -0400 Subject: Make function-key-map apply when key is bound to `undefined'. * src/keyboard.c (test_undefined): New function. (read_key_sequence): Use it to detect when a key is bound to `undefined'. Fixes: debbugs:9751 --- src/ChangeLog | 5 +++++ src/keyboard.c | 16 ++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index cee48bd1731..52581be2863 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-10-25 Stefan Monnier + + * keyboard.c (test_undefined): New function (bug#9751). + (read_key_sequence): Use it to detect when a key is bound to `undefined'. + 2011-10-25 Enami Tsugutomo * sysdep.c (init_sys_modes): Fix the check for the controlling diff --git a/src/keyboard.c b/src/keyboard.c index 6f3bfd8c1e7..eb316947dcb 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -8902,6 +8902,14 @@ keyremap_step (Lisp_Object *keybuf, int bufsize, volatile keyremap *fkey, return 0; } +static int +test_undefined (Lisp_Object binding) +{ + return (EQ (binding, Qundefined) + || (!NILP (binding) && SYMBOLP (binding) + && EQ (Fcommand_remapping (binding, Qnil, Qnil), Qundefined))); +} + /* Read a sequence of keys that ends with a non prefix character, storing it in KEYBUF, a buffer of size BUFSIZE. Prompt with PROMPT. @@ -9852,7 +9860,9 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, } } - if (first_binding < nmaps && NILP (submaps[first_binding]) + if (first_binding < nmaps + && NILP (submaps[first_binding]) + && !test_undefined (defs[first_binding]) && indec.start >= t) /* There is a binding and it's not a prefix. (and it doesn't have any input-decode-map translation pending). @@ -9879,7 +9889,9 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, /* If there's a binding (i.e. first_binding >= nmaps) we don't want to apply this function-key-mapping. */ - fkey.end + 1 == t && first_binding >= nmaps, + fkey.end + 1 == t + && (first_binding >= nmaps + || test_undefined (defs[first_binding])), &diff, prompt); UNGCPRO; if (done) -- cgit v1.2.1 From fe0055fa74c94ba1d3bbdf36cffd3d28ffe95158 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 25 Oct 2011 09:36:20 -0700 Subject: * dispextern.h (Fcontrolling_tty_p): New decl (Bug#6649 part 2). --- src/ChangeLog | 4 ++++ src/dispextern.h | 1 + 2 files changed, 5 insertions(+) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 52581be2863..854c4987be5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2011-10-25 Paul Eggert + + * dispextern.h (Fcontrolling_tty_p): New decl (Bug#6649 part 2). + 2011-10-25 Stefan Monnier * keyboard.c (test_undefined): New function (bug#9751). diff --git a/src/dispextern.h b/src/dispextern.h index dd5f67d2d10..5c60a5499da 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -3346,6 +3346,7 @@ extern int tty_capable_p (struct tty_display_info *, unsigned, unsigned long, un extern void set_tty_color_mode (struct tty_display_info *, struct frame *); extern struct terminal *get_named_tty (const char *); EXFUN (Ftty_type, 1); +EXFUN (Fcontrolling_tty_p, 1); extern void create_tty_output (struct frame *); extern struct terminal *init_tty (const char *, const char *, int); extern void tty_append_glyph (struct it *); -- cgit v1.2.1 From 71d4c2a518e58b37f42c0d57e5c0507af5792133 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 25 Oct 2011 21:18:13 -0400 Subject: * lisp/progmodes/octave-*.el: Update maintainer. --- src/intervals.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src') diff --git a/src/intervals.c b/src/intervals.c index 2063655cdb9..1f3f8cf793e 100644 --- a/src/intervals.c +++ b/src/intervals.c @@ -1723,8 +1723,6 @@ graft_intervals_into_buffer (INTERVAL source, EMACS_INT position, BUF_INTERVALS (buffer)->position = BEG; BUF_INTERVALS (buffer)->up_obj = 1; - /* Explicitly free the old tree here? */ - return; } -- cgit v1.2.1