aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1996-02-01 16:10:41 +0000
committerRichard M. Stallman1996-02-01 16:10:41 +0000
commiteb4ffa4eb0ae6b615f5d5e60ce6809fc2816705b (patch)
tree51a32e629bd3c6b3b92f916a9270c341d776860b /src
parentd89793b7b87acd99c57a285f67d5d2cbdf996e14 (diff)
downloademacs-eb4ffa4eb0ae6b615f5d5e60ce6809fc2816705b.tar.gz
emacs-eb4ffa4eb0ae6b615f5d5e60ce6809fc2816705b.zip
(Qcursor_in_echo_area): New variable.
(syms_of_fns): Set up Lisp var. (Fy_or_n_p): Bind Qcursor_in_echo_area in case of nonlocal exit.
Diffstat (limited to 'src')
-rw-r--r--src/fns.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/fns.c b/src/fns.c
index fde5494486d..8f72c0771ea 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -41,6 +41,7 @@ extern Lisp_Object Flookup_key ();
41 41
42Lisp_Object Qstring_lessp, Qprovide, Qrequire; 42Lisp_Object Qstring_lessp, Qprovide, Qrequire;
43Lisp_Object Qyes_or_no_p_history; 43Lisp_Object Qyes_or_no_p_history;
44Lisp_Object Qcursor_in_echo_area;
44 45
45static int internal_equal (); 46static int internal_equal ();
46 47
@@ -1558,8 +1559,10 @@ Also accepts Space to mean yes, or Delete to mean no.")
1558 register int answer; 1559 register int answer;
1559 Lisp_Object xprompt; 1560 Lisp_Object xprompt;
1560 Lisp_Object args[2]; 1561 Lisp_Object args[2];
1561 int ocech = cursor_in_echo_area;
1562 struct gcpro gcpro1, gcpro2; 1562 struct gcpro gcpro1, gcpro2;
1563 int count = specpdl_ptr - specpdl;
1564
1565 specbind (Qcursor_in_echo_area, Qt);
1563 1566
1564 map = Fsymbol_value (intern ("query-replace-map")); 1567 map = Fsymbol_value (intern ("query-replace-map"));
1565 1568
@@ -1569,6 +1572,8 @@ Also accepts Space to mean yes, or Delete to mean no.")
1569 1572
1570 while (1) 1573 while (1)
1571 { 1574 {
1575
1576
1572#ifdef HAVE_MENUS 1577#ifdef HAVE_MENUS
1573 if ((NILP (last_nonmenu_event) || CONSP (last_nonmenu_event)) 1578 if ((NILP (last_nonmenu_event) || CONSP (last_nonmenu_event))
1574 && have_menus_p ()) 1579 && have_menus_p ())
@@ -1642,9 +1647,9 @@ Also accepts Space to mean yes, or Delete to mean no.")
1642 cursor_in_echo_area = -1; 1647 cursor_in_echo_area = -1;
1643 message_nolog ("%s(y or n) %c", 1648 message_nolog ("%s(y or n) %c",
1644 XSTRING (xprompt)->data, answer ? 'y' : 'n'); 1649 XSTRING (xprompt)->data, answer ? 'y' : 'n');
1645 cursor_in_echo_area = ocech;
1646 } 1650 }
1647 1651
1652 unbind_to (count, Qnil);
1648 return answer ? Qt : Qnil; 1653 return answer ? Qt : Qnil;
1649} 1654}
1650 1655
@@ -1823,6 +1828,8 @@ syms_of_fns ()
1823 staticpro (&Qrequire); 1828 staticpro (&Qrequire);
1824 Qyes_or_no_p_history = intern ("yes-or-no-p-history"); 1829 Qyes_or_no_p_history = intern ("yes-or-no-p-history");
1825 staticpro (&Qyes_or_no_p_history); 1830 staticpro (&Qyes_or_no_p_history);
1831 Qcursor_in_echo_area = intern ("cursor-in-echo-area");
1832 staticpro (&Qcursor_in_echo_area);
1826 1833
1827 DEFVAR_LISP ("features", &Vfeatures, 1834 DEFVAR_LISP ("features", &Vfeatures,
1828 "A list of symbols which are the features of the executing emacs.\n\ 1835 "A list of symbols which are the features of the executing emacs.\n\