diff options
| -rw-r--r-- | src/fns.c | 11 |
1 files changed, 9 insertions, 2 deletions
| @@ -41,6 +41,7 @@ extern Lisp_Object Flookup_key (); | |||
| 41 | 41 | ||
| 42 | Lisp_Object Qstring_lessp, Qprovide, Qrequire; | 42 | Lisp_Object Qstring_lessp, Qprovide, Qrequire; |
| 43 | Lisp_Object Qyes_or_no_p_history; | 43 | Lisp_Object Qyes_or_no_p_history; |
| 44 | Lisp_Object Qcursor_in_echo_area; | ||
| 44 | 45 | ||
| 45 | static int internal_equal (); | 46 | static 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\ |