aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2006-02-10 00:00:31 +0000
committerKim F. Storm2006-02-10 00:00:31 +0000
commita7f96a358b12d90b44fa11ac65caf24fd164ad6d (patch)
tree5c8ae432704235cc666fa0bce2c8364d3aae26c4 /src
parent49f18bccba0bc666c50057831862d224639deeb2 (diff)
downloademacs-a7f96a358b12d90b44fa11ac65caf24fd164ad6d.tar.gz
emacs-a7f96a358b12d90b44fa11ac65caf24fd164ad6d.zip
* 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.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog9
-rw-r--r--src/data.c11
-rw-r--r--src/doc.c2
-rw-r--r--src/eval.c10
-rw-r--r--src/keyboard.c2
-rw-r--r--src/keymap.c21
-rw-r--r--src/lisp.h2
7 files changed, 30 insertions, 27 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index b7124f33d83..fd2c46ec62a 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,12 @@
12006-02-10 Kim F. Storm <storm@cua.dk>
2
3 * data.c (Findirect_function): Add NOERROR arg. All callers changed
4 to pass Qnil for NOERROR.
5
6 * keymap.c (current_minor_maps_error): Remove.
7 (current_minor_maps): Pass Qt for NOERROR to Findirect_function
8 instead of using internal_condition_case_1+current_minor_maps_error.
9
12006-02-09 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> 102006-02-09 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
2 11
3 * xterm.c (handle_one_xevent): Must note mouse movement even for nil 12 * 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)
1927 return hare; 1927 return hare;
1928} 1928}
1929 1929
1930DEFUN ("indirect-function", Findirect_function, Sindirect_function, 1, 1, 0, 1930DEFUN ("indirect-function", Findirect_function, Sindirect_function, 1, 2, 0,
1931 doc: /* Return the function at the end of OBJECT's function chain. 1931 doc: /* Return the function at the end of OBJECT's function chain.
1932If OBJECT is a symbol, follow all function indirections and return the final 1932If OBJECT is a symbol, follow all function indirections and return the final
1933function binding. 1933function binding.
1934If OBJECT is not a symbol, just return it. 1934If OBJECT is not a symbol, just return it.
1935Signal a void-function error if the final symbol is unbound. 1935If optional arg NOERROR is nil, signal a void-function error if
1936the final symbol is unbound. Otherwise, just return nil is unbound.
1936Signal a cyclic-function-indirection error if there is a loop in the 1937Signal a cyclic-function-indirection error if there is a loop in the
1937function chain of symbols. */) 1938function chain of symbols. */)
1938 (object) 1939(object, noerror)
1939 register Lisp_Object object; 1940 register Lisp_Object object;
1940{ 1941{
1941 Lisp_Object result; 1942 Lisp_Object result;
@@ -1943,7 +1944,9 @@ function chain of symbols. */)
1943 result = indirect_function (object); 1944 result = indirect_function (object);
1944 1945
1945 if (EQ (result, Qunbound)) 1946 if (EQ (result, Qunbound))
1946 return Fsignal (Qvoid_function, Fcons (object, Qnil)); 1947 return (NILP (noerror)
1948 ? Fsignal (Qvoid_function, Fcons (object, Qnil))
1949 : Qnil);
1947 return result; 1950 return result;
1948} 1951}
1949 1952
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'. */)
386 !NILP (tem))) 386 !NILP (tem)))
387 return Fdocumentation_property (function, Qfunction_documentation, raw); 387 return Fdocumentation_property (function, Qfunction_documentation, raw);
388 388
389 fun = Findirect_function (function); 389 fun = Findirect_function (function, Qnil);
390 if (SUBRP (fun)) 390 if (SUBRP (fun))
391 { 391 {
392 if (XSUBR (fun)->doc == 0) 392 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)
618 618
619 /* If this isn't a byte-compiled function, there may be a frame at 619 /* If this isn't a byte-compiled function, there may be a frame at
620 the top for Finteractive_p. If so, skip it. */ 620 the top for Finteractive_p. If so, skip it. */
621 fun = Findirect_function (*btp->function); 621 fun = Findirect_function (*btp->function, Qnil);
622 if (SUBRP (fun) && (XSUBR (fun) == &Sinteractive_p 622 if (SUBRP (fun) && (XSUBR (fun) == &Sinteractive_p
623 || XSUBR (fun) == &Scalled_interactively_p)) 623 || XSUBR (fun) == &Scalled_interactively_p))
624 btp = btp->next; 624 btp = btp->next;
@@ -639,7 +639,7 @@ interactive_p (exclude_subrs_p)
639 a special form, ignoring frames for Finteractive_p and/or 639 a special form, ignoring frames for Finteractive_p and/or
640 Fbytecode at the top. If this frame is for a built-in function 640 Fbytecode at the top. If this frame is for a built-in function
641 (such as load or eval-region) return nil. */ 641 (such as load or eval-region) return nil. */
642 fun = Findirect_function (*btp->function); 642 fun = Findirect_function (*btp->function, Qnil);
643 if (exclude_subrs_p && SUBRP (fun)) 643 if (exclude_subrs_p && SUBRP (fun))
644 return 0; 644 return 0;
645 645
@@ -2079,7 +2079,7 @@ do_autoload (fundef, funname)
2079 Vautoload_queue = Qt; 2079 Vautoload_queue = Qt;
2080 unbind_to (count, Qnil); 2080 unbind_to (count, Qnil);
2081 2081
2082 fun = Findirect_function (fun); 2082 fun = Findirect_function (fun, Qnil);
2083 2083
2084 if (!NILP (Fequal (fun, fundef))) 2084 if (!NILP (Fequal (fun, fundef)))
2085 error ("Autoloading failed to define function %s", 2085 error ("Autoloading failed to define function %s",
@@ -2142,7 +2142,7 @@ DEFUN ("eval", Feval, Seval, 1, 1, 0,
2142 /* At this point, only original_fun and original_args 2142 /* At this point, only original_fun and original_args
2143 have values that will be used below */ 2143 have values that will be used below */
2144 retry: 2144 retry:
2145 fun = Findirect_function (original_fun); 2145 fun = Findirect_function (original_fun, Qnil);
2146 2146
2147 if (SUBRP (fun)) 2147 if (SUBRP (fun))
2148 { 2148 {
@@ -2841,7 +2841,7 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */)
2841 2841
2842 fun = args[0]; 2842 fun = args[0];
2843 2843
2844 fun = Findirect_function (fun); 2844 fun = Findirect_function (fun, Qnil);
2845 2845
2846 if (SUBRP (fun)) 2846 if (SUBRP (fun))
2847 { 2847 {
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. */)
9700 9700
9701 while (1) 9701 while (1)
9702 { 9702 {
9703 final = Findirect_function (cmd); 9703 final = Findirect_function (cmd, Qnil);
9704 9704
9705 if (CONSP (final) && (tem = Fcar (final), EQ (tem, Qautoload))) 9705 if (CONSP (final) && (tem = Fcar (final), EQ (tem, Qautoload)))
9706 { 9706 {
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;
68/* keymap used for minibuffers when doing completion in filenames */ 68/* keymap used for minibuffers when doing completion in filenames */
69Lisp_Object Vminibuffer_local_filename_completion_map; 69Lisp_Object Vminibuffer_local_filename_completion_map;
70 70
71/* keymap used for minibuffers when doing completion in filenames 71/* keymap used for minibuffers when doing completion in filenames
72 with require-match*/ 72 with require-match*/
73Lisp_Object Vminibuffer_local_must_match_filename_map; 73Lisp_Object Vminibuffer_local_must_match_filename_map;
74 74
@@ -1370,13 +1370,6 @@ silly_event_symbol_error (c)
1370static Lisp_Object *cmm_modes = NULL, *cmm_maps = NULL; 1370static Lisp_Object *cmm_modes = NULL, *cmm_maps = NULL;
1371static int cmm_size = 0; 1371static int cmm_size = 0;
1372 1372
1373/* Error handler used in current_minor_maps. */
1374static Lisp_Object
1375current_minor_maps_error ()
1376{
1377 return Qnil;
1378}
1379
1380/* Store a pointer to an array of the keymaps of the currently active 1373/* Store a pointer to an array of the keymaps of the currently active
1381 minor modes in *buf, and return the number of maps it contains. 1374 minor modes in *buf, and return the number of maps it contains.
1382 1375
@@ -1478,9 +1471,7 @@ current_minor_maps (modeptr, mapptr)
1478 } 1471 }
1479 1472
1480 /* Get the keymap definition--or nil if it is not defined. */ 1473 /* Get the keymap definition--or nil if it is not defined. */
1481 temp = internal_condition_case_1 (Findirect_function, 1474 temp = Findirect_function (XCDR (assoc), Qt);
1482 XCDR (assoc),
1483 Qerror, current_minor_maps_error);
1484 if (!NILP (temp)) 1475 if (!NILP (temp))
1485 { 1476 {
1486 cmm_modes[i] = var; 1477 cmm_modes[i] = var;
@@ -3882,11 +3873,11 @@ don't alter it yourself. */);
3882 Vminibuffer_local_completion_map = Fmake_sparse_keymap (Qnil); 3873 Vminibuffer_local_completion_map = Fmake_sparse_keymap (Qnil);
3883 Fset_keymap_parent (Vminibuffer_local_completion_map, Vminibuffer_local_map); 3874 Fset_keymap_parent (Vminibuffer_local_completion_map, Vminibuffer_local_map);
3884 3875
3885 DEFVAR_LISP ("minibuffer-local-filename-completion-map", 3876 DEFVAR_LISP ("minibuffer-local-filename-completion-map",
3886 &Vminibuffer_local_filename_completion_map, 3877 &Vminibuffer_local_filename_completion_map,
3887 doc: /* Local keymap for minibuffer input with completion for filenames. */); 3878 doc: /* Local keymap for minibuffer input with completion for filenames. */);
3888 Vminibuffer_local_filename_completion_map = Fmake_sparse_keymap (Qnil); 3879 Vminibuffer_local_filename_completion_map = Fmake_sparse_keymap (Qnil);
3889 Fset_keymap_parent (Vminibuffer_local_filename_completion_map, 3880 Fset_keymap_parent (Vminibuffer_local_filename_completion_map,
3890 Vminibuffer_local_completion_map); 3881 Vminibuffer_local_completion_map);
3891 3882
3892 3883
@@ -3896,11 +3887,11 @@ don't alter it yourself. */);
3896 Fset_keymap_parent (Vminibuffer_local_must_match_map, 3887 Fset_keymap_parent (Vminibuffer_local_must_match_map,
3897 Vminibuffer_local_completion_map); 3888 Vminibuffer_local_completion_map);
3898 3889
3899 DEFVAR_LISP ("minibuffer-local-must-match-filename-map", 3890 DEFVAR_LISP ("minibuffer-local-must-match-filename-map",
3900 &Vminibuffer_local_must_match_filename_map, 3891 &Vminibuffer_local_must_match_filename_map,
3901 doc: /* Local keymap for minibuffer input with completion for filenames with exact match. */); 3892 doc: /* Local keymap for minibuffer input with completion for filenames with exact match. */);
3902 Vminibuffer_local_must_match_filename_map = Fmake_sparse_keymap (Qnil); 3893 Vminibuffer_local_must_match_filename_map = Fmake_sparse_keymap (Qnil);
3903 Fset_keymap_parent (Vminibuffer_local_must_match_filename_map, 3894 Fset_keymap_parent (Vminibuffer_local_must_match_filename_map,
3904 Vminibuffer_local_must_match_map); 3895 Vminibuffer_local_must_match_map);
3905 3896
3906 DEFVAR_LISP ("minor-mode-map-alist", &Vminor_mode_map_alist, 3897 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);
2179EXFUN (Fsymbol_plist, 1); 2179EXFUN (Fsymbol_plist, 1);
2180EXFUN (Fsymbol_name, 1); 2180EXFUN (Fsymbol_name, 1);
2181extern Lisp_Object indirect_function P_ ((Lisp_Object)); 2181extern Lisp_Object indirect_function P_ ((Lisp_Object));
2182EXFUN (Findirect_function, 1); 2182EXFUN (Findirect_function, 2);
2183EXFUN (Ffset, 2); 2183EXFUN (Ffset, 2);
2184EXFUN (Fsetplist, 2); 2184EXFUN (Fsetplist, 2);
2185EXFUN (Fsymbol_value, 1); 2185EXFUN (Fsymbol_value, 1);