Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
0ea6ae0a
Commit
0ea6ae0a
authored
Nov 16, 2004
by
Richard M. Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(Fmap_keymap): New arg SORT-FIRST. Use
map-keymap-internal to implement that.
parent
6df71429
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
src/keymap.c
src/keymap.c
+8
-4
No files found.
src/keymap.c
View file @
0ea6ae0a
...
@@ -728,19 +728,23 @@ map_keymap_call (key, val, fun, dummy)
...
@@ -728,19 +728,23 @@ map_keymap_call (key, val, fun, dummy)
call2
(
fun
,
key
,
val
);
call2
(
fun
,
key
,
val
);
}
}
DEFUN
(
"map-keymap"
,
Fmap_keymap
,
Smap_keymap
,
2
,
2
,
0
,
DEFUN
(
"map-keymap"
,
Fmap_keymap
,
Smap_keymap
,
2
,
3
,
0
,
doc
:
/* Call FUNCTION for every binding in KEYMAP.
doc
:
/* Call FUNCTION for every binding in KEYMAP.
FUNCTION is called with two arguments: the event and its binding.
FUNCTION is called with two arguments: the event and its binding.
If KEYMAP has a parent, the parent's bindings are included as well.
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
This works recursively: if the parent has itself a parent, then the
grandparent's bindings are also included and so on. */
)
grandparent's bindings are also included and so on.
(
function
,
keymap
)
usage: (map-keymap FUNCTION KEYMAP) */
)
Lisp_Object
function
,
keymap
;
(
function
,
keymap
,
sort_first
)
Lisp_Object
function
,
keymap
,
sort_first
;
{
{
if
(
INTEGERP
(
function
))
if
(
INTEGERP
(
function
))
/* We have to stop integers early since map_keymap gives them special
/* We have to stop integers early since map_keymap gives them special
significance. */
significance. */
Fsignal
(
Qinvalid_function
,
Fcons
(
function
,
Qnil
));
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
);
map_keymap
(
keymap
,
map_keymap_call
,
function
,
NULL
,
1
);
return
Qnil
;
return
Qnil
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment