aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-10-25 16:01:16 -0700
committerPaul Eggert2011-10-25 16:01:16 -0700
commitf0ecbca80a004824d74ca9bc8b77cc94b2489b34 (patch)
tree1bce01242894a7840910731adc5b76c99f8e6c89 /src
parenta14e15687ce2e0a02e27bf85f70b3d9c7dfdf850 (diff)
parent507ea2587e3b868468e83ff6bc8b3303c4097984 (diff)
downloademacs-f0ecbca80a004824d74ca9bc8b77cc94b2489b34.tar.gz
emacs-f0ecbca80a004824d74ca9bc8b77cc94b2489b34.zip
Merge from trunk.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog16
-rw-r--r--src/dispextern.h1
-rw-r--r--src/keyboard.c16
-rw-r--r--src/sysdep.c5
4 files changed, 34 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 46c22caeea9..fb0057770e6 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,4 +1,4 @@
12011-10-24 Paul Eggert <eggert@cs.ucla.edu> 12011-10-25 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 Fix integer width and related bugs. 3 Fix integer width and related bugs.
4 * alloc.c (pure_bytes_used_lisp, pure_bytes_used_non_lisp): 4 * alloc.c (pure_bytes_used_lisp, pure_bytes_used_non_lisp):
@@ -788,6 +788,20 @@
788 rather than rolling our own approximation. 788 rather than rolling our own approximation.
789 (SCROLL_BAR_VEC_SIZE): Remove; not used. 789 (SCROLL_BAR_VEC_SIZE): Remove; not used.
790 790
7912011-10-25 Paul Eggert <eggert@cs.ucla.edu>
792
793 * dispextern.h (Fcontrolling_tty_p): New decl (Bug#6649 part 2).
794
7952011-10-25 Stefan Monnier <monnier@iro.umontreal.ca>
796
797 * keyboard.c (test_undefined): New function (bug#9751).
798 (read_key_sequence): Use it to detect when a key is bound to `undefined'.
799
8002011-10-25 Enami Tsugutomo <tsugutomo.enami@jp.sony.com>
801
802 * sysdep.c (init_sys_modes): Fix the check for the controlling
803 terminal (Bug#6649).
804
7912011-10-20 Eli Zaretskii <eliz@gnu.org> 8052011-10-20 Eli Zaretskii <eliz@gnu.org>
792 806
793 * dispextern.h (struct bidi_it): New member next_en_type. 807 * dispextern.h (struct bidi_it): New member next_en_type.
diff --git a/src/dispextern.h b/src/dispextern.h
index 5f2c844b58d..b1c3d6237c9 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
3346extern void set_tty_color_mode (struct tty_display_info *, struct frame *); 3346extern void set_tty_color_mode (struct tty_display_info *, struct frame *);
3347extern struct terminal *get_named_tty (const char *); 3347extern struct terminal *get_named_tty (const char *);
3348EXFUN (Ftty_type, 1); 3348EXFUN (Ftty_type, 1);
3349EXFUN (Fcontrolling_tty_p, 1);
3349extern void create_tty_output (struct frame *); 3350extern void create_tty_output (struct frame *);
3350extern struct terminal *init_tty (const char *, const char *, int); 3351extern struct terminal *init_tty (const char *, const char *, int);
3351extern void tty_append_glyph (struct it *); 3352extern void tty_append_glyph (struct it *);
diff --git a/src/keyboard.c b/src/keyboard.c
index 3ff0e82440b..f5a3ef07829 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -8907,6 +8907,14 @@ keyremap_step (Lisp_Object *keybuf, int bufsize, volatile keyremap *fkey,
8907 return 0; 8907 return 0;
8908} 8908}
8909 8909
8910static int
8911test_undefined (Lisp_Object binding)
8912{
8913 return (EQ (binding, Qundefined)
8914 || (!NILP (binding) && SYMBOLP (binding)
8915 && EQ (Fcommand_remapping (binding, Qnil, Qnil), Qundefined)));
8916}
8917
8910/* Read a sequence of keys that ends with a non prefix character, 8918/* Read a sequence of keys that ends with a non prefix character,
8911 storing it in KEYBUF, a buffer of size BUFSIZE. 8919 storing it in KEYBUF, a buffer of size BUFSIZE.
8912 Prompt with PROMPT. 8920 Prompt with PROMPT.
@@ -9857,7 +9865,9 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
9857 } 9865 }
9858 } 9866 }
9859 9867
9860 if (first_binding < nmaps && NILP (submaps[first_binding]) 9868 if (first_binding < nmaps
9869 && NILP (submaps[first_binding])
9870 && !test_undefined (defs[first_binding])
9861 && indec.start >= t) 9871 && indec.start >= t)
9862 /* There is a binding and it's not a prefix. 9872 /* There is a binding and it's not a prefix.
9863 (and it doesn't have any input-decode-map translation pending). 9873 (and it doesn't have any input-decode-map translation pending).
@@ -9884,7 +9894,9 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
9884 /* If there's a binding (i.e. 9894 /* If there's a binding (i.e.
9885 first_binding >= nmaps) we don't want 9895 first_binding >= nmaps) we don't want
9886 to apply this function-key-mapping. */ 9896 to apply this function-key-mapping. */
9887 fkey.end + 1 == t && first_binding >= nmaps, 9897 fkey.end + 1 == t
9898 && (first_binding >= nmaps
9899 || test_undefined (defs[first_binding])),
9888 &diff, prompt); 9900 &diff, prompt);
9889 UNGCPRO; 9901 UNGCPRO;
9890 if (done) 9902 if (done)
diff --git a/src/sysdep.c b/src/sysdep.c
index d2ce5a8cc1b..efc627e80b7 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -854,6 +854,7 @@ void
854init_sys_modes (struct tty_display_info *tty_out) 854init_sys_modes (struct tty_display_info *tty_out)
855{ 855{
856 struct emacs_tty tty; 856 struct emacs_tty tty;
857 Lisp_Object terminal;
857 858
858 Vtty_erase_char = Qnil; 859 Vtty_erase_char = Qnil;
859 860
@@ -907,7 +908,9 @@ init_sys_modes (struct tty_display_info *tty_out)
907 tty.main.c_cflag &= ~PARENB;/* Don't check parity */ 908 tty.main.c_cflag &= ~PARENB;/* Don't check parity */
908 } 909 }
909#endif 910#endif
910 if (tty_out->input == stdin) 911
912 XSETTERMINAL(terminal, tty_out->terminal);
913 if (!NILP (Fcontrolling_tty_p (terminal)))
911 { 914 {
912 tty.main.c_cc[VINTR] = quit_char; /* C-g (usually) gives SIGINT */ 915 tty.main.c_cc[VINTR] = quit_char; /* C-g (usually) gives SIGINT */
913 /* Set up C-g for both SIGQUIT and SIGINT. 916 /* Set up C-g for both SIGQUIT and SIGINT.