Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
783a2838
Commit
783a2838
authored
Nov 16, 1994
by
Karl Heuer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(access_keymap): Use type test macros.
parent
36af7d69
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
19 deletions
+15
-19
src/keymap.c
src/keymap.c
+15
-19
No files found.
src/keymap.c
View file @
783a2838
...
...
@@ -296,16 +296,15 @@ access_keymap (map, idx, t_ok, noinherit)
Lisp_Object
binding
;
binding
=
XCONS
(
tail
)
->
car
;
switch
(
XTYPE
(
binding
))
if
(
SYMBOLP
(
binding
))
{
case
Lisp_Symbol
:
/* If NOINHERIT, stop finding prefix definitions
after we pass a second occurrence of the `keymap' symbol. */
if
(
noinherit
&&
EQ
(
binding
,
Qkeymap
)
&&
!
EQ
(
tail
,
map
))
noprefix
=
1
;
break
;
case
Lisp_Cons
:
}
else
if
(
CONSP
(
binding
))
{
if
(
EQ
(
XCONS
(
binding
)
->
car
,
idx
))
{
val
=
XCONS
(
binding
)
->
cdr
;
...
...
@@ -315,17 +314,16 @@ access_keymap (map, idx, t_ok, noinherit)
}
if
(
t_ok
&&
EQ
(
XCONS
(
binding
)
->
car
,
Qt
))
t_binding
=
XCONS
(
binding
)
->
cdr
;
break
;
case
Lisp_Vector
:
}
else
if
(
VECTORP
(
binding
))
{
if
(
NATNUMP
(
idx
)
&&
XFASTINT
(
idx
)
<
XVECTOR
(
binding
)
->
size
)
{
val
=
XVECTOR
(
binding
)
->
contents
[
XINT
(
idx
)];
val
=
XVECTOR
(
binding
)
->
contents
[
X
FAST
INT
(
idx
)];
if
(
noprefix
&&
CONSP
(
val
)
&&
EQ
(
XCONS
(
val
)
->
car
,
Qkeymap
))
return
Qnil
;
return
val
;
}
break
;
}
QUIT
;
...
...
@@ -432,33 +430,31 @@ store_in_keymap (keymap, idx, def)
Lisp_Object
elt
;
elt
=
XCONS
(
tail
)
->
car
;
switch
(
XTYPE
(
elt
))
if
(
VECTORP
(
elt
))
{
case
Lisp_Vector
:
if
(
NATNUMP
(
idx
)
&&
XFASTINT
(
idx
)
<
XVECTOR
(
elt
)
->
size
)
{
XVECTOR
(
elt
)
->
contents
[
XFASTINT
(
idx
)]
=
def
;
return
def
;
}
insertion_point
=
tail
;
break
;
case
Lisp_Cons
:
}
else
if
(
CONSP
(
elt
))
{
if
(
EQ
(
idx
,
XCONS
(
elt
)
->
car
))
{
XCONS
(
elt
)
->
cdr
=
def
;
return
def
;
}
break
;
case
Lisp_Symbol
:
}
else
if
(
SYMBOLP
(
elt
))
{
/* If we find a 'keymap' symbol in the spine of KEYMAP,
then we must have found the start of a second keymap
being used as the tail of KEYMAP, and a binding for IDX
should be inserted before it. */
if
(
EQ
(
elt
,
Qkeymap
))
goto
keymap_end
;
break
;
}
QUIT
;
...
...
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