[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/xmenu.c
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/src/xmenu.c |
Date: |
Sat, 12 Mar 2005 18:29:04 -0500 |
Index: emacs/src/xmenu.c
diff -c emacs/src/xmenu.c:1.280 emacs/src/xmenu.c:1.281
*** emacs/src/xmenu.c:1.280 Thu Feb 3 19:57:33 2005
--- emacs/src/xmenu.c Sat Mar 12 23:29:04 2005
***************
*** 1,6 ****
/* X Communication module for terminals which understand the X protocol.
! Copyright (C) 1986, 1988, 1993, 1994, 1996, 1999, 2000, 2001, 2003, 2004
! Free Software Foundation, Inc.
This file is part of GNU Emacs.
--- 1,6 ----
/* X Communication module for terminals which understand the X protocol.
! Copyright (C) 1986, 1988, 1993, 1994, 1996, 1999, 2000, 2001, 2003, 2004,
! 2005 Free Software Foundation, Inc.
This file is part of GNU Emacs.
***************
*** 138,149 ****
/* gtk just uses utf-8. */
# define ENCODE_MENU_STRING(str) ENCODE_UTF_8 (str)
#else
! /* I'm not convinced ENCODE_SYSTEM is defined correctly, or maybe
! something else should be used here. Except under MS-Windows it
! just converts to unibyte, but encoding with `locale-coding-system'
! seems better -- X may actually display the result correctly, and
! it's not necessarily equivalent to the unibyte text. -- fx */
! # define ENCODE_MENU_STRING(str) ENCODE_SYSTEM (str)
#endif
static void push_menu_item P_ ((Lisp_Object, Lisp_Object, Lisp_Object,
--- 138,144 ----
/* gtk just uses utf-8. */
# define ENCODE_MENU_STRING(str) ENCODE_UTF_8 (str)
#else
! # define ENCODE_MENU_STRING(str) string_make_unibyte (str)
#endif
static void push_menu_item P_ ((Lisp_Object, Lisp_Object, Lisp_Object,
***************
*** 645,654 ****
init_menu_items ();
! for (tail = menu; !NILP (tail); tail = Fcdr (tail))
{
Lisp_Object elt, pane_name, pane_data;
! elt = Fcar (tail);
pane_name = Fcar (elt);
CHECK_STRING (pane_name);
push_menu_pane (ENCODE_MENU_STRING (pane_name), Qnil);
--- 640,649 ----
init_menu_items ();
! for (tail = menu; CONSP (tail); tail = XCDR (tail))
{
Lisp_Object elt, pane_name, pane_data;
! elt = XCAR (tail);
pane_name = Fcar (elt);
CHECK_STRING (pane_name);
push_menu_pane (ENCODE_MENU_STRING (pane_name), Qnil);
***************
*** 668,689 ****
{
Lisp_Object tail, item, item1;
! for (tail = pane; !NILP (tail); tail = Fcdr (tail))
{
! item = Fcar (tail);
if (STRINGP (item))
push_menu_item (ENCODE_MENU_STRING (item), Qnil, Qnil, Qt,
Qnil, Qnil, Qnil, Qnil);
! else if (NILP (item))
! push_left_right_boundary ();
! else
{
! CHECK_CONS (item);
! item1 = Fcar (item);
CHECK_STRING (item1);
! push_menu_item (ENCODE_MENU_STRING (item1), Qt, Fcdr (item),
Qt, Qnil, Qnil, Qnil, Qnil);
}
}
}
--- 663,684 ----
{
Lisp_Object tail, item, item1;
! for (tail = pane; CONSP (tail); tail = XCDR (tail))
{
! item = XCAR (tail);
if (STRINGP (item))
push_menu_item (ENCODE_MENU_STRING (item), Qnil, Qnil, Qt,
Qnil, Qnil, Qnil, Qnil);
! else if (CONSP (item))
{
! item1 = XCAR (item);
CHECK_STRING (item1);
! push_menu_item (ENCODE_MENU_STRING (item1), Qt, XCDR (item),
Qt, Qnil, Qnil, Qnil, Qnil);
}
+ else
+ push_left_right_boundary ();
+
}
}
***************
*** 802,809 ****
if (CONSP (tem))
{
window = Fcar (Fcdr (position));
! x = Fcar (tem);
! y = Fcar (Fcdr (tem));
}
else
{
--- 797,804 ----
if (CONSP (tem))
{
window = Fcar (Fcdr (position));
! x = XCAR (tem);
! y = Fcar (XCDR (tem));
}
else
{
***************
*** 931,941 ****
/* The first keymap that has a prompt string
supplies the menu title. */
! for (tem = menu, i = 0; CONSP (tem); tem = Fcdr (tem))
{
Lisp_Object prompt;
! maps[i++] = keymap = get_keymap (Fcar (tem), 1, 0);
prompt = Fkeymap_prompt (keymap);
if (NILP (title) && !NILP (prompt))
--- 926,936 ----
/* The first keymap that has a prompt string
supplies the menu title. */
! for (tem = menu, i = 0; CONSP (tem); tem = XCDR (tem))
{
Lisp_Object prompt;
! maps[i++] = keymap = get_keymap (XCAR (tem), 1, 0);
prompt = Fkeymap_prompt (keymap);
if (NILP (title) && !NILP (prompt))
***************
*** 1750,1756 ****
#ifndef HAVE_MULTILINGUAL_MENU
if (STRINGP (pane_name) && STRING_MULTIBYTE (pane_name))
{
! pane_name = ENCODE_SYSTEM (pane_name);
AREF (menu_items, i + MENU_ITEMS_PANE_NAME) = pane_name;
}
#endif
--- 1745,1751 ----
#ifndef HAVE_MULTILINGUAL_MENU
if (STRINGP (pane_name) && STRING_MULTIBYTE (pane_name))
{
! pane_name = ENCODE_MENU_STRING (pane_name);
AREF (menu_items, i + MENU_ITEMS_PANE_NAME) = pane_name;
}
#endif
***************
*** 2695,2701 ****
#ifndef HAVE_MULTILINGUAL_MENU
if (STRINGP (pane_name) && STRING_MULTIBYTE (pane_name))
{
! pane_name = ENCODE_SYSTEM (pane_name);
AREF (menu_items, i + MENU_ITEMS_PANE_NAME) = pane_name;
}
#endif
--- 2690,2696 ----
#ifndef HAVE_MULTILINGUAL_MENU
if (STRINGP (pane_name) && STRING_MULTIBYTE (pane_name))
{
! pane_name = ENCODE_MENU_STRING (pane_name);
AREF (menu_items, i + MENU_ITEMS_PANE_NAME) = pane_name;
}
#endif
- [Emacs-diffs] Changes to emacs/src/xmenu.c,
Stefan Monnier <=