Mercurial > emacs
changeset 18531:35a263e545b3
(Fy_or_n_p, Fyes_or_no_p): Obey use_dialog_box.
(use_dialog_box): New variable, controls whether to use dialog boxes.
(syms_of_fns): Set up Lisp variable.
(concat): Use XCONS rather than Fcar, Fcdr--for known cons.
(Fassq, assq_no_quit, Fassoc, Frassq, Frassoc, Fdelq): Likewise.
(Fdelete, Fplist_get, mapcar1, Fmember, Fmemq): Likewise.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 02 Jul 1997 06:23:21 +0000 |
parents | 94c18a43de33 |
children | 488df9d19f5e |
files | src/fns.c |
diffstat | 1 files changed, 34 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/src/fns.c Wed Jul 02 06:20:12 1997 +0000 +++ b/src/fns.c Wed Jul 02 06:23:21 1997 +0000 @@ -40,6 +40,10 @@ #define NULL (void *)0 #endif +/* Nonzero enables use of dialog boxes for questions + asked by mouse commands. */ +int use_dialog_box; + extern Lisp_Object Flookup_key (); extern int minibuffer_auto_raise; @@ -470,7 +474,7 @@ `this' is exhausted. */ if (NILP (this)) break; if (CONSP (this)) - elt = Fcar (this), this = Fcdr (this); + elt = XCONS (this)->car, this = XCONS (this)->cdr; else { if (thisindex >= thisleni) break; @@ -657,7 +661,7 @@ Lisp_Object list; { register Lisp_Object tail; - for (tail = list; !NILP (tail); tail = Fcdr (tail)) + for (tail = list; !NILP (tail); tail = XCONS (tail)->cdr) { register Lisp_Object tem; tem = Fcar (tail); @@ -676,7 +680,7 @@ Lisp_Object list; { register Lisp_Object tail; - for (tail = list; !NILP (tail); tail = Fcdr (tail)) + for (tail = list; !NILP (tail); tail = XCONS (tail)->cdr) { register Lisp_Object tem; tem = Fcar (tail); @@ -695,12 +699,12 @@ Lisp_Object list; { register Lisp_Object tail; - for (tail = list; !NILP (tail); tail = Fcdr (tail)) + for (tail = list; !NILP (tail); tail = XCONS (tail)->cdr) { register Lisp_Object elt, tem; elt = Fcar (tail); if (!CONSP (elt)) continue; - tem = Fcar (elt); + tem = XCONS (elt)->car; if (EQ (key, tem)) return elt; QUIT; } @@ -716,12 +720,12 @@ Lisp_Object list; { register Lisp_Object tail; - for (tail = list; CONSP (tail); tail = Fcdr (tail)) + for (tail = list; CONSP (tail); tail = XCONS (tail)->cdr) { register Lisp_Object elt, tem; elt = Fcar (tail); if (!CONSP (elt)) continue; - tem = Fcar (elt); + tem = XCONS (elt)->car; if (EQ (key, tem)) return elt; } return Qnil; @@ -735,12 +739,12 @@ Lisp_Object list; { register Lisp_Object tail; - for (tail = list; !NILP (tail); tail = Fcdr (tail)) + for (tail = list; !NILP (tail); tail = XCONS (tail)->cdr) { register Lisp_Object elt, tem; elt = Fcar (tail); if (!CONSP (elt)) continue; - tem = Fequal (Fcar (elt), key); + tem = Fequal (XCONS (elt)->car, key); if (!NILP (tem)) return elt; QUIT; } @@ -755,12 +759,12 @@ Lisp_Object list; { register Lisp_Object tail; - for (tail = list; !NILP (tail); tail = Fcdr (tail)) + for (tail = list; !NILP (tail); tail = XCONS (tail)->cdr) { register Lisp_Object elt, tem; elt = Fcar (tail); if (!CONSP (elt)) continue; - tem = Fcdr (elt); + tem = XCONS (elt)->cdr; if (EQ (key, tem)) return elt; QUIT; } @@ -775,12 +779,12 @@ Lisp_Object list; { register Lisp_Object tail; - for (tail = list; !NILP (tail); tail = Fcdr (tail)) + for (tail = list; !NILP (tail); tail = XCONS (tail)->cdr) { register Lisp_Object elt, tem; elt = Fcar (tail); if (!CONSP (elt)) continue; - tem = Fequal (Fcdr (elt), key); + tem = Fequal (XCONS (elt)->cdr, key); if (!NILP (tem)) return elt; QUIT; } @@ -808,13 +812,13 @@ if (EQ (elt, tem)) { if (NILP (prev)) - list = Fcdr (tail); + list = XCONS (tail)->cdr; else - Fsetcdr (prev, Fcdr (tail)); + Fsetcdr (prev, XCONS (tail)->cdr); } else prev = tail; - tail = Fcdr (tail); + tail = XCONS (tail)->cdr; QUIT; } return list; @@ -842,13 +846,13 @@ if (! NILP (Fequal (elt, tem))) { if (NILP (prev)) - list = Fcdr (tail); + list = XCONS (tail)->cdr; else - Fsetcdr (prev, Fcdr (tail)); + Fsetcdr (prev, XCONS (tail)->cdr); } else prev = tail; - tail = Fcdr (tail); + tail = XCONS (tail)->cdr; QUIT; } return list; @@ -996,12 +1000,12 @@ register Lisp_Object prop; { register Lisp_Object tail; - for (tail = plist; !NILP (tail); tail = Fcdr (Fcdr (tail))) + for (tail = plist; !NILP (tail); tail = Fcdr (XCONS (tail)->cdr)) { register Lisp_Object tem; tem = Fcar (tail); if (EQ (prop, tem)) - return Fcar (Fcdr (tail)); + return Fcar (XCONS (tail)->cdr); } return Qnil; } @@ -1621,7 +1625,7 @@ for (i = 0; i < leni; i++) { vals[i] = call1 (fn, Fcar (tail)); - tail = Fcdr (tail); + tail = XCONS (tail)->cdr; } } @@ -1714,6 +1718,7 @@ #ifdef HAVE_MENUS if ((NILP (last_nonmenu_event) || CONSP (last_nonmenu_event)) + && use_dialog_box && have_menus_p ()) { Lisp_Object pane, menu; @@ -1832,6 +1837,7 @@ #ifdef HAVE_MENUS if ((NILP (last_nonmenu_event) || CONSP (last_nonmenu_event)) + && use_dialog_box && have_menus_p ()) { Lisp_Object pane, menu, obj; @@ -1985,6 +1991,12 @@ Used by `featurep' and `require', and altered by `provide'."); Vfeatures = Qnil; + DEFVAR_BOOL ("use-dialog-box", &use_dialog_box, + "*Non-nil means mouse commands use dialog boxes to ask questions.\n\ +This applies to y-or-n and yes-or-no questions asked by commands +invoked by mouse clicks and mouse menu items."); + use_dialog_box = 1; + defsubr (&Sidentity); defsubr (&Srandom); defsubr (&Slength);