properties may not work reliable, as they are only
recognized when the menu-bar (or mode-line) is updated,
which does not normally happen after every command. */
- Lisp_Object tem;
- ptrdiff_t nminor;
- nminor = current_minor_maps (NULL, &tmaps);
+ ptrdiff_t nminor = current_minor_maps (NULL, &tmaps);
SAFE_NALLOCA (maps, 1, nminor + 4);
nmaps = 0;
- tem = KVAR (current_kboard, Voverriding_terminal_local_map);
+ Lisp_Object tem = KVAR (current_kboard, Voverriding_terminal_local_map);
if (!NILP (tem) && !NILP (Voverriding_local_map_menu_flag))
maps[nmaps++] = tem;
if (tem = get_local_map (PT, current_buffer, Qkeymap), !NILP (tem))
maps[nmaps++] = tem;
- memcpy (maps + nmaps, tmaps, nminor * sizeof (maps[0]));
- nmaps += nminor;
+ if (nminor != 0)
+ {
+ memcpy (maps + nmaps, tmaps, nminor * sizeof (maps[0]));
+ nmaps += nminor;
+ }
maps[nmaps++] = get_local_map (PT, current_buffer, Qlocal_map);
}
maps[nmaps++] = current_global_map;
properties may not work reliable, as they are only
recognized when the tool-bar (or mode-line) is updated,
which does not normally happen after every command. */
- Lisp_Object tem;
- ptrdiff_t nminor;
- nminor = current_minor_maps (NULL, &tmaps);
+ ptrdiff_t nminor = current_minor_maps (NULL, &tmaps);
SAFE_NALLOCA (maps, 1, nminor + 4);
nmaps = 0;
- tem = KVAR (current_kboard, Voverriding_terminal_local_map);
+ Lisp_Object tem = KVAR (current_kboard, Voverriding_terminal_local_map);
if (!NILP (tem) && !NILP (Voverriding_local_map_menu_flag))
maps[nmaps++] = tem;
if (tem = get_local_map (PT, current_buffer, Qkeymap), !NILP (tem))
maps[nmaps++] = tem;
- memcpy (maps + nmaps, tmaps, nminor * sizeof (maps[0]));
- nmaps += nminor;
+ if (nminor != 0)
+ {
+ memcpy (maps + nmaps, tmaps, nminor * sizeof (maps[0]));
+ nmaps += nminor;
+ }
maps[nmaps++] = get_local_map (PT, current_buffer, Qlocal_map);
}
while (p < string + string_len)
{
/* The chunk we're about to stick on the end of result. */
- const char *next = NULL;
- ptrdiff_t next_len;
+ const char *next = p;
+ ptrdiff_t next_len = 1;
if (*p == '%')
{
break;
case 'C':
- next = (x_customization_string
- ? x_customization_string
- : "");
- next_len = strlen (next);
+ if (x_customization_string)
+ {
+ next = x_customization_string;
+ next_len = strlen (next);
+ }
+ else
+ next_len = 0;
break;
case 'N':
return NULL;
}
}
- else
- next = p, next_len = 1;
/* Do we have room for this component followed by a '\0'? */
if (path_size - path_len <= next_len)