[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/keymap.c
From: |
Richard M . Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/src/keymap.c |
Date: |
Tue, 16 Nov 2004 12:20:28 -0500 |
Index: emacs/src/keymap.c
diff -c emacs/src/keymap.c:1.296 emacs/src/keymap.c:1.297
*** emacs/src/keymap.c:1.296 Wed Nov 10 22:35:21 2004
--- emacs/src/keymap.c Tue Nov 16 17:00:59 2004
***************
*** 728,746 ****
call2 (fun, key, val);
}
! DEFUN ("map-keymap", Fmap_keymap, Smap_keymap, 2, 2, 0,
doc: /* Call FUNCTION for every binding in KEYMAP.
FUNCTION is called with two arguments: the event and its binding.
If KEYMAP has a parent, the parent's bindings are included as well.
This works recursively: if the parent has itself a parent, then the
! grandparent's bindings are also included and so on. */)
! (function, keymap)
! Lisp_Object function, keymap;
{
if (INTEGERP (function))
/* We have to stop integers early since map_keymap gives them special
significance. */
Fsignal (Qinvalid_function, Fcons (function, Qnil));
map_keymap (keymap, map_keymap_call, function, NULL, 1);
return Qnil;
}
--- 728,750 ----
call2 (fun, key, val);
}
! DEFUN ("map-keymap", Fmap_keymap, Smap_keymap, 2, 3, 0,
doc: /* Call FUNCTION for every binding in KEYMAP.
FUNCTION is called with two arguments: the event and its binding.
If KEYMAP has a parent, the parent's bindings are included as well.
This works recursively: if the parent has itself a parent, then the
! grandparent's bindings are also included and so on.
! usage: (map-keymap FUNCTION KEYMAP) */)
! (function, keymap, sort_first)
! Lisp_Object function, keymap, sort_first;
{
if (INTEGERP (function))
/* We have to stop integers early since map_keymap gives them special
significance. */
Fsignal (Qinvalid_function, Fcons (function, Qnil));
+ if (! NILP (sort_first))
+ return call3 (intern ("map-keymap-internal"), function, keymap, Qt);
+
map_keymap (keymap, map_keymap_call, function, NULL, 1);
return Qnil;
}