comparison src/callint.c @ 485:8c615e453683

*** empty log message ***
author Jim Blandy <jimb@redhat.com>
date Mon, 13 Jan 1992 21:48:08 +0000
parents 8b54ee2c82d6
children ccadad491483
comparison
equal deleted inserted replaced
484:3165b2697c78 485:8c615e453683
101 Lisp_Object 101 Lisp_Object
102 quotify_arg (exp) 102 quotify_arg (exp)
103 register Lisp_Object exp; 103 register Lisp_Object exp;
104 { 104 {
105 if (XTYPE (exp) != Lisp_Int && XTYPE (exp) != Lisp_String 105 if (XTYPE (exp) != Lisp_Int && XTYPE (exp) != Lisp_String
106 && !NULL (exp) && !EQ (exp, Qt)) 106 && !NILP (exp) && !EQ (exp, Qt))
107 return Fcons (Qquote, Fcons (exp, Qnil)); 107 return Fcons (Qquote, Fcons (exp, Qnil));
108 108
109 return exp; 109 return exp;
110 } 110 }
111 111
129 129
130 static void 130 static void
131 check_mark () 131 check_mark ()
132 { 132 {
133 Lisp_Object tem = Fmarker_buffer (current_buffer->mark); 133 Lisp_Object tem = Fmarker_buffer (current_buffer->mark);
134 if (NULL (tem) || (XBUFFER (tem) != current_buffer)) 134 if (NILP (tem) || (XBUFFER (tem) != current_buffer))
135 error ("The mark is not set now"); 135 error ("The mark is not set now");
136 } 136 }
137 137
138 138
139 DEFUN ("call-interactively", Fcall_interactively, Scall_interactively, 1, 2, 0, 139 DEFUN ("call-interactively", Fcall_interactively, Scall_interactively, 1, 2, 0,
219 goto retry; 219 goto retry;
220 } 220 }
221 else if (EQ (funcar, Qlambda)) 221 else if (EQ (funcar, Qlambda))
222 { 222 {
223 specs = Fassq (Qinteractive, Fcdr (Fcdr (fun))); 223 specs = Fassq (Qinteractive, Fcdr (Fcdr (fun)));
224 if (NULL (specs)) 224 if (NILP (specs))
225 goto lose; 225 goto lose;
226 specs = Fcar (Fcdr (specs)); 226 specs = Fcar (Fcdr (specs));
227 } 227 }
228 else if (EQ (funcar, Qmocklisp)) 228 else if (EQ (funcar, Qmocklisp))
229 return ml_apply (fun, Qinteractive); 229 return ml_apply (fun, Qinteractive);
234 string = XSTRING (specs)->data; 234 string = XSTRING (specs)->data;
235 else if (string == 0) 235 else if (string == 0)
236 { 236 {
237 i = num_input_chars; 237 i = num_input_chars;
238 specs = Feval (specs); 238 specs = Feval (specs);
239 if (i != num_input_chars || !NULL (record)) 239 if (i != num_input_chars || !NILP (record))
240 Vcommand_history 240 Vcommand_history
241 = Fcons (Fcons (function, quotify_args (Fcopy_sequence (specs))), 241 = Fcons (Fcons (function, quotify_args (Fcopy_sequence (specs))),
242 Vcommand_history); 242 Vcommand_history);
243 return apply1 (function, specs); 243 return apply1 (function, specs);
244 } 244 }
249 while (1) 249 while (1)
250 { 250 {
251 if (*string == '*') 251 if (*string == '*')
252 { 252 {
253 string++; 253 string++;
254 if (!NULL (current_buffer->read_only)) 254 if (!NILP (current_buffer->read_only))
255 Fbarf_if_buffer_read_only (); 255 Fbarf_if_buffer_read_only ();
256 } 256 }
257 else if (*string == '@') 257 else if (*string == '@')
258 { 258 {
259 string++; 259 string++;
260 if (!NULL (Vmouse_window)) 260 if (!NILP (Vmouse_window))
261 Fselect_window (Vmouse_window); 261 Fselect_window (Vmouse_window);
262 } 262 }
263 else break; 263 else break;
264 } 264 }
265 265
377 visargs[i] = Fkey_description (teml); 377 visargs[i] = Fkey_description (teml);
378 break; 378 break;
379 379
380 case 'K': /* Mouse click. */ 380 case 'K': /* Mouse click. */
381 args[i] = last_command_char; 381 args[i] = last_command_char;
382 if (NULL (Fmouse_click_p (args[i]))) 382 if (NILP (Fmouse_click_p (args[i])))
383 error ("%s must be bound to a mouse click.", 383 error ("%s must be bound to a mouse click.",
384 (XTYPE (function) == Lisp_Symbol 384 (XTYPE (function) == Lisp_Symbol
385 ? (char *) XSYMBOL (function)->name->data 385 ? (char *) XSYMBOL (function)->name->data
386 : "Command")); 386 : "Command"));
387 break; 387 break;
392 XFASTINT (args[i]) = marker_position (current_buffer->mark); 392 XFASTINT (args[i]) = marker_position (current_buffer->mark);
393 varies[i] = 2; 393 varies[i] = 2;
394 break; 394 break;
395 395
396 case 'N': /* Prefix arg, else number from minibuffer */ 396 case 'N': /* Prefix arg, else number from minibuffer */
397 if (!NULL (prefix_arg)) 397 if (!NILP (prefix_arg))
398 goto have_prefix_arg; 398 goto have_prefix_arg;
399 case 'n': /* Read number from minibuffer. */ 399 case 'n': /* Read number from minibuffer. */
400 do 400 do
401 args[i] = Fread_minibuffer (build_string (prompt), Qnil); 401 args[i] = Fread_minibuffer (build_string (prompt), Qnil);
402 #ifdef LISP_FLOAT_TYPE 402 #ifdef LISP_FLOAT_TYPE
468 } 468 }
469 469
470 if (varies[i] == 0) 470 if (varies[i] == 0)
471 arg_from_tty = 1; 471 arg_from_tty = 1;
472 472
473 if (NULL (visargs[i]) && XTYPE (args[i]) == Lisp_String) 473 if (NILP (visargs[i]) && XTYPE (args[i]) == Lisp_String)
474 visargs[i] = args[i]; 474 visargs[i] = args[i];
475 475
476 tem = (unsigned char *) index (tem, '\n'); 476 tem = (unsigned char *) index (tem, '\n');
477 if (tem) tem++; 477 if (tem) tem++;
478 else tem = (unsigned char *) ""; 478 else tem = (unsigned char *) "";
480 480
481 QUIT; 481 QUIT;
482 482
483 args[0] = function; 483 args[0] = function;
484 484
485 if (arg_from_tty || !NULL (record)) 485 if (arg_from_tty || !NILP (record))
486 { 486 {
487 visargs[0] = function; 487 visargs[0] = function;
488 for (i = 1; i < count + 1; i++) 488 for (i = 1; i < count + 1; i++)
489 if (varies[i] > 0) 489 if (varies[i] > 0)
490 visargs[i] = Fcons (intern (callint_argfuns[varies[i]]), Qnil); 490 visargs[i] = Fcons (intern (callint_argfuns[varies[i]]), Qnil);
517 517
518 /* Tag val as an integer, so the rest of the assignments 518 /* Tag val as an integer, so the rest of the assignments
519 may use XSETINT. */ 519 may use XSETINT. */
520 XFASTINT (val) = 0; 520 XFASTINT (val) = 0;
521 521
522 if (NULL (raw)) 522 if (NILP (raw))
523 XFASTINT (val) = 1; 523 XFASTINT (val) = 1;
524 else if (XTYPE (raw) == Lisp_Symbol) 524 else if (XTYPE (raw) == Lisp_Symbol)
525 XSETINT (val, -1); 525 XSETINT (val, -1);
526 else if (CONSP (raw)) 526 else if (CONSP (raw))
527 XSETINT (val, XINT (XCONS (raw)->car)); 527 XSETINT (val, XINT (XCONS (raw)->car));