# HG changeset patch # User Kim F. Storm # Date 1139529631 0 # Node ID 13c1b7c5f555a022bc1f2c14e5641c02959bda99 # Parent 3c76b1d6eff0baaf12706c28a4fa4242d7d08037 * 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. diff -r 3c76b1d6eff0 -r 13c1b7c5f555 src/ChangeLog --- a/src/ChangeLog Thu Feb 09 23:08:19 2006 +0000 +++ b/src/ChangeLog Fri Feb 10 00:00:31 2006 +0000 @@ -1,3 +1,12 @@ +2006-02-10 Kim F. Storm + + * 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 * xterm.c (handle_one_xevent): Must note mouse movement even for nil diff -r 3c76b1d6eff0 -r 13c1b7c5f555 src/data.c --- a/src/data.c Thu Feb 09 23:08:19 2006 +0000 +++ b/src/data.c Fri Feb 10 00:00:31 2006 +0000 @@ -1927,15 +1927,16 @@ 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. If OBJECT is a symbol, follow all function indirections and return the final function binding. 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 function chain of symbols. */) - (object) +(object, noerror) register Lisp_Object object; { Lisp_Object result; @@ -1943,7 +1944,9 @@ result = indirect_function (object); if (EQ (result, Qunbound)) - return Fsignal (Qvoid_function, Fcons (object, Qnil)); + return (NILP (noerror) + ? Fsignal (Qvoid_function, Fcons (object, Qnil)) + : Qnil); return result; } diff -r 3c76b1d6eff0 -r 13c1b7c5f555 src/doc.c --- a/src/doc.c Thu Feb 09 23:08:19 2006 +0000 +++ b/src/doc.c Fri Feb 10 00:00:31 2006 +0000 @@ -386,7 +386,7 @@ !NILP (tem))) return Fdocumentation_property (function, Qfunction_documentation, raw); - fun = Findirect_function (function); + fun = Findirect_function (function, Qnil); if (SUBRP (fun)) { if (XSUBR (fun)->doc == 0) diff -r 3c76b1d6eff0 -r 13c1b7c5f555 src/eval.c --- a/src/eval.c Thu Feb 09 23:08:19 2006 +0000 +++ b/src/eval.c Fri Feb 10 00:00:31 2006 +0000 @@ -618,7 +618,7 @@ /* If this isn't a byte-compiled function, there may be a frame at 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 || XSUBR (fun) == &Scalled_interactively_p)) btp = btp->next; @@ -639,7 +639,7 @@ a special form, ignoring frames for Finteractive_p and/or Fbytecode at the top. If this frame is for a built-in function (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)) return 0; @@ -2079,7 +2079,7 @@ Vautoload_queue = Qt; unbind_to (count, Qnil); - fun = Findirect_function (fun); + fun = Findirect_function (fun, Qnil); if (!NILP (Fequal (fun, fundef))) error ("Autoloading failed to define function %s", @@ -2142,7 +2142,7 @@ /* At this point, only original_fun and original_args have values that will be used below */ retry: - fun = Findirect_function (original_fun); + fun = Findirect_function (original_fun, Qnil); if (SUBRP (fun)) { @@ -2841,7 +2841,7 @@ fun = args[0]; - fun = Findirect_function (fun); + fun = Findirect_function (fun, Qnil); if (SUBRP (fun)) { diff -r 3c76b1d6eff0 -r 13c1b7c5f555 src/keyboard.c --- a/src/keyboard.c Thu Feb 09 23:08:19 2006 +0000 +++ b/src/keyboard.c Fri Feb 10 00:00:31 2006 +0000 @@ -9700,7 +9700,7 @@ while (1) { - final = Findirect_function (cmd); + final = Findirect_function (cmd, Qnil); if (CONSP (final) && (tem = Fcar (final), EQ (tem, Qautoload))) { diff -r 3c76b1d6eff0 -r 13c1b7c5f555 src/keymap.c --- a/src/keymap.c Thu Feb 09 23:08:19 2006 +0000 +++ b/src/keymap.c Fri Feb 10 00:00:31 2006 +0000 @@ -68,7 +68,7 @@ /* keymap used for minibuffers when doing completion in filenames */ Lisp_Object Vminibuffer_local_filename_completion_map; -/* keymap used for minibuffers when doing completion in filenames +/* keymap used for minibuffers when doing completion in filenames with require-match*/ Lisp_Object Vminibuffer_local_must_match_filename_map; @@ -1370,13 +1370,6 @@ static Lisp_Object *cmm_modes = NULL, *cmm_maps = NULL; 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 minor modes in *buf, and return the number of maps it contains. @@ -1478,9 +1471,7 @@ } /* Get the keymap definition--or nil if it is not defined. */ - temp = internal_condition_case_1 (Findirect_function, - XCDR (assoc), - Qerror, current_minor_maps_error); + temp = Findirect_function (XCDR (assoc), Qt); if (!NILP (temp)) { cmm_modes[i] = var; @@ -3882,11 +3873,11 @@ Vminibuffer_local_completion_map = Fmake_sparse_keymap (Qnil); Fset_keymap_parent (Vminibuffer_local_completion_map, Vminibuffer_local_map); - DEFVAR_LISP ("minibuffer-local-filename-completion-map", + DEFVAR_LISP ("minibuffer-local-filename-completion-map", &Vminibuffer_local_filename_completion_map, doc: /* Local keymap for minibuffer input with completion for filenames. */); Vminibuffer_local_filename_completion_map = Fmake_sparse_keymap (Qnil); - Fset_keymap_parent (Vminibuffer_local_filename_completion_map, + Fset_keymap_parent (Vminibuffer_local_filename_completion_map, Vminibuffer_local_completion_map); @@ -3896,11 +3887,11 @@ Fset_keymap_parent (Vminibuffer_local_must_match_map, Vminibuffer_local_completion_map); - DEFVAR_LISP ("minibuffer-local-must-match-filename-map", + DEFVAR_LISP ("minibuffer-local-must-match-filename-map", &Vminibuffer_local_must_match_filename_map, doc: /* Local keymap for minibuffer input with completion for filenames with exact match. */); Vminibuffer_local_must_match_filename_map = Fmake_sparse_keymap (Qnil); - Fset_keymap_parent (Vminibuffer_local_must_match_filename_map, + Fset_keymap_parent (Vminibuffer_local_must_match_filename_map, Vminibuffer_local_must_match_map); DEFVAR_LISP ("minor-mode-map-alist", &Vminor_mode_map_alist, diff -r 3c76b1d6eff0 -r 13c1b7c5f555 src/lisp.h --- a/src/lisp.h Thu Feb 09 23:08:19 2006 +0000 +++ b/src/lisp.h Fri Feb 10 00:00:31 2006 +0000 @@ -2179,7 +2179,7 @@ EXFUN (Fsymbol_plist, 1); EXFUN (Fsymbol_name, 1); extern Lisp_Object indirect_function P_ ((Lisp_Object)); -EXFUN (Findirect_function, 1); +EXFUN (Findirect_function, 2); EXFUN (Ffset, 2); EXFUN (Fsetplist, 2); EXFUN (Fsymbol_value, 1);