changeset 30184:aa305b5e66ed

(custom-group-menu-create, customize-menu-create): Use :filter, per old XEmacs code.
author Dave Love <fx@gnu.org>
date Thu, 13 Jul 2000 17:05:04 +0000
parents b6c7d5bcf786
children e0a3b434c788
files lisp/cus-edit.el
diffstat 1 files changed, 8 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/cus-edit.el	Thu Jul 13 14:09:50 2000 +0000
+++ b/lisp/cus-edit.el	Thu Jul 13 17:05:04 2000 +0000
@@ -3636,20 +3636,11 @@
 				   ':style 'toggle
 				   ':selected symbol)))
 
-;; Fixme: sort out use of :filter in Emacs 21.
-(if nil ; (string-match "XEmacs" emacs-version)
-    ;; XEmacs can create menus dynamically.
-    (defun custom-group-menu-create (widget symbol)
-      "Ignoring WIDGET, create a menu entry for customization group SYMBOL."
-      `( ,(custom-unlispify-menu-entry symbol t)
-	 :filter (lambda (&rest junk)
-		   (cdr (custom-menu-create ',symbol)))))
-  ;; But emacs can't.
-  (defun custom-group-menu-create (widget symbol)
-    "Ignoring WIDGET, create a menu entry for customization group SYMBOL."
-    ;; Limit the nesting.
-    (let ((custom-menu-nesting (1- custom-menu-nesting)))
-      (custom-menu-create symbol))))
+(defun custom-group-menu-create (widget symbol)
+  "Ignoring WIDGET, create a menu entry for customization group SYMBOL."
+  `( ,(custom-unlispify-menu-entry symbol t)
+     :filter (lambda (&rest junk)
+	       (cdr (custom-menu-create ',symbol)))))
 
 ;;;###autoload
 (defun custom-menu-create (symbol)
@@ -3686,14 +3677,9 @@
 The format is suitable for use with `easy-menu-define'."
   (unless name
     (setq name "Customize"))
-  ;; Fixme: sort out use of :filter in Emacs 21.
-  (if nil ;(string-match "XEmacs" emacs-version)
-      ;; We can delay it under XEmacs.
-      `(,name
-	:filter (lambda (&rest junk)
-		  (cdr (custom-menu-create ',symbol))))
-    ;; But we must create it now under Emacs.
-    (cons name (cdr (custom-menu-create symbol)))))
+  `(,name
+    :filter (lambda (&rest junk)
+	      (cdr (custom-menu-create ',symbol)))))
 
 ;;; The Custom Mode.