diff options
| author | Dmitry Antipov | 2014-07-14 08:44:01 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2014-07-14 08:44:01 +0400 |
| commit | 201b685783301c9acfda413d1860763f0e941601 (patch) | |
| tree | c16759bbe8c1e4a6ddea7f783e55c0710f00f0a5 /src/keymap.c | |
| parent | a705278de7c661af9b78d956af25e13055cba864 (diff) | |
| download | emacs-201b685783301c9acfda413d1860763f0e941601.tar.gz emacs-201b685783301c9acfda413d1860763f0e941601.zip | |
* lisp.h (CHECK_VECTOR_OR_STRING): Return number of elements
or characters in string, respectively. Add comment.
* fringe.c (Fdefine_fringe_bitmap):
* fns.c (Fsubstring, substring_both): Use it.
* keymap.c (Fdefine_key, Flookup_key):
* macros.c (Fstart_kbd_macro): Likewise. Avoid call to Flength.
Diffstat (limited to 'src/keymap.c')
| -rw-r--r-- | src/keymap.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/keymap.c b/src/keymap.c index 76119606643..f4dd644aebd 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -1092,9 +1092,7 @@ binding KEY to DEF is added at the front of KEYMAP. */) | |||
| 1092 | GCPRO3 (keymap, key, def); | 1092 | GCPRO3 (keymap, key, def); |
| 1093 | keymap = get_keymap (keymap, 1, 1); | 1093 | keymap = get_keymap (keymap, 1, 1); |
| 1094 | 1094 | ||
| 1095 | CHECK_VECTOR_OR_STRING (key); | 1095 | length = CHECK_VECTOR_OR_STRING (key); |
| 1096 | |||
| 1097 | length = XFASTINT (Flength (key)); | ||
| 1098 | if (length == 0) | 1096 | if (length == 0) |
| 1099 | RETURN_UNGCPRO (Qnil); | 1097 | RETURN_UNGCPRO (Qnil); |
| 1100 | 1098 | ||
| @@ -1248,9 +1246,7 @@ recognize the default bindings, just as `read-key-sequence' does. */) | |||
| 1248 | GCPRO2 (keymap, key); | 1246 | GCPRO2 (keymap, key); |
| 1249 | keymap = get_keymap (keymap, 1, 1); | 1247 | keymap = get_keymap (keymap, 1, 1); |
| 1250 | 1248 | ||
| 1251 | CHECK_VECTOR_OR_STRING (key); | 1249 | length = CHECK_VECTOR_OR_STRING (key); |
| 1252 | |||
| 1253 | length = XFASTINT (Flength (key)); | ||
| 1254 | if (length == 0) | 1250 | if (length == 0) |
| 1255 | RETURN_UNGCPRO (keymap); | 1251 | RETURN_UNGCPRO (keymap); |
| 1256 | 1252 | ||