summaryrefslogtreecommitdiff
path: root/src/xmenu.c
diff options
context:
space:
mode:
authorDmitry Antipov <dmantipov@yandex.ru>2014-05-29 21:16:00 +0400
committerDmitry Antipov <dmantipov@yandex.ru>2014-05-29 21:16:00 +0400
commitf1b447932d63948a97b21f7d5fbf5230cd6599f4 (patch)
treee5b5b122512e38f4c8872ca25ce8e092363459ef /src/xmenu.c
parentbd5b233d48ad58fcbc2fa01afcde9dc250e40117 (diff)
downloademacs-f1b447932d63948a97b21f7d5fbf5230cd6599f4.tar.gz
emacs-f1b447932d63948a97b21f7d5fbf5230cd6599f4.tar.bz2
emacs-f1b447932d63948a97b21f7d5fbf5230cd6599f4.zip
* xmenu.c (xdialog_show): Remove prototype, rename to
x_dialog_show, remove 2nd arg because it's always zero and simplify accordingly. (xw_popup_dialog): Adjust user. * w32menu.c (w32_dialog_show): Adjust prototype, remove 2nd arg because it's always zero and simplify accordingly. (w32_popup_dialog): Adjust user.
Diffstat (limited to 'src/xmenu.c')
-rw-r--r--src/xmenu.c38
1 files changed, 6 insertions, 32 deletions
diff --git a/src/xmenu.c b/src/xmenu.c
index 9b1ac540c21..683e9c6cd90 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -110,11 +110,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
static Lisp_Object Qdebug_on_next_call;
-#if defined (USE_X_TOOLKIT) || defined (USE_GTK)
-static Lisp_Object xdialog_show (struct frame *, bool, Lisp_Object, Lisp_Object,
- const char **);
-#endif
-
/* Flag which when set indicates a dialog or menu has been posted by
Xt on behalf of one of the widget sets. */
static int popup_activated_flag;
@@ -1839,11 +1834,8 @@ static const char * button_names [] = {
"button6", "button7", "button8", "button9", "button10" };
static Lisp_Object
-xdialog_show (struct frame *f,
- bool keymaps,
- Lisp_Object title,
- Lisp_Object header,
- const char **error_name)
+x_dialog_show (struct frame *f, Lisp_Object title,
+ Lisp_Object header, const char **error_name)
{
int i, nb_buttons=0;
char dialog_name[6];
@@ -1870,16 +1862,13 @@ xdialog_show (struct frame *f,
/* Create a tree of widget_value objects
representing the text label and buttons. */
{
- Lisp_Object pane_name, prefix;
+ Lisp_Object pane_name;
const char *pane_string;
pane_name = AREF (menu_items, MENU_ITEMS_PANE_NAME);
- prefix = AREF (menu_items, MENU_ITEMS_PANE_PREFIX);
pane_string = (NILP (pane_name)
? "" : SSDATA (pane_name));
prev_wv = xmalloc_widget_value ();
prev_wv->value = (char *) pane_string;
- if (keymaps && !NILP (prefix))
- prev_wv->name++;
prev_wv->enabled = 1;
prev_wv->name = "message";
prev_wv->help = Qnil;
@@ -1982,20 +1971,13 @@ xdialog_show (struct frame *f,
the proper value. */
if (menu_item_selection != 0)
{
- Lisp_Object prefix;
-
- prefix = Qnil;
i = 0;
while (i < menu_items_used)
{
Lisp_Object entry;
if (EQ (AREF (menu_items, i), Qt))
- {
- prefix
- = AREF (menu_items, i + MENU_ITEMS_PANE_PREFIX);
- i += MENU_ITEMS_PANE_LENGTH;
- }
+ i += MENU_ITEMS_PANE_LENGTH;
else if (EQ (AREF (menu_items, i), Qquote))
{
/* This is the boundary between left-side elts and
@@ -2007,15 +1989,7 @@ xdialog_show (struct frame *f,
entry
= AREF (menu_items, i + MENU_ITEMS_ITEM_VALUE);
if (menu_item_selection == aref_addr (menu_items, i))
- {
- if (keymaps != 0)
- {
- entry = list1 (entry);
- if (!NILP (prefix))
- entry = Fcons (prefix, entry);
- }
- return entry;
- }
+ return entry;
i += MENU_ITEMS_ITEM_LENGTH;
}
}
@@ -2052,7 +2026,7 @@ xw_popup_dialog (struct frame *f, Lisp_Object header, Lisp_Object contents)
/* Display them in a dialog box. */
block_input ();
- selection = xdialog_show (f, 0, title, header, &error_name);
+ selection = x_dialog_show (f, title, header, &error_name);
unblock_input ();
unbind_to (specpdl_count, Qnil);