1 new commit in XEmacs:
https://bitbucket.org/xemacs/xemacs/commits/68f8d295be49/
changeset: 68f8d295be49
user: Jerry James
date: 2013-01-23 19:48:46
summary: Support :visible in menu specifications.
affected #: 12 files
diff -r 489e76b8582868ac588551ea0565ef43e695da54 -r
68f8d295be49fb1f37b708c368bb1b2b06dd75c9 lisp/ChangeLog
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2013-01-22 Jerry James <james(a)xemacs.org>
+
+ * glyphs.el (make-image-specifier): Document that :visible is a
+ widget keyword.
+ * menubar.el (check-menu-syntax): Allow :visible in menu specs.
+
2013-01-04 Stephen J. Turnbull <stephen(a)xemacs.org>
* XEmacs 21.5.33 "horseradish" is released.
diff -r 489e76b8582868ac588551ea0565ef43e695da54 -r
68f8d295be49fb1f37b708c368bb1b2b06dd75c9 lisp/glyphs.el
--- a/lisp/glyphs.el
+++ b/lisp/glyphs.el
@@ -266,7 +266,7 @@
\[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.
diff -r 489e76b8582868ac588551ea0565ef43e695da54 -r
68f8d295be49fb1f37b708c368bb1b2b06dd75c9 lisp/menubar.el
--- a/lisp/menubar.el
+++ b/lisp/menubar.el
@@ -79,9 +79,9 @@
(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 @@
(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"
diff -r 489e76b8582868ac588551ea0565ef43e695da54 -r
68f8d295be49fb1f37b708c368bb1b2b06dd75c9 man/ChangeLog
--- a/man/ChangeLog
+++ b/man/ChangeLog
@@ -1,3 +1,10 @@
+2013-01-22 Jerry James <james(a)xemacs.org>
+
+ * lispref/glyphs.texi (Image Instantiators): Add :visible to the
+ list of allowed menu keywords.
+ * lispref/menus.tex (Menu Format): Document that :visible is an
+ alias for :included.
+
2013-01-04 Stephen J. Turnbull <stephen(a)xemacs.org>
* XEmacs 21.5.33 "horseradish" is released.
diff -r 489e76b8582868ac588551ea0565ef43e695da54 -r
68f8d295be49fb1f37b708c368bb1b2b06dd75c9 man/lispref/glyphs.texi
--- a/man/lispref/glyphs.texi
+++ b/man/lispref/glyphs.texi
@@ -299,6 +299,7 @@
@itemx :filter
@itemx :config
@itemx :included
+@itemx:visible
@itemx :key-sequence
@itemx :accelerator
@itemx :label
diff -r 489e76b8582868ac588551ea0565ef43e695da54 -r
68f8d295be49fb1f37b708c368bb1b2b06dd75c9 man/lispref/menus.texi
--- a/man/lispref/menus.texi
+++ b/man/lispref/menus.texi
@@ -45,6 +45,7 @@
@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 @@
non-@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
+@code{:included}.
@item :config @var{symbol}
This is an efficient shorthand for @code{:included (memq @var{symbol}
diff -r 489e76b8582868ac588551ea0565ef43e695da54 -r
68f8d295be49fb1f37b708c368bb1b2b06dd75c9 src/ChangeLog
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,13 @@
+2013-01-22 Jerry James <james(a)xemacs.org>
+
+ * general-slots.h: Add Q_visible.
+ * gui.c (gui_item_add_keyval_pair): Add :visible as an alias to
+ :included.
+ * menubar.c (vars_of_menubar): Document that :visible is an alias
+ to :included.
+ * menubar-gtk.c (menu_convert): Ditto.
+ * menubar-x.c (menu_item_descriptor_to_widget_value_1): Ditto.
+
2013-01-16 Jerry James <james(a)xemacs.org>
* menubar-x.c (set_frame_menubar): when a menubar specification has an
diff -r 489e76b8582868ac588551ea0565ef43e695da54 -r
68f8d295be49fb1f37b708c368bb1b2b06dd75c9 src/general-slots.h
--- a/src/general-slots.h
+++ b/src/general-slots.h
@@ -312,6 +312,7 @@
SYMBOL_KEYWORD (Q_value);
SYMBOL (Qvalue_assoc);
SYMBOL (Qvertical);
+SYMBOL_KEYWORD (Q_visible);
SYMBOL (Qwarning);
SYMBOL (Qwidget);
SYMBOL (Qwidth);
diff -r 489e76b8582868ac588551ea0565ef43e695da54 -r
68f8d295be49fb1f37b708c368bb1b2b06dd75c9 src/gui.c
--- a/src/gui.c
+++ b/src/gui.c
@@ -144,7 +144,6 @@
}
FROB (suffix)
FROB (active)
- FROB (included)
FROB (config)
FROB (filter)
FROB (style)
@@ -154,6 +153,14 @@
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))
diff -r 489e76b8582868ac588551ea0565ef43e695da54 -r
68f8d295be49fb1f37b708c368bb1b2b06dd75c9 src/menubar-gtk.c
--- a/src/menubar-gtk.c
+++ b/src/menubar-gtk.c
@@ -631,7 +631,7 @@
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;
diff -r 489e76b8582868ac588551ea0565ef43e695da54 -r
68f8d295be49fb1f37b708c368bb1b2b06dd75c9 src/menubar-x.c
--- a/src/menubar-x.c
+++ b/src/menubar-x.c
@@ -172,7 +172,7 @@
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;
diff -r 489e76b8582868ac588551ea0565ef43e695da54 -r
68f8d295be49fb1f37b708c368bb1b2b06dd75c9 src/menubar.c
--- a/src/menubar.c
+++ b/src/menubar.c
@@ -495,7 +495,7 @@
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 @@
: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)
Repository URL:
https://bitbucket.org/xemacs/xemacs/
--
This is a commit notification from
bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches