X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fcallint.c;h=fa89f168329c76bad028d587b33c1f229a6b3df2;hb=63a686a3d18465a8c96b8cc4a273c295f8a5a379;hp=14d9e236bb4aacfb76a141489513916b20a57936;hpb=77dcef404dc78635f6ffa8f71a803d2bc7cc8921;p=chise%2Fxemacs-chise.git.1 diff --git a/src/callint.c b/src/callint.c index 14d9e23..fa89f16 100644 --- a/src/callint.c +++ b/src/callint.c @@ -37,7 +37,7 @@ Boston, MA 02111-1307, USA. */ #include "insdel.h" #include "window.h" -extern int num_input_chars; +extern Charcount num_input_chars; Lisp_Object Vcurrent_prefix_arg; Lisp_Object Qcall_interactively; @@ -53,14 +53,14 @@ Lisp_Object Vmark_even_if_inactive; #endif #if 0 /* ill-conceived */ +/* FSF calls Qmouse_leave_buffer_hook at all sorts of random places, + including a bunch of places in their mouse.el. If this is + implemented, it has to be done cleanly. */ Lisp_Object Vmouse_leave_buffer_hook, Qmouse_leave_buffer_hook; #endif -Lisp_Object Qlet, QletX, Qsave_excursion; +Lisp_Object QletX, Qsave_excursion; -Lisp_Object Qcurrent_prefix_arg; - -Lisp_Object Quser_variable_p; Lisp_Object Qread_from_minibuffer; Lisp_Object Qread_file_name; Lisp_Object Qread_directory_name; @@ -170,8 +170,8 @@ Quote EXPR if it is not self quoting. static Lisp_Object quotify_args (Lisp_Object expr) { - REGISTER Lisp_Object tail; - REGISTER struct Lisp_Cons *ptr; + Lisp_Object tail; + Lisp_Cons *ptr; for (tail = expr; CONSP (tail); tail = ptr->cdr) { ptr = XCONS (tail); @@ -196,8 +196,8 @@ check_mark (void) } static Lisp_Object -callint_prompt (CONST Bufbyte *prompt_start, Bytecount prompt_length, - CONST Lisp_Object *args, int nargs) +callint_prompt (const Bufbyte *prompt_start, Bytecount prompt_length, + const Lisp_Object *args, int nargs) { Lisp_Object s = make_string (prompt_start, prompt_length); struct gcpro gcpro1; @@ -244,7 +244,7 @@ when reading the arguments. #endif /* If SPECS is a string, we reset prompt_data to string_data * (XSTRING (specs)) every time a GC might have occurred */ - CONST char *prompt_data = 0; + const char *prompt_data = 0; int prompt_index = 0; int argcount; int set_zmacs_region_stays = 0; @@ -307,8 +307,9 @@ when reading the arguments. if (EQ (funcar, Qautoload)) { - struct gcpro gcpro1, gcpro2; - GCPRO2 (function, prefix); + struct gcpro gcpro1; + GCPRO1 (prefix); + /* do_autoload GCPROs both arguments */ do_autoload (fun, function); UNGCPRO; goto retry; @@ -428,7 +429,7 @@ when reading the arguments. for (;;) { if (STRINGP (specs)) - prompt_data = (CONST char *) XSTRING_DATA (specs); + prompt_data = (const char *) XSTRING_DATA (specs); if (prompt_data[prompt_index] == '+') error ("`+' is not used in `interactive' for ordinary commands"); @@ -489,7 +490,7 @@ when reading the arguments. us give to the function. */ argcount = 0; { - CONST char *tem; + const char *tem; for (tem = prompt_data + prompt_index; *tem; ) { /* 'r' specifications ("point and mark as 2 numeric args") @@ -498,7 +499,7 @@ when reading the arguments. argcount += 2; else argcount += 1; - tem = (CONST char *) strchr (tem + 1, '\n'); + tem = (const char *) strchr (tem + 1, '\n'); if (!tem) break; tem++; @@ -568,12 +569,12 @@ when reading the arguments. for (argnum = 0; ; argnum++) { - CONST char *prompt_start = prompt_data + prompt_index + 1; - CONST char *prompt_limit = (CONST char *) strchr (prompt_start, '\n'); + const char *prompt_start = prompt_data + prompt_index + 1; + const char *prompt_limit = (const char *) strchr (prompt_start, '\n'); int prompt_length; prompt_length = ((prompt_limit) ? (prompt_limit - prompt_start) - : strlen (prompt_start)); + : (int) strlen (prompt_start)); if (prompt_limit && prompt_limit[1] == 0) { prompt_limit = 0; /* "sfoo:\n" -- strip tailing return */ @@ -583,7 +584,7 @@ when reading the arguments. prompts with "Set key C-x C-f to command: "instead of printing event objects in there. */ -#define PROMPT() callint_prompt ((CONST Bufbyte *) prompt_start, prompt_length, visargs, argnum) +#define PROMPT() callint_prompt ((const Bufbyte *) prompt_start, prompt_length, visargs, argnum) switch (prompt_data[prompt_index]) { case 'a': /* Symbol defined as a function */ @@ -810,14 +811,6 @@ when reading the arguments. } case 'S': /* Any symbol. */ { -#if 0 /* Historical crock */ - Lisp_Object tem = intern ("minibuffer-local-ns-map"); - tem = find_symbol_value (tem); - if (UNBOUNDP (tem)) tem = Qnil; - tem = call3 (Qread_from_minibuffer, PROMPT (), Qnil, - tem); - args[argnum] = Fintern (tem, Qnil); -#else /* 1 */ visargs[argnum] = Qnil; for (;;) { @@ -840,7 +833,6 @@ when reading the arguments. directly */ break; } -#endif /* 1 */ arg_from_tty = 1; break; } @@ -912,7 +904,7 @@ when reading the arguments. if (!prompt_limit) break; if (STRINGP (specs)) - prompt_data = (CONST char *) XSTRING_DATA (specs); + prompt_data = (const char *) XSTRING_DATA (specs); prompt_index += prompt_length + 1 + 1; /* +1 to skip spec, +1 for \n */ } unbind_to (speccount, Qnil); @@ -955,7 +947,7 @@ when reading the arguments. } DEFUN ("prefix-numeric-value", Fprefix_numeric_value, 1, 1, 0, /* -Return numeric meaning of raw prefix argument ARG. +Return numeric meaning of raw prefix argument RAW. A raw prefix argument is what you get from `(interactive "P")'. Its numeric meaning is what you would get from `(interactive "p")'. */ @@ -995,10 +987,7 @@ syms_of_callint (void) defsymbol (&Qevents_to_keys, "events-to-keys"); defsymbol (&Qcommand_debug_status, "command-debug-status"); defsymbol (&Qenable_recursive_minibuffers, "enable-recursive-minibuffers"); - defsymbol (&Quser_variable_p, "user-variable-p"); - defsymbol (&Qcurrent_prefix_arg, "current-prefix-arg"); - defsymbol (&Qlet, "let"); defsymbol (&QletX, "let*"); defsymbol (&Qsave_excursion, "save-excursion"); #if 0 /* ill-conceived */