Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
c3c0ee93
Commit
c3c0ee93
authored
Apr 20, 1994
by
Karl Heuer
Browse files
(describe_map): Merge with describe_map_2.
parent
24ff5498
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
33 deletions
+20
-33
src/keymap.c
src/keymap.c
+20
-33
No files found.
src/keymap.c
View file @
c3c0ee93
...
...
@@ -87,7 +87,6 @@ static Lisp_Object define_as_prefix ();
static
Lisp_Object
describe_buffer_bindings
();
static
void
describe_command
();
static
void
describe_map
();
static
void
describe_map_2
();
/* Keymap object support - constructors and predicates. */
...
...
@@ -1968,7 +1967,7 @@ key binding\n\
sub_shadows
=
Fcons
(
shmap
,
sub_shadows
);
}
describe_map
(
Fcdr
(
elt
),
Fcar
(
elt
),
partial
,
sub_shadows
);
describe_map
(
Fcdr
(
elt
),
Fcar
(
elt
),
describe_command
,
partial
,
sub_shadows
);
skip:
;
}
...
...
@@ -2005,31 +2004,6 @@ describe_command (definition)
}
}
/* Describe the contents of map MAP, assuming that this map itself is
reached by the sequence of prefix keys KEYS (a string or vector).
PARTIAL, SHADOW is as in `describe_map_tree' above. */
static
void
describe_map
(
map
,
keys
,
partial
,
shadow
)
Lisp_Object
map
,
keys
;
int
partial
;
Lisp_Object
shadow
;
{
register
Lisp_Object
keysdesc
;
if
(
!
NILP
(
keys
)
&&
XFASTINT
(
Flength
(
keys
))
>
0
)
{
Lisp_Object
tem
;
/* Call Fkey_description first, to avoid GC bug for the other string. */
tem
=
Fkey_description
(
keys
);
keysdesc
=
concat2
(
tem
,
build_string
(
" "
));
}
else
keysdesc
=
Qnil
;
describe_map_2
(
map
,
keysdesc
,
describe_command
,
partial
,
shadow
);
}
/* Like Flookup_key, but uses a list of keymaps SHADOW instead of a single map.
Returns the first non-nil binding found in any of those maps. */
...
...
@@ -2048,16 +2022,19 @@ shadow_lookup (shadow, key, flag)
return
Qnil
;
}
/* Insert a description of KEYMAP into the current buffer. */
/* Describe the contents of map MAP, assuming that this map itself is
reached by the sequence of prefix keys KEYS (a string or vector).
PARTIAL, SHADOW is as in `describe_map_tree' above. */
static
void
describe_map
_2
(
keymap
,
elt_prefix
,
elt_describer
,
partial
,
shadow
)
register
Lisp_Object
key
map
;
Lisp_Object
elt_prefix
;
describe_map
(
map
,
keys
,
elt_describer
,
partial
,
shadow
)
register
Lisp_Object
map
;
Lisp_Object
keys
;
int
(
*
elt_describer
)
();
int
partial
;
Lisp_Object
shadow
;
{
Lisp_Object
elt_prefix
;
Lisp_Object
tail
,
definition
,
event
;
Lisp_Object
tem
;
Lisp_Object
suppress
;
...
...
@@ -2065,6 +2042,16 @@ describe_map_2 (keymap, elt_prefix, elt_describer, partial, shadow)
int
first
=
1
;
struct
gcpro
gcpro1
,
gcpro2
,
gcpro3
;
if
(
!
NILP
(
keys
)
&&
XFASTINT
(
Flength
(
keys
))
>
0
)
{
Lisp_Object
tem
;
/* Call Fkey_description first, to avoid GC bug for the other string. */
tem
=
Fkey_description
(
keys
);
elt_prefix
=
concat2
(
tem
,
build_string
(
" "
));
}
else
elt_prefix
=
Qnil
;
if
(
partial
)
suppress
=
intern
(
"suppress-keymap"
);
...
...
@@ -2076,7 +2063,7 @@ describe_map_2 (keymap, elt_prefix, elt_describer, partial, shadow)
GCPRO3
(
elt_prefix
,
definition
,
kludge
);
for
(
tail
=
XCONS
(
key
map
)
->
cdr
;
CONSP
(
tail
);
tail
=
Fcdr
(
tail
))
for
(
tail
=
XCONS
(
map
)
->
cdr
;
CONSP
(
tail
);
tail
=
Fcdr
(
tail
))
{
QUIT
;
...
...
@@ -2107,7 +2094,7 @@ describe_map_2 (keymap, elt_prefix, elt_describer, partial, shadow)
if
(
!
NILP
(
tem
))
continue
;
}
tem
=
Flookup_key
(
key
map
,
kludge
,
Qt
);
tem
=
Flookup_key
(
map
,
kludge
,
Qt
);
if
(
!
EQ
(
tem
,
definition
))
continue
;
if
(
first
)
...
...
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