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
47684cd9
Commit
47684cd9
authored
Sep 18, 1994
by
Richard M. Stallman
Browse files
(Fkey_description): Give error if KEYS not an array.
(get_keyelt, access_keymap, get_keymap_1): Use type test macros.
parent
edd25567
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
src/keymap.c
src/keymap.c
+9
-7
No files found.
src/keymap.c
View file @
47684cd9
...
...
@@ -214,7 +214,7 @@ get_keymap_1 (object, error, autoload)
/* Should we do an autoload? Autoload forms for keymaps have
Qkeymap as their fifth element. */
if
(
autoload
&&
XTYPE
(
object
)
==
Lisp_Symbol
&&
SYMBOLP
(
object
)
&&
CONSP
(
tem
)
&&
EQ
(
XCONS
(
tem
)
->
car
,
Qautoload
))
{
...
...
@@ -279,7 +279,7 @@ access_keymap (map, idx, t_ok, noinherit)
/* If idx is a symbol, it might have modifiers, which need to
be put in the canonical order. */
if
(
XTYPE
(
idx
)
==
Lisp_Symbol
)
if
(
SYMBOLP
(
idx
)
)
idx
=
reorder_modifiers
(
idx
);
else
if
(
INTEGERP
(
idx
))
/* Clobber the high bits that can be present on a machine
...
...
@@ -318,7 +318,7 @@ access_keymap (map, idx, t_ok, noinherit)
break
;
case
Lisp_Vector
:
if
(
XTYPE
(
idx
)
==
Lisp_Int
if
(
INTEGERP
(
idx
)
&&
XINT
(
idx
)
>=
0
&&
XINT
(
idx
)
<
XVECTOR
(
binding
)
->
size
)
{
...
...
@@ -368,14 +368,14 @@ get_keyelt (object, autoload)
use DEFN.
Keymap alist elements like (CHAR MENUSTRING . DEFN)
will be used by HierarKey menus. */
else
if
(
XTYPE
(
object
)
==
Lisp_Cons
&&
XTYPE
(
XCONS
(
object
)
->
car
)
==
Lisp_String
)
else
if
(
CONSP
(
object
)
&&
STRINGP
(
XCONS
(
object
)
->
car
))
{
object
=
XCONS
(
object
)
->
cdr
;
/* Also remove a menu help string, if any,
following the menu item name. */
if
(
XTYPE
(
object
)
==
Lisp_Cons
&&
XTYPE
(
XCONS
(
object
)
->
car
)
==
Lisp_String
)
&&
STRINGP
(
XCONS
(
object
)
->
car
)
==
Lisp_String
)
object
=
XCONS
(
object
)
->
cdr
;
/* Also remove the sublist that caches key equivalences, if any. */
if
(
CONSP
(
object
)
...
...
@@ -1351,7 +1351,7 @@ spaces are put between sequence elements, etc.")
Lisp_Object
sep
;
Lisp_Object
*
args
;
if
(
XTYPE
(
keys
)
==
Lisp_String
)
if
(
STRINGP
(
keys
)
)
{
Lisp_Object
vector
;
vector
=
Fmake_vector
(
Flength
(
keys
),
Qnil
);
...
...
@@ -1366,6 +1366,8 @@ spaces are put between sequence elements, etc.")
}
keys
=
vector
;
}
else
if
(
VECTORP
(
keys
))
keys
=
wrong_type_argument
(
Qarrayp
,
keys
);
/* In effect, this computes
(mapconcat 'single-key-description keys " ")
...
...
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