aboutsummaryrefslogtreecommitdiffstats
path: root/src/keyboard.c
diff options
context:
space:
mode:
authorStefan Monnier2010-10-15 17:55:33 -0400
committerStefan Monnier2010-10-15 17:55:33 -0400
commit0c747cb143fa227e78f350ac353d703f489209df (patch)
tree5b434055c797bd75eaa1e3d9d0773e586d44daee /src/keyboard.c
parenta01a7932080e8a6e7bc8472c58cefabcc2c37df3 (diff)
parentaa095b2db98ae149737f8de00ee733b1d257ed33 (diff)
downloademacs-0c747cb143fa227e78f350ac353d703f489209df.tar.gz
emacs-0c747cb143fa227e78f350ac353d703f489209df.zip
Merge from trunk
Diffstat (limited to 'src/keyboard.c')
-rw-r--r--src/keyboard.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index b77689bde06..7f770ae4df1 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -62,9 +62,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
62#include <unistd.h> 62#include <unistd.h>
63#endif 63#endif
64 64
65#ifdef HAVE_FCNTL_H
66#include <fcntl.h> 65#include <fcntl.h>
67#endif
68 66
69/* This is to get the definitions of the XK_ symbols. */ 67/* This is to get the definitions of the XK_ symbols. */
70#ifdef HAVE_X_WINDOWS 68#ifdef HAVE_X_WINDOWS
@@ -647,18 +645,6 @@ static int store_user_signal_events (void);
647static int cannot_suspend; 645static int cannot_suspend;
648 646
649 647
650/* Install the string STR as the beginning of the string of echoing,
651 so that it serves as a prompt for the next character.
652 Also start echoing. */
653
654void
655echo_prompt (Lisp_Object str)
656{
657 current_kboard->echo_string = str;
658 current_kboard->echo_after_prompt = SCHARS (str);
659 echo_now ();
660}
661
662/* Add C to the echo string, if echoing is going on. 648/* Add C to the echo string, if echoing is going on.
663 C can be a character, which is printed prettily ("M-C-x" and all that 649 C can be a character, which is printed prettily ("M-C-x" and all that
664 jazz), or a symbol, whose name is printed. */ 650 jazz), or a symbol, whose name is printed. */
@@ -757,6 +743,9 @@ echo_dash (void)
757 if (NILP (current_kboard->echo_string)) 743 if (NILP (current_kboard->echo_string))
758 return; 744 return;
759 745
746 if (this_command_key_count == 0)
747 return;
748
760 if (!current_kboard->immediate_echo 749 if (!current_kboard->immediate_echo
761 && SCHARS (current_kboard->echo_string) == 0) 750 && SCHARS (current_kboard->echo_string) == 0)
762 return; 751 return;
@@ -1786,7 +1775,8 @@ command_loop_1 (void)
1786 this_single_command_key_start = 0; 1775 this_single_command_key_start = 0;
1787 } 1776 }
1788 1777
1789 if (!NILP (current_buffer->mark_active) && !NILP (Vrun_hooks)) 1778 if (!NILP (current_buffer->mark_active)
1779 && !NILP (Vrun_hooks))
1790 { 1780 {
1791 /* In Emacs 22, setting transient-mark-mode to `only' was a 1781 /* In Emacs 22, setting transient-mark-mode to `only' was a
1792 way of turning it on for just one command. This usage is 1782 way of turning it on for just one command. This usage is
@@ -1805,6 +1795,9 @@ command_loop_1 (void)
1805 /* Even if not deactivating the mark, set PRIMARY if 1795 /* Even if not deactivating the mark, set PRIMARY if
1806 `select-active-regions' is non-nil. */ 1796 `select-active-regions' is non-nil. */
1807 if (!NILP (Fwindow_system (Qnil)) 1797 if (!NILP (Fwindow_system (Qnil))
1798 /* Even if mark_active is non-nil, the actual buffer
1799 marker may not have been set yet (Bug#7044). */
1800 && XMARKER (current_buffer->mark)->buffer
1808 && (EQ (Vselect_active_regions, Qonly) 1801 && (EQ (Vselect_active_regions, Qonly)
1809 ? EQ (CAR_SAFE (Vtransient_mark_mode), Qonly) 1802 ? EQ (CAR_SAFE (Vtransient_mark_mode), Qonly)
1810 : (!NILP (Vselect_active_regions) 1803 : (!NILP (Vselect_active_regions)
@@ -9123,7 +9116,14 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
9123 if (INTERACTIVE) 9116 if (INTERACTIVE)
9124 { 9117 {
9125 if (!NILP (prompt)) 9118 if (!NILP (prompt))
9126 echo_prompt (prompt); 9119 {
9120 /* Install the string STR as the beginning of the string of
9121 echoing, so that it serves as a prompt for the next
9122 character. */
9123 current_kboard->echo_string = prompt;
9124 current_kboard->echo_after_prompt = SCHARS (prompt);
9125 echo_now ();
9126 }
9127 else if (cursor_in_echo_area 9127 else if (cursor_in_echo_area
9128 && (FLOATP (Vecho_keystrokes) || INTEGERP (Vecho_keystrokes)) 9128 && (FLOATP (Vecho_keystrokes) || INTEGERP (Vecho_keystrokes))
9129 && NILP (Fzerop (Vecho_keystrokes))) 9129 && NILP (Fzerop (Vecho_keystrokes)))