Commit a7f96a35 authored by Kim F. Storm's avatar Kim F. Storm
Browse files

* data.c (Findirect_function): Add NOERROR arg. All callers changed

to pass Qnil for NOERROR.

* keymap.c (current_minor_maps_error): Remove.
(current_minor_maps): Pass Qt for NOERROR to Findirect_function
instead of using internal_condition_case_1+current_minor_maps_error.
parent 49f18bcc
2006-02-10 Kim F. Storm <storm@cua.dk>
* data.c (Findirect_function): Add NOERROR arg. All callers changed
to pass Qnil for NOERROR.
* keymap.c (current_minor_maps_error): Remove.
(current_minor_maps): Pass Qt for NOERROR to Findirect_function
instead of using internal_condition_case_1+current_minor_maps_error.
2006-02-09 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> 2006-02-09 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
* xterm.c (handle_one_xevent): Must note mouse movement even for nil * xterm.c (handle_one_xevent): Must note mouse movement even for nil
......
...@@ -1927,15 +1927,16 @@ indirect_function (object) ...@@ -1927,15 +1927,16 @@ indirect_function (object)
return hare; return hare;
} }
DEFUN ("indirect-function", Findirect_function, Sindirect_function, 1, 1, 0, DEFUN ("indirect-function", Findirect_function, Sindirect_function, 1, 2, 0,
doc: /* Return the function at the end of OBJECT's function chain. doc: /* Return the function at the end of OBJECT's function chain.
If OBJECT is a symbol, follow all function indirections and return the final If OBJECT is a symbol, follow all function indirections and return the final
function binding. function binding.
If OBJECT is not a symbol, just return it. If OBJECT is not a symbol, just return it.
Signal a void-function error if the final symbol is unbound. If optional arg NOERROR is nil, signal a void-function error if
the final symbol is unbound. Otherwise, just return nil is unbound.
Signal a cyclic-function-indirection error if there is a loop in the Signal a cyclic-function-indirection error if there is a loop in the
function chain of symbols. */) function chain of symbols. */)
(object) (object, noerror)
register Lisp_Object object; register Lisp_Object object;
{ {
Lisp_Object result; Lisp_Object result;
...@@ -1943,7 +1944,9 @@ function chain of symbols. */) ...@@ -1943,7 +1944,9 @@ function chain of symbols. */)
result = indirect_function (object); result = indirect_function (object);
if (EQ (result, Qunbound)) if (EQ (result, Qunbound))
return Fsignal (Qvoid_function, Fcons (object, Qnil)); return (NILP (noerror)
? Fsignal (Qvoid_function, Fcons (object, Qnil))
: Qnil);
return result; return result;
} }
......
...@@ -386,7 +386,7 @@ string is passed through `substitute-command-keys'. */) ...@@ -386,7 +386,7 @@ string is passed through `substitute-command-keys'. */)
!NILP (tem))) !NILP (tem)))
return Fdocumentation_property (function, Qfunction_documentation, raw); return Fdocumentation_property (function, Qfunction_documentation, raw);
fun = Findirect_function (function); fun = Findirect_function (function, Qnil);
if (SUBRP (fun)) if (SUBRP (fun))
{ {
if (XSUBR (fun)->doc == 0) if (XSUBR (fun)->doc == 0)
......
...@@ -618,7 +618,7 @@ interactive_p (exclude_subrs_p) ...@@ -618,7 +618,7 @@ interactive_p (exclude_subrs_p)
/* If this isn't a byte-compiled function, there may be a frame at /* If this isn't a byte-compiled function, there may be a frame at
the top for Finteractive_p. If so, skip it. */ the top for Finteractive_p. If so, skip it. */
fun = Findirect_function (*btp->function); fun = Findirect_function (*btp->function, Qnil);
if (SUBRP (fun) && (XSUBR (fun) == &Sinteractive_p if (SUBRP (fun) && (XSUBR (fun) == &Sinteractive_p
|| XSUBR (fun) == &Scalled_interactively_p)) || XSUBR (fun) == &Scalled_interactively_p))
btp = btp->next; btp = btp->next;
...@@ -639,7 +639,7 @@ interactive_p (exclude_subrs_p) ...@@ -639,7 +639,7 @@ interactive_p (exclude_subrs_p)
a special form, ignoring frames for Finteractive_p and/or a special form, ignoring frames for Finteractive_p and/or
Fbytecode at the top. If this frame is for a built-in function Fbytecode at the top. If this frame is for a built-in function
(such as load or eval-region) return nil. */ (such as load or eval-region) return nil. */
fun = Findirect_function (*btp->function); fun = Findirect_function (*btp->function, Qnil);
if (exclude_subrs_p && SUBRP (fun)) if (exclude_subrs_p && SUBRP (fun))
return 0; return 0;
...@@ -2079,7 +2079,7 @@ do_autoload (fundef, funname) ...@@ -2079,7 +2079,7 @@ do_autoload (fundef, funname)
Vautoload_queue = Qt; Vautoload_queue = Qt;
unbind_to (count, Qnil); unbind_to (count, Qnil);
fun = Findirect_function (fun); fun = Findirect_function (fun, Qnil);
if (!NILP (Fequal (fun, fundef))) if (!NILP (Fequal (fun, fundef)))
error ("Autoloading failed to define function %s", error ("Autoloading failed to define function %s",
...@@ -2142,7 +2142,7 @@ DEFUN ("eval", Feval, Seval, 1, 1, 0, ...@@ -2142,7 +2142,7 @@ DEFUN ("eval", Feval, Seval, 1, 1, 0,
/* At this point, only original_fun and original_args /* At this point, only original_fun and original_args
have values that will be used below */ have values that will be used below */
retry: retry:
fun = Findirect_function (original_fun); fun = Findirect_function (original_fun, Qnil);
if (SUBRP (fun)) if (SUBRP (fun))
{ {
...@@ -2841,7 +2841,7 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */) ...@@ -2841,7 +2841,7 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */)
fun = args[0]; fun = args[0];
fun = Findirect_function (fun); fun = Findirect_function (fun, Qnil);
if (SUBRP (fun)) if (SUBRP (fun))
{ {
......
...@@ -9700,7 +9700,7 @@ a special event, so ignore the prefix argument and don't clear it. */) ...@@ -9700,7 +9700,7 @@ a special event, so ignore the prefix argument and don't clear it. */)
while (1) while (1)
{ {
final = Findirect_function (cmd); final = Findirect_function (cmd, Qnil);
if (CONSP (final) && (tem = Fcar (final), EQ (tem, Qautoload))) if (CONSP (final) && (tem = Fcar (final), EQ (tem, Qautoload)))
{ {
......
...@@ -1370,13 +1370,6 @@ silly_event_symbol_error (c) ...@@ -1370,13 +1370,6 @@ silly_event_symbol_error (c)
static Lisp_Object *cmm_modes = NULL, *cmm_maps = NULL; static Lisp_Object *cmm_modes = NULL, *cmm_maps = NULL;
static int cmm_size = 0; static int cmm_size = 0;
/* Error handler used in current_minor_maps. */
static Lisp_Object
current_minor_maps_error ()
{
return Qnil;
}
/* Store a pointer to an array of the keymaps of the currently active /* Store a pointer to an array of the keymaps of the currently active
minor modes in *buf, and return the number of maps it contains. minor modes in *buf, and return the number of maps it contains.
...@@ -1478,9 +1471,7 @@ current_minor_maps (modeptr, mapptr) ...@@ -1478,9 +1471,7 @@ current_minor_maps (modeptr, mapptr)
} }
/* Get the keymap definition--or nil if it is not defined. */ /* Get the keymap definition--or nil if it is not defined. */
temp = internal_condition_case_1 (Findirect_function, temp = Findirect_function (XCDR (assoc), Qt);
XCDR (assoc),
Qerror, current_minor_maps_error);
if (!NILP (temp)) if (!NILP (temp))
{ {
cmm_modes[i] = var; cmm_modes[i] = var;
......
...@@ -2179,7 +2179,7 @@ EXFUN (Fsymbol_function, 1); ...@@ -2179,7 +2179,7 @@ EXFUN (Fsymbol_function, 1);
EXFUN (Fsymbol_plist, 1); EXFUN (Fsymbol_plist, 1);
EXFUN (Fsymbol_name, 1); EXFUN (Fsymbol_name, 1);
extern Lisp_Object indirect_function P_ ((Lisp_Object)); extern Lisp_Object indirect_function P_ ((Lisp_Object));
EXFUN (Findirect_function, 1); EXFUN (Findirect_function, 2);
EXFUN (Ffset, 2); EXFUN (Ffset, 2);
EXFUN (Fsetplist, 2); EXFUN (Fsetplist, 2);
EXFUN (Fsymbol_value, 1); EXFUN (Fsymbol_value, 1);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment