Mercurial > hg > xemacs-beta
comparison src/callint.c @ 771:943eaba38521
[xemacs-hg @ 2002-03-13 08:51:24 by ben]
The big ben-mule-21-5 check-in!
Various files were added and deleted. See CHANGES-ben-mule.
There are still some test suite failures. No crashes, though.
Many of the failures have to do with problems in the test suite itself
rather than in the actual code. I'll be addressing these in the next
day or so -- none of the test suite failures are at all critical.
Meanwhile I'll be trying to address the biggest issues -- i.e. build
or run failures, which will almost certainly happen on various platforms.
All comments should be sent to ben@xemacs.org -- use a Cc: if necessary
when sending to mailing lists. There will be pre- and post- tags,
something like
pre-ben-mule-21-5-merge-in, and
post-ben-mule-21-5-merge-in.
author | ben |
---|---|
date | Wed, 13 Mar 2002 08:54:06 +0000 |
parents | fdefd0186b75 |
children | e38acbeb1cae |
comparison
equal
deleted
inserted
replaced
770:336a418893b5 | 771:943eaba38521 |
---|---|
1 /* Call a Lisp function interactively. | 1 /* Call a Lisp function interactively. |
2 Copyright (C) 1985, 1986, 1992, 1993, 1994 Free Software Foundation, Inc. | 2 Copyright (C) 1985, 1986, 1992, 1993, 1994 Free Software Foundation, Inc. |
3 Copyright (C) 1995, 1996 Ben Wing. | 3 Copyright (C) 1995, 1996, 2001 Ben Wing. |
4 | 4 |
5 This file is part of XEmacs. | 5 This file is part of XEmacs. |
6 | 6 |
7 XEmacs is free software; you can redistribute it and/or modify it | 7 XEmacs is free software; you can redistribute it and/or modify it |
8 under the terms of the GNU General Public License as published by the | 8 under the terms of the GNU General Public License as published by the |
72 Lisp_Object Qread_command; | 72 Lisp_Object Qread_command; |
73 Lisp_Object Qread_number; | 73 Lisp_Object Qread_number; |
74 Lisp_Object Qread_string; | 74 Lisp_Object Qread_string; |
75 Lisp_Object Qevents_to_keys; | 75 Lisp_Object Qevents_to_keys; |
76 | 76 |
77 #if defined(MULE) || defined(FILE_CODING) | |
78 Lisp_Object Qread_coding_system; | 77 Lisp_Object Qread_coding_system; |
79 Lisp_Object Qread_non_nil_coding_system; | 78 Lisp_Object Qread_non_nil_coding_system; |
80 #endif | |
81 | 79 |
82 /* ARGSUSED */ | 80 /* ARGSUSED */ |
83 DEFUN ("interactive", Finteractive, 0, UNEVALLED, 0, /* | 81 DEFUN ("interactive", Finteractive, 0, UNEVALLED, 0, /* |
84 Specify a way of parsing arguments for interactive use of a function. | 82 Specify a way of parsing arguments for interactive use of a function. |
85 For example, write | 83 For example, write |
273 /* Fformat no longer smashes its arg vector, so no need to copy it. */ | 271 /* Fformat no longer smashes its arg vector, so no need to copy it. */ |
274 | 272 |
275 if (!strchr ((char *) XSTRING_DATA (s), '%')) | 273 if (!strchr ((char *) XSTRING_DATA (s), '%')) |
276 return s; | 274 return s; |
277 GCPRO1 (s); | 275 GCPRO1 (s); |
278 RETURN_UNGCPRO (emacs_doprnt_string_lisp (0, s, 0, nargs, args)); | 276 RETURN_UNGCPRO (emacs_vsprintf_string_lisp (0, s, nargs, args)); |
279 } | 277 } |
280 | 278 |
281 /* `lambda' for RECORD-FLAG is an XEmacs addition. */ | 279 /* `lambda' for RECORD-FLAG is an XEmacs addition. */ |
282 | 280 |
283 DEFUN ("call-interactively", Fcall_interactively, 1, 3, 0, /* | 281 DEFUN ("call-interactively", Fcall_interactively, 1, 3, 0, /* |
596 fun = Ffuncall (1, &fun); | 594 fun = Ffuncall (1, &fun); |
597 UNGCPRO; | 595 UNGCPRO; |
598 } | 596 } |
599 if (set_zmacs_region_stays) | 597 if (set_zmacs_region_stays) |
600 zmacs_region_stays = 1; | 598 zmacs_region_stays = 1; |
601 return unbind_to (speccount, fun); | 599 return unbind_to_1 (speccount, fun); |
602 } | 600 } |
603 | 601 |
604 /* Read interactive arguments */ | 602 /* Read interactive arguments */ |
605 { | 603 { |
606 /* args[-1] is the function to call */ | 604 /* args[-1] is the function to call */ |
691 tem = (call0 (Qread_char)); | 689 tem = (call0 (Qread_char)); |
692 args[argnum] = tem; | 690 args[argnum] = tem; |
693 /* visargs[argnum] = Fsingle_key_description (tem); */ | 691 /* visargs[argnum] = Fsingle_key_description (tem); */ |
694 /* FSF has visargs[argnum] = Fchar_to_string (tem); */ | 692 /* FSF has visargs[argnum] = Fchar_to_string (tem); */ |
695 | 693 |
696 unbind_to (shadowing_speccount, Qnil); | 694 unbind_to (shadowing_speccount); |
697 | 695 |
698 /* #### `C-x / a' should not leave the prompt in the minibuffer. | 696 /* #### `C-x / a' should not leave the prompt in the minibuffer. |
699 This isn't the right fix, because (message ...) (read-char) | 697 This isn't the right fix, because (message ...) (read-char) |
700 shouldn't leave the message there either... */ | 698 shouldn't leave the message there either... */ |
701 clear_message (); | 699 clear_message (); |
924 arg_from_tty = 1; | 922 arg_from_tty = 1; |
925 break; | 923 break; |
926 } | 924 } |
927 case 'Z': /* Coding-system symbol or nil if no prefix */ | 925 case 'Z': /* Coding-system symbol or nil if no prefix */ |
928 { | 926 { |
929 #if defined(MULE) || defined(FILE_CODING) | |
930 if (NILP (prefix)) | 927 if (NILP (prefix)) |
931 { | 928 { |
932 args[argnum] = Qnil; | 929 args[argnum] = Qnil; |
933 } | 930 } |
934 else | 931 else |
935 { | 932 { |
936 args[argnum] = | 933 args[argnum] = |
937 call1 (Qread_non_nil_coding_system, PROMPT ()); | 934 call1 (Qread_non_nil_coding_system, PROMPT ()); |
938 arg_from_tty = 1; | 935 arg_from_tty = 1; |
939 } | 936 } |
940 #else | |
941 args[argnum] = Qnil; | |
942 #endif | |
943 break; | 937 break; |
944 } | 938 } |
945 case 'z': /* Coding-system symbol */ | 939 case 'z': /* Coding-system symbol */ |
946 { | 940 { |
947 #if defined(MULE) || defined(FILE_CODING) | |
948 args[argnum] = call1 (Qread_coding_system, PROMPT ()); | 941 args[argnum] = call1 (Qread_coding_system, PROMPT ()); |
949 arg_from_tty = 1; | 942 arg_from_tty = 1; |
950 #else | |
951 args[argnum] = Qnil; | |
952 #endif | |
953 break; | 943 break; |
954 } | 944 } |
955 | 945 |
956 /* We have a case for `+' so we get an error | 946 /* We have a case for `+' so we get an error |
957 if anyone tries to define one here. */ | 947 if anyone tries to define one here. */ |
972 break; | 962 break; |
973 if (STRINGP (specs)) | 963 if (STRINGP (specs)) |
974 prompt_data = (const char *) XSTRING_DATA (specs); | 964 prompt_data = (const char *) XSTRING_DATA (specs); |
975 prompt_index += prompt_length + 1 + 1; /* +1 to skip spec, +1 for \n */ | 965 prompt_index += prompt_length + 1 + 1; /* +1 to skip spec, +1 for \n */ |
976 } | 966 } |
977 unbind_to (speccount, Qnil); | 967 unbind_to (speccount); |
978 | 968 |
979 QUIT; | 969 QUIT; |
980 | 970 |
981 if (EQ (record_flag, Qlambda)) | 971 if (EQ (record_flag, Qlambda)) |
982 { | 972 { |
1007 specbind (Qcommand_debug_status, Qnil); | 997 specbind (Qcommand_debug_status, Qnil); |
1008 fun = Ffuncall (argcount + 1, args - 1); | 998 fun = Ffuncall (argcount + 1, args - 1); |
1009 UNGCPRO; | 999 UNGCPRO; |
1010 if (set_zmacs_region_stays) | 1000 if (set_zmacs_region_stays) |
1011 zmacs_region_stays = 1; | 1001 zmacs_region_stays = 1; |
1012 return unbind_to (speccount, fun); | 1002 return unbind_to_1 (speccount, fun); |
1013 } | 1003 } |
1014 } | 1004 } |
1015 | 1005 |
1016 DEFUN ("prefix-numeric-value", Fprefix_numeric_value, 1, 1, 0, /* | 1006 DEFUN ("prefix-numeric-value", Fprefix_numeric_value, 1, 1, 0, /* |
1017 Return numeric meaning of raw prefix argument RAW. | 1007 Return numeric meaning of raw prefix argument RAW. |
1045 DEFSYMBOL (Qread_variable); | 1035 DEFSYMBOL (Qread_variable); |
1046 DEFSYMBOL (Qread_function); | 1036 DEFSYMBOL (Qread_function); |
1047 DEFSYMBOL (Qread_command); | 1037 DEFSYMBOL (Qread_command); |
1048 DEFSYMBOL (Qread_number); | 1038 DEFSYMBOL (Qread_number); |
1049 DEFSYMBOL (Qread_expression); | 1039 DEFSYMBOL (Qread_expression); |
1050 #if defined(MULE) || defined(FILE_CODING) | |
1051 DEFSYMBOL (Qread_coding_system); | 1040 DEFSYMBOL (Qread_coding_system); |
1052 DEFSYMBOL (Qread_non_nil_coding_system); | 1041 DEFSYMBOL (Qread_non_nil_coding_system); |
1053 #endif | |
1054 DEFSYMBOL (Qevents_to_keys); | 1042 DEFSYMBOL (Qevents_to_keys); |
1055 DEFSYMBOL (Qcommand_debug_status); | 1043 DEFSYMBOL (Qcommand_debug_status); |
1056 DEFSYMBOL (Qenable_recursive_minibuffers); | 1044 DEFSYMBOL (Qenable_recursive_minibuffers); |
1057 | 1045 |
1058 defsymbol (&QletX, "let*"); | 1046 defsymbol (&QletX, "let*"); |