From: Jan D Date: Sun, 15 Aug 2010 13:18:14 +0000 (+0200) Subject: * keyboard.c (parse_tool_bar_item): Put in a bad label if :label X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~48^2~285 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0005830ccc2791b249e2f33629e70de496a9de84;p=emacs.git * keyboard.c (parse_tool_bar_item): Put in a bad label if :label isn't a string. --- diff --git a/src/ChangeLog b/src/ChangeLog index fc3d815ad49..e7a6d1c3132 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-08-15 Jan Djärv + + * keyboard.c (parse_tool_bar_item): Put in a bad label if :label + isn't a string. + 2010-08-15 Andreas Schwab * keyboard.c (parse_tool_bar_item): Avoid excessive use of strlen. diff --git a/src/keyboard.c b/src/keyboard.c index 6493fa5f9fd..570bf360eb5 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -8285,12 +8285,15 @@ parse_tool_bar_item (Lisp_Object key, Lisp_Object item) return 0; } else if (EQ (key, QChelp)) - /* `:help HELP-STRING'. */ - PROP (TOOL_BAR_ITEM_HELP) = value; + /* `:help HELP-STRING'. */ + PROP (TOOL_BAR_ITEM_HELP) = value; else if (EQ (key, QClabel)) { + const char *bad_label = "!!?GARBLED ITEM?!!"; /* `:label LABEL-STRING'. */ - PROP (TOOL_BAR_ITEM_LABEL) = value; + PROP (TOOL_BAR_ITEM_HELP) = STRINGP (value) + ? value + : make_string (bad_label, strlen (bad_label)); have_label = 1; } else if (EQ (key, QCfilter))