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-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\e,Ad\e(Brv <jan.h.d@swipnet.se>
* xterm.c (handle_one_xevent): Must note mouse movement even for nil
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;
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;
}
\f
!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)
/* 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;
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;
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",
/* 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))
{
fun = args[0];
- fun = Findirect_function (fun);
+ fun = Findirect_function (fun, Qnil);
if (SUBRP (fun))
{
while (1)
{
- final = Findirect_function (cmd);
+ final = Findirect_function (cmd, Qnil);
if (CONSP (final) && (tem = Fcar (final), EQ (tem, Qautoload)))
{
/* 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;
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.
}
/* 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;
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);
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,
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);