aboutsummaryrefslogtreecommitdiffstats
path: root/src/keyboard.c
diff options
context:
space:
mode:
authorJohn Wiegley2016-03-03 23:53:08 -0800
committerJohn Wiegley2016-03-03 23:53:08 -0800
commit692caf1e8d1657fbe4809294df6791c2879a7bb1 (patch)
tree0c6357b6325adbf0d675851d7a655ce9636b51e7 /src/keyboard.c
parent018bdf7528d0d4bb0560d86b84c21ae9fed1206a (diff)
parentb13cab683c6060e002906fc944680aaa5f4ac123 (diff)
downloademacs-692caf1e8d1657fbe4809294df6791c2879a7bb1.tar.gz
emacs-692caf1e8d1657fbe4809294df6791c2879a7bb1.zip
Merge from origin/emacs-25
b13cab6 Add a eww command to toggle paragraph direction 4e46128 * nextstep/WISHLIST: Merge into etc/TODO and remove. 9e078e5 Fix char signedness issue in bidi code 064adf6 * lib-src/pop.c (socket_connection): Fix format string. 14060a9 Avoid inflooping in thing-at-point-looking-at 098d47b * lisp/emacs-lisp/derived.el (define-derived-mode): Revert indent change. b5db8e0 etc/PROBLEMS: Mention problems with using file descriptors ec10ef9 * lisp/apropos.el (apropos-variable): Doc fix. (Bug#22813). d2dd614 Remove unneeded workaround in xftfont.c 9b7593c ; * etc/NEWS: Reflect latest changes in saveplace. fde0cd1 * lisp/saveplace.el (save-place-local-mode): New minor mode 06a872b Fix redisplay on a TTY after 'make-frame' 95f5a43 Make double-click-1 work with unbalanced parens in CC Mode. Fixes bug#5560. 7d206fc Input method polish-slash should not use keyboard translation 8be32cf Fix an assertion 040e0d6 Fix 'toggle-save-place' 5244db2 * src/keyboard.c: Don't inadvertently set immediate_echo (bug#22581)
Diffstat (limited to 'src/keyboard.c')
-rw-r--r--src/keyboard.c28
1 files changed, 18 insertions, 10 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 6535e04d826..4e1ac152a59 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -427,6 +427,15 @@ kset_system_key_syms (struct kboard *kb, Lisp_Object val)
427} 427}
428 428
429 429
430static bool
431echo_keystrokes_p (void)
432{
433 return (!cursor_in_echo_area)
434 && (FLOATP (Vecho_keystrokes) ? XFLOAT_DATA (Vecho_keystrokes) > 0.0
435 : INTEGERP (Vecho_keystrokes) ? XINT (Vecho_keystrokes) > 0
436 : false);
437}
438
430/* Add C to the echo string, without echoing it immediately. C can be 439/* Add C to the echo string, without echoing it immediately. C can be
431 a character, which is pretty-printed, or a symbol, whose name is 440 a character, which is pretty-printed, or a symbol, whose name is
432 printed. */ 441 printed. */
@@ -568,7 +577,9 @@ echo_update (void)
568static void 577static void
569echo_now (void) 578echo_now (void)
570{ 579{
571 if (!current_kboard->immediate_echo) 580 if (!current_kboard->immediate_echo
581 /* This test breaks calls that use `echo_now' to display the echo_prompt.
582 && echo_keystrokes_p () */)
572 { 583 {
573 current_kboard->immediate_echo = true; 584 current_kboard->immediate_echo = true;
574 echo_update (); 585 echo_update ();
@@ -2270,13 +2281,6 @@ read_decoded_event_from_main_queue (struct timespec *end_time,
2270 } 2281 }
2271} 2282}
2272 2283
2273static bool
2274echo_keystrokes_p (void)
2275{
2276 return (FLOATP (Vecho_keystrokes) ? XFLOAT_DATA (Vecho_keystrokes) > 0.0
2277 : INTEGERP (Vecho_keystrokes) ? XINT (Vecho_keystrokes) > 0 : false);
2278}
2279
2280/* Read a character from the keyboard; call the redisplay if needed. */ 2284/* Read a character from the keyboard; call the redisplay if needed. */
2281/* commandflag 0 means do not autosave, but do redisplay. 2285/* commandflag 0 means do not autosave, but do redisplay.
2282 -1 means do not redisplay, but do autosave. 2286 -1 means do not redisplay, but do autosave.
@@ -8889,11 +8893,15 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
8889 of echoing, so that it serves as a prompt for the next 8893 of echoing, so that it serves as a prompt for the next
8890 character. */ 8894 character. */
8891 kset_echo_prompt (current_kboard, prompt); 8895 kset_echo_prompt (current_kboard, prompt);
8896 /* FIXME: This use of echo_now doesn't look quite right and is ugly
8897 since it forces us to fiddle with current_kboard->immediate_echo
8898 before and after. */
8892 current_kboard->immediate_echo = false; 8899 current_kboard->immediate_echo = false;
8893 echo_now (); 8900 echo_now ();
8901 if (!echo_keystrokes_p ())
8902 current_kboard->immediate_echo = false;
8894 } 8903 }
8895 else if (cursor_in_echo_area 8904 else if (echo_keystrokes_p ())
8896 && echo_keystrokes_p ())
8897 /* This doesn't put in a dash if the echo buffer is empty, so 8905 /* This doesn't put in a dash if the echo buffer is empty, so
8898 you don't always see a dash hanging out in the minibuffer. */ 8906 you don't always see a dash hanging out in the minibuffer. */
8899 echo_dash (); 8907 echo_dash ();