diff options
author | Richard M. Stallman <rms@gnu.org> | 1996-02-01 16:10:41 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1996-02-01 16:10:41 +0000 |
commit | 56ae79c80b53bd7c9f7bbed597c1d78bca891ad0 (patch) | |
tree | 317ad016405e7820491ee5b34ba6604f6246a5c5 /src | |
parent | eea21c6248df188dca8856629563ccba96dcfca4 (diff) | |
download | emacs-56ae79c80b53bd7c9f7bbed597c1d78bca891ad0.tar.gz |
(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.c | 11 |
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 (); Lisp_Object Qstring_lessp, Qprovide, Qrequire; Lisp_Object Qyes_or_no_p_history; +Lisp_Object Qcursor_in_echo_area; static int internal_equal (); @@ -1558,8 +1559,10 @@ Also accepts Space to mean yes, or Delete to mean no.") register int answer; Lisp_Object xprompt; Lisp_Object args[2]; - int ocech = cursor_in_echo_area; struct gcpro gcpro1, gcpro2; + int count = specpdl_ptr - specpdl; + + specbind (Qcursor_in_echo_area, Qt); map = Fsymbol_value (intern ("query-replace-map")); @@ -1569,6 +1572,8 @@ Also accepts Space to mean yes, or Delete to mean no.") while (1) { + + #ifdef HAVE_MENUS if ((NILP (last_nonmenu_event) || CONSP (last_nonmenu_event)) && have_menus_p ()) @@ -1642,9 +1647,9 @@ Also accepts Space to mean yes, or Delete to mean no.") cursor_in_echo_area = -1; message_nolog ("%s(y or n) %c", XSTRING (xprompt)->data, answer ? 'y' : 'n'); - cursor_in_echo_area = ocech; } + unbind_to (count, Qnil); return answer ? Qt : Qnil; } @@ -1823,6 +1828,8 @@ syms_of_fns () staticpro (&Qrequire); Qyes_or_no_p_history = intern ("yes-or-no-p-history"); staticpro (&Qyes_or_no_p_history); + Qcursor_in_echo_area = intern ("cursor-in-echo-area"); + staticpro (&Qcursor_in_echo_area); DEFVAR_LISP ("features", &Vfeatures, "A list of symbols which are the features of the executing emacs.\n\ |