(menubar_selection_callback, w32_menu_show): Initialize `entry' to nil.

(w32_dialog_show): Remove unused `save_wv' variable.
(name_is_separator): Recognize "--:foo" and "--foo-bar".
This commit is contained in:
Stefan Monnier 2001-07-11 18:31:41 +00:00
parent 8ee5b6a396
commit fe5a01629a
2 changed files with 20 additions and 8 deletions

View file

@ -1,3 +1,10 @@
2001-07-11 Stefan Monnier <monnier@cs.yale.edu>
* w32menu.c (menubar_selection_callback, w32_menu_show):
Initialize `entry' to nil.
(w32_dialog_show): Remove unused `save_wv' variable.
(name_is_separator): Recognize "--:foo" and "--foo-bar".
2001-07-11 Gerd Moellmann <gerd@gnu.org>
* xdisp.c (try_cursor_movement): Prevent a warning from GCC 3.0.
@ -5,14 +12,14 @@
* fileio.c (unwind_read): Print a message when discarding inserted
text or switching the buffer to unibyte. Change parameter.
(Finsert_file_contents): Don't pass VISIT to unwind_read.
* fileio.c (unwind_read): New function.
(Finsert_file_contents): Record it as unwind-function for
the case that reading is interrupted by C-g.
2001-07-10 Gerd Moellmann <gerd@gnu.org>
* dispnew.c (update_window): Don't skip the header-line
* dispnew.c (update_window): Don't skip the header-line
update when scrolling_window returns 0.
* xfaces.c (unload_color): Do nothing if PIXEL is -1.
@ -60,8 +67,7 @@
(unbind_to): Handle unbinding a frame-local variable.
* xdisp.c (compute_line_metrics): On ttys, subtract continuation
glyphs and truncation glyphs at the end of a row from its pixel
width.
glyphs and truncation glyphs at the end of a row from its pixel width.
(dump_glyph_row): Print row's continuation_lines_width.
(try_window_id): Take the shortcut if ZV is visible in the
window, but there are actually no changes at ZV.

View file

@ -964,6 +964,7 @@ menubar_selection_callback (FRAME_PTR f, void * client_data)
if (!f)
return;
entry = Qnil;
subprefix_stack = (Lisp_Object *) alloca (f->menu_bar_items_used * sizeof (Lisp_Object));
vector = f->menu_bar_vector;
prefix = Qnil;
@ -1765,7 +1766,7 @@ w32_menu_show (f, x, y, for_click, keymaps, title, error)
{
Lisp_Object prefix, entry;
prefix = Qnil;
prefix = entry = Qnil;
i = 0;
while (i < menu_items_used)
{
@ -1833,7 +1834,7 @@ w32_dialog_show (f, keymaps, title, error)
char dialog_name[6];
int menu_item_selection;
widget_value *wv, *save_wv = 0, *first_wv = 0, *prev_wv = 0;
widget_value *wv, *first_wv = 0, *prev_wv = 0;
/* Number of elements seen so far, before boundary. */
int left_count = 0;
@ -2012,9 +2013,14 @@ static int
name_is_separator (name)
char *name;
{
/* Check if name string consists of only dashes ('-') */
char *start = name;
/* Check if name string consists of only dashes ('-'). */
while (*name == '-') name++;
return (*name == '\0');
/* Separators can also be of the form "--:TripleSuperMegaEtched"
or "--deep-shadow". We don't implement them yet, se we just treat
them like normal separators. */
return (*name == '\0' || start + 2 == name);
}