aboutsummaryrefslogtreecommitdiffstats
path: root/src/callint.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/callint.c')
-rw-r--r--src/callint.c62
1 files changed, 31 insertions, 31 deletions
diff --git a/src/callint.c b/src/callint.c
index c4c087e83d7..212dd2e3d62 100644
--- a/src/callint.c
+++ b/src/callint.c
@@ -1,6 +1,6 @@
1/* Call a Lisp function interactively. 1/* Call a Lisp function interactively.
2 Copyright (C) 1985-1986, 1993-1995, 1997, 2000-2012 2 Copyright (C) 1985-1986, 1993-1995, 1997, 2000-2013 Free Software
3 Free Software Foundation, Inc. 3 Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
@@ -29,7 +29,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
29#include "keymap.h" 29#include "keymap.h"
30 30
31Lisp_Object Qminus, Qplus; 31Lisp_Object Qminus, Qplus;
32Lisp_Object Qcall_interactively; 32static Lisp_Object Qcall_interactively;
33static Lisp_Object Qcommand_debug_status; 33static Lisp_Object Qcommand_debug_status;
34static Lisp_Object Qenable_recursive_minibuffers; 34static Lisp_Object Qenable_recursive_minibuffers;
35 35
@@ -342,8 +342,8 @@ invoke it. If KEYS is omitted or nil, the return value of
342 /* Compute the arg values using the user's expression. */ 342 /* Compute the arg values using the user's expression. */
343 GCPRO2 (input, filter_specs); 343 GCPRO2 (input, filter_specs);
344 specs = Feval (specs, 344 specs = Feval (specs,
345 CONSP (funval) && EQ (Qclosure, XCAR (funval)) 345 CONSP (funval) && EQ (Qclosure, XCAR (funval))
346 ? Qt : Qnil); 346 ? CAR_SAFE (XCDR (funval)) : Qnil);
347 UNGCPRO; 347 UNGCPRO;
348 if (events != num_input_events || !NILP (record_flag)) 348 if (events != num_input_events || !NILP (record_flag))
349 { 349 {
@@ -497,47 +497,47 @@ invoke it. If KEYS is omitted or nil, the return value of
497 497
498 switch (*tem) 498 switch (*tem)
499 { 499 {
500 case 'a': /* Symbol defined as a function */ 500 case 'a': /* Symbol defined as a function. */
501 visargs[i] = Fcompleting_read (callint_message, 501 visargs[i] = Fcompleting_read (callint_message,
502 Vobarray, Qfboundp, Qt, 502 Vobarray, Qfboundp, Qt,
503 Qnil, Qnil, Qnil, Qnil); 503 Qnil, Qnil, Qnil, Qnil);
504 /* Passing args[i] directly stimulates compiler bug */ 504 /* Passing args[i] directly stimulates compiler bug. */
505 teml = visargs[i]; 505 teml = visargs[i];
506 args[i] = Fintern (teml, Qnil); 506 args[i] = Fintern (teml, Qnil);
507 break; 507 break;
508 508
509 case 'b': /* Name of existing buffer */ 509 case 'b': /* Name of existing buffer. */
510 args[i] = Fcurrent_buffer (); 510 args[i] = Fcurrent_buffer ();
511 if (EQ (selected_window, minibuf_window)) 511 if (EQ (selected_window, minibuf_window))
512 args[i] = Fother_buffer (args[i], Qnil, Qnil); 512 args[i] = Fother_buffer (args[i], Qnil, Qnil);
513 args[i] = Fread_buffer (callint_message, args[i], Qt); 513 args[i] = Fread_buffer (callint_message, args[i], Qt);
514 break; 514 break;
515 515
516 case 'B': /* Name of buffer, possibly nonexistent */ 516 case 'B': /* Name of buffer, possibly nonexistent. */
517 args[i] = Fread_buffer (callint_message, 517 args[i] = Fread_buffer (callint_message,
518 Fother_buffer (Fcurrent_buffer (), Qnil, Qnil), 518 Fother_buffer (Fcurrent_buffer (), Qnil, Qnil),
519 Qnil); 519 Qnil);
520 break; 520 break;
521 521
522 case 'c': /* Character */ 522 case 'c': /* Character. */
523 /* Prompt in `minibuffer-prompt' face. */ 523 /* Prompt in `minibuffer-prompt' face. */
524 Fput_text_property (make_number (0), 524 Fput_text_property (make_number (0),
525 make_number (SCHARS (callint_message)), 525 make_number (SCHARS (callint_message)),
526 Qface, Qminibuffer_prompt, callint_message); 526 Qface, Qminibuffer_prompt, callint_message);
527 args[i] = Fread_char (callint_message, Qnil, Qnil); 527 args[i] = Fread_char (callint_message, Qnil, Qnil);
528 message1_nolog ((char *) 0); 528 message1_nolog ((char *) 0);
529 /* Passing args[i] directly stimulates compiler bug */ 529 /* Passing args[i] directly stimulates compiler bug. */
530 teml = args[i]; 530 teml = args[i];
531 /* See bug#8479. */ 531 /* See bug#8479. */
532 if (! CHARACTERP (teml)) error ("Non-character input-event"); 532 if (! CHARACTERP (teml)) error ("Non-character input-event");
533 visargs[i] = Fchar_to_string (teml); 533 visargs[i] = Fchar_to_string (teml);
534 break; 534 break;
535 535
536 case 'C': /* Command: symbol with interactive function */ 536 case 'C': /* Command: symbol with interactive function. */
537 visargs[i] = Fcompleting_read (callint_message, 537 visargs[i] = Fcompleting_read (callint_message,
538 Vobarray, Qcommandp, 538 Vobarray, Qcommandp,
539 Qt, Qnil, Qnil, Qnil, Qnil); 539 Qt, Qnil, Qnil, Qnil, Qnil);
540 /* Passing args[i] directly stimulates compiler bug */ 540 /* Passing args[i] directly stimulates compiler bug. */
541 teml = visargs[i]; 541 teml = visargs[i];
542 args[i] = Fintern (teml, Qnil); 542 args[i] = Fintern (teml, Qnil);
543 break; 543 break;
@@ -549,33 +549,33 @@ invoke it. If KEYS is omitted or nil, the return value of
549 varies[i] = 1; 549 varies[i] = 1;
550 break; 550 break;
551 551
552 case 'D': /* Directory name. */ 552 case 'D': /* Directory name. */
553 args[i] = Fread_file_name (callint_message, Qnil, 553 args[i] = Fread_file_name (callint_message, Qnil,
554 BVAR (current_buffer, directory), Qlambda, Qnil, 554 BVAR (current_buffer, directory), Qlambda, Qnil,
555 Qfile_directory_p); 555 Qfile_directory_p);
556 break; 556 break;
557 557
558 case 'f': /* Existing file name. */ 558 case 'f': /* Existing file name. */
559 args[i] = Fread_file_name (callint_message, 559 args[i] = Fread_file_name (callint_message,
560 Qnil, Qnil, Qlambda, Qnil, Qnil); 560 Qnil, Qnil, Qlambda, Qnil, Qnil);
561 break; 561 break;
562 562
563 case 'F': /* Possibly nonexistent file name. */ 563 case 'F': /* Possibly nonexistent file name. */
564 args[i] = Fread_file_name (callint_message, 564 args[i] = Fread_file_name (callint_message,
565 Qnil, Qnil, Qnil, Qnil, Qnil); 565 Qnil, Qnil, Qnil, Qnil, Qnil);
566 break; 566 break;
567 567
568 case 'G': /* Possibly nonexistent file name, 568 case 'G': /* Possibly nonexistent file name,
569 default to directory alone. */ 569 default to directory alone. */
570 args[i] = Fread_file_name (callint_message, 570 args[i] = Fread_file_name (callint_message,
571 Qnil, Qnil, Qnil, empty_unibyte_string, Qnil); 571 Qnil, Qnil, Qnil, empty_unibyte_string, Qnil);
572 break; 572 break;
573 573
574 case 'i': /* Ignore an argument -- Does not do I/O */ 574 case 'i': /* Ignore an argument -- Does not do I/O. */
575 varies[i] = -1; 575 varies[i] = -1;
576 break; 576 break;
577 577
578 case 'k': /* Key sequence. */ 578 case 'k': /* Key sequence. */
579 { 579 {
580 ptrdiff_t speccount1 = SPECPDL_INDEX (); 580 ptrdiff_t speccount1 = SPECPDL_INDEX ();
581 specbind (Qcursor_in_echo_area, Qt); 581 specbind (Qcursor_in_echo_area, Qt);
@@ -607,7 +607,7 @@ invoke it. If KEYS is omitted or nil, the return value of
607 } 607 }
608 break; 608 break;
609 609
610 case 'K': /* Key sequence to be defined. */ 610 case 'K': /* Key sequence to be defined. */
611 { 611 {
612 ptrdiff_t speccount1 = SPECPDL_INDEX (); 612 ptrdiff_t speccount1 = SPECPDL_INDEX ();
613 specbind (Qcursor_in_echo_area, Qt); 613 specbind (Qcursor_in_echo_area, Qt);
@@ -639,7 +639,7 @@ invoke it. If KEYS is omitted or nil, the return value of
639 } 639 }
640 break; 640 break;
641 641
642 case 'U': /* Up event from last k or K */ 642 case 'U': /* Up event from last k or K. */
643 if (!NILP (up_event)) 643 if (!NILP (up_event))
644 { 644 {
645 args[i] = Fmake_vector (make_number (1), up_event); 645 args[i] = Fmake_vector (make_number (1), up_event);
@@ -679,7 +679,7 @@ invoke it. If KEYS is omitted or nil, the return value of
679 Qnil, Qnil, Qnil, Qt); 679 Qnil, Qnil, Qnil, Qt);
680 break; 680 break;
681 681
682 case 'N': /* Prefix arg as number, else number from minibuffer */ 682 case 'N': /* Prefix arg as number, else number from minibuffer. */
683 if (!NILP (prefix_arg)) 683 if (!NILP (prefix_arg))
684 goto have_prefix_arg; 684 goto have_prefix_arg;
685 case 'n': /* Read number from minibuffer. */ 685 case 'n': /* Read number from minibuffer. */
@@ -690,7 +690,7 @@ invoke it. If KEYS is omitted or nil, the return value of
690 Lisp_Object str; 690 Lisp_Object str;
691 if (! first) 691 if (! first)
692 { 692 {
693 message ("Please enter a number."); 693 message1 ("Please enter a number.");
694 sit_for (make_number (1), 0, 0); 694 sit_for (make_number (1), 0, 0);
695 } 695 }
696 first = 0; 696 first = 0;
@@ -714,14 +714,14 @@ invoke it. If KEYS is omitted or nil, the return value of
714 varies[i] = -1; 714 varies[i] = -1;
715 break; 715 break;
716 716
717 case 'p': /* Prefix arg converted to number. No I/O. */ 717 case 'p': /* Prefix arg converted to number. No I/O. */
718 have_prefix_arg: 718 have_prefix_arg:
719 args[i] = Fprefix_numeric_value (prefix_arg); 719 args[i] = Fprefix_numeric_value (prefix_arg);
720 /* visargs[i] = Qnil; */ 720 /* visargs[i] = Qnil; */
721 varies[i] = -1; 721 varies[i] = -1;
722 break; 722 break;
723 723
724 case 'r': /* Region, point and mark as 2 args. */ 724 case 'r': /* Region, point and mark as 2 args. */
725 check_mark (1); 725 check_mark (1);
726 set_marker_both (point_marker, Qnil, PT, PT_BYTE); 726 set_marker_both (point_marker, Qnil, PT, PT_BYTE);
727 /* visargs[i+1] = Qnil; */ 727 /* visargs[i+1] = Qnil; */
@@ -742,29 +742,29 @@ invoke it. If KEYS is omitted or nil, the return value of
742 case 'S': /* Any symbol. */ 742 case 'S': /* Any symbol. */
743 visargs[i] = Fread_string (callint_message, 743 visargs[i] = Fread_string (callint_message,
744 Qnil, Qnil, Qnil, Qnil); 744 Qnil, Qnil, Qnil, Qnil);
745 /* Passing args[i] directly stimulates compiler bug */ 745 /* Passing args[i] directly stimulates compiler bug. */
746 teml = visargs[i]; 746 teml = visargs[i];
747 args[i] = Fintern (teml, Qnil); 747 args[i] = Fintern (teml, Qnil);
748 break; 748 break;
749 749
750 case 'v': /* Variable name: symbol that is 750 case 'v': /* Variable name: symbol that is
751 custom-variable-p. */ 751 custom-variable-p. */
752 args[i] = Fread_variable (callint_message, Qnil); 752 args[i] = Fread_variable (callint_message, Qnil);
753 visargs[i] = last_minibuf_string; 753 visargs[i] = last_minibuf_string;
754 break; 754 break;
755 755
756 case 'x': /* Lisp expression read but not evaluated */ 756 case 'x': /* Lisp expression read but not evaluated. */
757 args[i] = Fread_minibuffer (callint_message, Qnil); 757 args[i] = Fread_minibuffer (callint_message, Qnil);
758 visargs[i] = last_minibuf_string; 758 visargs[i] = last_minibuf_string;
759 break; 759 break;
760 760
761 case 'X': /* Lisp expression read and evaluated */ 761 case 'X': /* Lisp expression read and evaluated. */
762 args[i] = Feval_minibuffer (callint_message, Qnil); 762 args[i] = Feval_minibuffer (callint_message, Qnil);
763 visargs[i] = last_minibuf_string; 763 visargs[i] = last_minibuf_string;
764 break; 764 break;
765 765
766 case 'Z': /* Coding-system symbol, or ignore the 766 case 'Z': /* Coding-system symbol, or ignore the
767 argument if no prefix */ 767 argument if no prefix. */
768 if (NILP (prefix_arg)) 768 if (NILP (prefix_arg))
769 { 769 {
770 args[i] = Qnil; 770 args[i] = Qnil;
@@ -778,7 +778,7 @@ invoke it. If KEYS is omitted or nil, the return value of
778 } 778 }
779 break; 779 break;
780 780
781 case 'z': /* Coding-system symbol or nil */ 781 case 'z': /* Coding-system symbol or nil. */
782 args[i] = Fread_coding_system (callint_message, Qnil); 782 args[i] = Fread_coding_system (callint_message, Qnil);
783 visargs[i] = last_minibuf_string; 783 visargs[i] = last_minibuf_string;
784 break; 784 break;