Hrvoje Niksic <hniksic(a)xemacs.org> writes:
"Andy Piper" <andy(a)xemacs.org> writes:
> This is because Unix builds now default to widgets off.
Shouldn't the menubar check whether widgets are available before
using them?
Quite right. Does the following patch meet the need?
I wasn't sure what the proper alternative to make-search-dialog was.
XEmacs 21.1 used isearch-forward, so that's what I chose.
- Vin
--- lisp/ChangeLog 2003-11-10 05:30:44.359047000 -0500
+++ lisp/ChangeLog 2003-12-04 08:55:02.787048000 -0500
@@ -0,1 +1,6 @@
+2003-12-04 Vin Shelton <acs(a)xemacs.org>
+
+ * menubar-items.el (menu-item-search): Only bring up search dialog
+ box if the feature is available.
+
--- lisp/menubar-items.el 2003-01-07 07:15:36.000000000 -0500
+++ lisp/menubar-items.el 2003-12-04 09:01:17.766075000 -0500
@@ -128,6 +128,13 @@
"")))
(t "")))
+(defun menu-item-search ()
+ "Bring up a search dialog if possible, else do interactive search"
+ (interactive)
+ (if (featurep 'dialog)
+ (make-search-dialog)
+ (isearch-forward)))
+
(defconst default-menubar
; (purecopy-menubar ;purespace is dead
;; note backquote.
@@ -201,7 +208,7 @@
["Select %_All" mark-whole-buffer]
["Select Pa%_ge" mark-page]
"----"
- ["%_Find..." make-search-dialog]
+ ["%_Find..." menu-item-search]
["R%_eplace..." query-replace]
["Replace (Rege%_xp)..." query-replace-regexp]
["%_List Matching Lines..." list-matching-lines]