diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 9 | ||||
-rw-r--r-- | src/data.c | 11 | ||||
-rw-r--r-- | src/doc.c | 2 | ||||
-rw-r--r-- | src/eval.c | 10 | ||||
-rw-r--r-- | src/keyboard.c | 2 | ||||
-rw-r--r-- | src/keymap.c | 21 | ||||
-rw-r--r-- | src/lisp.h | 2 |
7 files changed, 30 insertions, 27 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 81963774f86..62a7d0d9909 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +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> * xterm.c (handle_one_xevent): Must note mouse movement even for nil diff --git a/src/data.c b/src/data.c index 278105ba99b..7919021d061 100644 --- a/src/data.c +++ b/src/data.c @@ -1927,15 +1927,16 @@ indirect_function (object) 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 @@ function chain of symbols. */) 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 --git a/src/doc.c b/src/doc.c index 5c4c8b45412..0e1042b95a5 100644 --- a/src/doc.c +++ b/src/doc.c @@ -386,7 +386,7 @@ string is passed through `substitute-command-keys'. */) !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 --git a/src/eval.c b/src/eval.c index 2f89e515f8d..eff284820f0 100644 --- a/src/eval.c +++ b/src/eval.c @@ -618,7 +618,7 @@ interactive_p (exclude_subrs_p) /* 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 @@ interactive_p (exclude_subrs_p) 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 @@ do_autoload (fundef, funname) 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 @@ DEFUN ("eval", Feval, Seval, 1, 1, 0, /* 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 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */) fun = args[0]; - fun = Findirect_function (fun); + fun = Findirect_function (fun, Qnil); if (SUBRP (fun)) { diff --git a/src/keyboard.c b/src/keyboard.c index 21bd13060c4..d5c5f184cfa 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -9700,7 +9700,7 @@ a special event, so ignore the prefix argument and don't clear it. */) while (1) { - final = Findirect_function (cmd); + final = Findirect_function (cmd, Qnil); if (CONSP (final) && (tem = Fcar (final), EQ (tem, Qautoload))) { diff --git a/src/keymap.c b/src/keymap.c index 94cc8920f07..03b36d525b6 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -68,7 +68,7 @@ Lisp_Object Vminibuffer_local_completion_map; /* 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 @@ silly_event_symbol_error (c) 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 @@ current_minor_maps (modeptr, mapptr) } /* 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 @@ don't alter it yourself. */); 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 @@ don't alter it yourself. */); 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 --git a/src/lisp.h b/src/lisp.h index 09f6f38c030..992c05251b8 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2179,7 +2179,7 @@ EXFUN (Fsymbol_function, 1); 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); |