aboutsummaryrefslogtreecommitdiffstats
path: root/src/keymap.c
diff options
context:
space:
mode:
authorMiles Bader2004-11-19 06:55:13 +0000
committerMiles Bader2004-11-19 06:55:13 +0000
commit148396568043f50499340911c656c7234cefd50d (patch)
tree6bb3c035d0194f7e26bc8254a5189cb5a8722ce2 /src/keymap.c
parent77229aad98d5c81a559fb1ba5161ed2a7f13aec4 (diff)
parent6dd06769a945f59e048d8328e37a77b41f8c798f (diff)
downloademacs-148396568043f50499340911c656c7234cefd50d.tar.gz
emacs-148396568043f50499340911c656c7234cefd50d.zip
Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-72
Merge from emacs--cvs-trunk--0 Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-693 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-695 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-696 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-697 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-702 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-703 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-704 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-708 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-72 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-73 Merge from emacs--cvs-trunk--0
Diffstat (limited to 'src/keymap.c')
-rw-r--r--src/keymap.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/keymap.c b/src/keymap.c
index 1a86caff4c4..e76cbf5c00a 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -703,19 +703,23 @@ map_keymap_call (key, val, fun, dummy)
703 call2 (fun, key, val); 703 call2 (fun, key, val);
704} 704}
705 705
706DEFUN ("map-keymap", Fmap_keymap, Smap_keymap, 2, 2, 0, 706DEFUN ("map-keymap", Fmap_keymap, Smap_keymap, 2, 3, 0,
707 doc: /* Call FUNCTION for every binding in KEYMAP. 707 doc: /* Call FUNCTION for every binding in KEYMAP.
708FUNCTION is called with two arguments: the event and its binding. 708FUNCTION is called with two arguments: the event and its binding.
709If KEYMAP has a parent, the parent's bindings are included as well. 709If KEYMAP has a parent, the parent's bindings are included as well.
710This works recursively: if the parent has itself a parent, then the 710This works recursively: if the parent has itself a parent, then the
711grandparent's bindings are also included and so on. */) 711grandparent's bindings are also included and so on.
712 (function, keymap) 712usage: (map-keymap FUNCTION KEYMAP) */)
713 Lisp_Object function, keymap; 713 (function, keymap, sort_first)
714 Lisp_Object function, keymap, sort_first;
714{ 715{
715 if (INTEGERP (function)) 716 if (INTEGERP (function))
716 /* We have to stop integers early since map_keymap gives them special 717 /* We have to stop integers early since map_keymap gives them special
717 significance. */ 718 significance. */
718 Fsignal (Qinvalid_function, Fcons (function, Qnil)); 719 Fsignal (Qinvalid_function, Fcons (function, Qnil));
720 if (! NILP (sort_first))
721 return call3 (intern ("map-keymap-internal"), function, keymap, Qt);
722
719 map_keymap (keymap, map_keymap_call, function, NULL, 1); 723 map_keymap (keymap, map_keymap_call, function, NULL, 1);
720 return Qnil; 724 return Qnil;
721} 725}