diff options
Diffstat (limited to 'src/keymap.c')
| -rw-r--r-- | src/keymap.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/keymap.c b/src/keymap.c index f4dd644aebd..f7256bfde2a 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -2883,13 +2883,14 @@ You type Translation\n\ | |||
| 2883 | if (!SYMBOLP (modes[i])) | 2883 | if (!SYMBOLP (modes[i])) |
| 2884 | emacs_abort (); | 2884 | emacs_abort (); |
| 2885 | 2885 | ||
| 2886 | p = title = alloca (42 + SCHARS (SYMBOL_NAME (modes[i]))); | 2886 | USE_SAFE_ALLOCA; |
| 2887 | p = title = SAFE_ALLOCA (42 + SBYTES (SYMBOL_NAME (modes[i]))); | ||
| 2887 | *p++ = '\f'; | 2888 | *p++ = '\f'; |
| 2888 | *p++ = '\n'; | 2889 | *p++ = '\n'; |
| 2889 | *p++ = '`'; | 2890 | *p++ = '`'; |
| 2890 | memcpy (p, SDATA (SYMBOL_NAME (modes[i])), | 2891 | memcpy (p, SDATA (SYMBOL_NAME (modes[i])), |
| 2891 | SCHARS (SYMBOL_NAME (modes[i]))); | 2892 | SBYTES (SYMBOL_NAME (modes[i]))); |
| 2892 | p += SCHARS (SYMBOL_NAME (modes[i])); | 2893 | p += SBYTES (SYMBOL_NAME (modes[i])); |
| 2893 | *p++ = '\''; | 2894 | *p++ = '\''; |
| 2894 | memcpy (p, " Minor Mode Bindings", strlen (" Minor Mode Bindings")); | 2895 | memcpy (p, " Minor Mode Bindings", strlen (" Minor Mode Bindings")); |
| 2895 | p += strlen (" Minor Mode Bindings"); | 2896 | p += strlen (" Minor Mode Bindings"); |
| @@ -2898,6 +2899,7 @@ You type Translation\n\ | |||
| 2898 | describe_map_tree (maps[i], 1, shadow, prefix, | 2899 | describe_map_tree (maps[i], 1, shadow, prefix, |
| 2899 | title, nomenu, 0, 0, 0); | 2900 | title, nomenu, 0, 0, 0); |
| 2900 | shadow = Fcons (maps[i], shadow); | 2901 | shadow = Fcons (maps[i], shadow); |
| 2902 | SAFE_FREE (); | ||
| 2901 | } | 2903 | } |
| 2902 | 2904 | ||
| 2903 | start1 = get_local_map (BUF_PT (XBUFFER (buffer)), | 2905 | start1 = get_local_map (BUF_PT (XBUFFER (buffer)), |
| @@ -3184,10 +3186,10 @@ describe_map (Lisp_Object map, Lisp_Object prefix, | |||
| 3184 | 3186 | ||
| 3185 | /* These accumulate the values from sparse keymap bindings, | 3187 | /* These accumulate the values from sparse keymap bindings, |
| 3186 | so we can sort them and handle them in order. */ | 3188 | so we can sort them and handle them in order. */ |
| 3187 | int length_needed = 0; | 3189 | ptrdiff_t length_needed = 0; |
| 3188 | struct describe_map_elt *vect; | 3190 | struct describe_map_elt *vect; |
| 3189 | int slots_used = 0; | 3191 | ptrdiff_t slots_used = 0; |
| 3190 | int i; | 3192 | ptrdiff_t i; |
| 3191 | 3193 | ||
| 3192 | suppress = Qnil; | 3194 | suppress = Qnil; |
| 3193 | 3195 | ||
| @@ -3207,7 +3209,8 @@ describe_map (Lisp_Object map, Lisp_Object prefix, | |||
| 3207 | for (tail = map; CONSP (tail); tail = XCDR (tail)) | 3209 | for (tail = map; CONSP (tail); tail = XCDR (tail)) |
| 3208 | length_needed++; | 3210 | length_needed++; |
| 3209 | 3211 | ||
| 3210 | vect = alloca (length_needed * sizeof *vect); | 3212 | USE_SAFE_ALLOCA; |
| 3213 | SAFE_NALLOCA (vect, 1, length_needed); | ||
| 3211 | 3214 | ||
| 3212 | for (tail = map; CONSP (tail); tail = XCDR (tail)) | 3215 | for (tail = map; CONSP (tail); tail = XCDR (tail)) |
| 3213 | { | 3216 | { |
| @@ -3350,6 +3353,7 @@ describe_map (Lisp_Object map, Lisp_Object prefix, | |||
| 3350 | } | 3353 | } |
| 3351 | } | 3354 | } |
| 3352 | 3355 | ||
| 3356 | SAFE_FREE (); | ||
| 3353 | UNGCPRO; | 3357 | UNGCPRO; |
| 3354 | } | 3358 | } |
| 3355 | 3359 | ||