[xemacs] Update -menubar patch so :visible keyword is accepted in menus (bz 890565).
Jerry James
jjames at fedoraproject.org
Tue Feb 5 17:11:05 UTC 2013
commit 10651de1508a68820d498e956a198bdbdc8a7500
Author: Jerry James <jamesjer at betterlinux.com>
Date: Tue Feb 5 10:10:52 2013 -0700
Update -menubar patch so :visible keyword is accepted in menus (bz 890565).
xemacs-21.5.33-menubar.patch | 144 +++++++++++++++++++++++++++++++++++++++++-
xemacs.spec | 5 +-
2 files changed, 146 insertions(+), 3 deletions(-)
---
diff --git a/xemacs-21.5.33-menubar.patch b/xemacs-21.5.33-menubar.patch
index abcd13b..e9a5c6b 100644
--- a/xemacs-21.5.33-menubar.patch
+++ b/xemacs-21.5.33-menubar.patch
@@ -1,5 +1,78 @@
---- src/menubar-x.c.orig 2013-01-04 09:57:15.000000000 -0700
-+++ src/menubar-x.c 2013-01-21 10:55:55.316470308 -0700
+--- ./lisp/menubar.el.orig 2013-01-04 09:57:14.000000000 -0700
++++ ./lisp/menubar.el 2013-02-05 09:59:42.868427364 -0700
+@@ -79,9 +79,9 @@ See `current-menubar' for a description
+ (setq menu (cdr menu)))
+ (let (menuitem item)
+ (while (keywordp (setq item (car menu)))
+- (or (memq item '(:config :included :filter :accelerator :active))
++ (or (memq item '(:config :included :visible :filter :accelerator :active))
+ (signal 'error
+- (list "menu keyword must be :config, :included, :accelerator, :active or :filter"
++ (list "menu keyword must be :config, :included, :visible, :accelerator, :active or :filter"
+ item)))
+ (if (or (not (cdr menu))
+ (vectorp (nth 1 menu))
+@@ -135,7 +135,7 @@ See `current-menubar' for a description
+ (setq item (aref menuitem i))
+ (cond ((not (memq item '(:active :suffix :keys :style
+ :full :included :selected
+- :accelerator)))
++ :visible :accelerator)))
+ (signal 'error
+ (list (if (keywordp item)
+ "unknown menu item keyword"
+--- ./lisp/glyphs.el.orig 2013-01-04 09:57:13.000000000 -0700
++++ ./lisp/glyphs.el 2013-02-05 09:58:48.573508226 -0700
+@@ -266,7 +266,7 @@ The valid keywords are:
+ \[WIDGET-KEYWORDS] stands for the standard keywords accepted by widgets:
+ These are `:selected', `:active', `:suffix', `:keys', `:style',
+ `:filter', `:config', `:included', `:key-sequence', `:accelerator',
+-`:label', `:callback', `:initial-focus', and `:descriptor'.
++`:label', `:callback', `:initial-focus', `:descriptor', and ':visible'.
+ #### Document me.
+
+ \[GUI-KEYWORDS] stands for keywords accepted by many widgets.
+--- ./man/lispref/menus.texi.orig 2013-01-04 09:57:14.000000000 -0700
++++ ./man/lispref/menus.texi 2013-02-05 10:00:53.460322321 -0700
+@@ -45,6 +45,7 @@ to five keyword-value pairs, as follows:
+ @item :included @var{form}
+ This can be used to control the visibility of a menu. The form is
+ evaluated and the menu will be omitted if the result is @code{nil}.
++The keyword @code{:visible} is an alias for @code{:included}.
+
+ @item :config @var{symbol}
+ This is an efficient shorthand for @code{:included (memq @var{symbol}
+@@ -224,7 +225,8 @@ evaluated and the menu item is only disp
+ non- at code{nil}. Note that this is different from @code{:active}: If
+ @code{:active} evaluates to @code{nil}, the item will be displayed
+ grayed out, while if @code{:included} evaluates to @code{nil}, the item
+-will be omitted entirely.
++will be omitted entirely.. The keyword @code{:visible} is an alias for
++ at code{:included}.
+
+ @item :config @var{symbol}
+ This is an efficient shorthand for @code{:included (memq @var{symbol}
+--- ./man/lispref/glyphs.texi.orig 2013-01-04 09:57:14.000000000 -0700
++++ ./man/lispref/glyphs.texi 2013-02-05 10:00:02.476398191 -0700
+@@ -299,6 +299,7 @@ It defaults to gui-element-face.
+ @itemx :filter
+ @itemx :config
+ @itemx :included
++ at itemx :visible
+ @itemx :key-sequence
+ @itemx :accelerator
+ @itemx :label
+--- ./src/menubar-x.c.orig 2013-01-04 09:57:15.000000000 -0700
++++ ./src/menubar-x.c 2013-02-05 10:05:27.299914481 -0700
+@@ -172,7 +172,7 @@ menu_item_descriptor_to_widget_value_1 (
+ sferror ("Keyword in menu lacks a value", cascade);
+ val = Fcar (desc);
+ desc = Fcdr (desc);
+- if (EQ (key, Q_included))
++ if (EQ (key, Q_included) || EQ (key, Q_visible))
+ include_p = val, included_spec = 1;
+ else if (EQ (key, Q_config))
+ config_tag = val;
@@ -516,6 +516,9 @@ pre_activate_callback (Widget widget, LW
}
}
@@ -29,3 +102,70 @@
}
+--- ./src/gui.c.orig 2013-02-05 10:01:22.773278691 -0700
++++ ./src/gui.c 2013-02-05 10:04:22.436011132 -0700
+@@ -144,7 +144,6 @@ gui_item_add_keyval_pair (Lisp_Object gu
+ }
+ FROB (suffix)
+ FROB (active)
+- FROB (included)
+ FROB (config)
+ FROB (filter)
+ FROB (style)
+@@ -154,6 +153,14 @@ gui_item_add_keyval_pair (Lisp_Object gu
+ FROB (callback_ex)
+ FROB (value)
+ #undef FROB
++ else if (EQ (key, Q_included) || EQ (key, Q_visible))
++ {
++ if (!EQ (pgui_item->included, val))
++ {
++ retval = 1;
++ pgui_item->included = val;
++ }
++ }
+ else if (EQ (key, Q_key_sequence)) ; /* ignored for FSF compatibility */
+ else if (EQ (key, Q_label)) ; /* ignored for 21.0 implement in 21.2 */
+ else if (EQ (key, Q_accelerator))
+--- ./src/general-slots.h.orig 2013-01-04 09:57:15.000000000 -0700
++++ ./src/general-slots.h 2013-02-05 10:01:18.900284456 -0700
+@@ -312,6 +312,7 @@ SYMBOL (Quser_default);
+ SYMBOL_KEYWORD (Q_value);
+ SYMBOL (Qvalue_assoc);
+ SYMBOL (Qvertical);
++SYMBOL_KEYWORD (Q_visible);
+ SYMBOL (Qwarning);
+ SYMBOL (Qwidget);
+ SYMBOL (Qwidth);
+--- ./src/menubar-gtk.c.orig 2013-01-04 09:57:15.000000000 -0700
++++ ./src/menubar-gtk.c 2013-02-05 10:05:03.315950221 -0700
+@@ -631,7 +631,7 @@ menu_convert (Lisp_Object desc, GtkWidge
+ cascade);
+ val = Fcar (desc);
+ desc = Fcdr (desc);
+- if (EQ (key, Q_included))
++ if (EQ (key, Q_included) || EQ(key, Q_visible))
+ include_p = val, included_spec = 1;
+ else if (EQ (key, Q_config))
+ config_tag = val;
+--- ./src/menubar.c.orig 2013-01-04 09:57:15.000000000 -0700
++++ ./src/menubar.c 2013-02-05 10:05:59.428866597 -0700
+@@ -495,7 +495,7 @@ the first character has been tagged as a
+
+ Immediately following the name string of the menu, various optional
+ keyword-value pairs are permitted: currently, :filter, :active, :included,
+-and :config. (See below.)
++:visible, and :config. (See below.)
+
+ If an element of a menu (or menubar) is a string, then that string will be
+ presented as unselectable text.
+@@ -597,7 +597,8 @@ The possible keywords are:
+
+ :included <form> This can be used to control the visibility of a menu or
+ menu item. The form is evaluated and the menu or menu
+- item is only displayed if the result is non-nil.
++ item is only displayed if the result is non-nil. The
++ keyword :visible is an alias for :included.
+
+ :config <symbol> This is an efficient shorthand for
+ :included (memq symbol menubar-configuration)
diff --git a/xemacs.spec b/xemacs.spec
index eaf703a..b957b6e 100644
--- a/xemacs.spec
+++ b/xemacs.spec
@@ -21,7 +21,7 @@
Name: xemacs
Version: 21.5.33
-Release: 3%{?snap:.%{snap}}%{?dist}
+Release: 4%{?snap:.%{snap}}%{?dist}
Summary: Different version of Emacs
Group: Applications/Editors
@@ -652,6 +652,9 @@ fi
%dir %{_datadir}/xemacs/site-packages/pkginfo
%changelog
+* Tue Feb 5 2013 Jerry James <loganjerry at gmail.com> - 21.5.33-4
+- Update -menubar patch so :visible keyword is accepted in menus (bz 890565)
+
* Mon Jan 21 2013 Jerry James <loganjerry at gmail.com> - 21.5.33-3
- Add -menubar patch to fix bz 890565
More information about the scm-commits
mailing list