From: Dave Love Date: Thu, 13 Jul 2000 17:06:15 +0000 (+0000) Subject: (custom-group-menu-create, customize-menu-create): Use :filter, per old X-Git-Tag: emacs-pretest-21.0.90~2856 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d04a3972bf11e44110b07b6fe5cb5bc7006e3345;p=emacs.git (custom-group-menu-create, customize-menu-create): Use :filter, per old XEmacs code. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 247bf61e162..b4a951adedf 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2000-07-13 Dave Love + + * cus-edit.el (custom-group-menu-create, customize-menu-create): + Use :filter, per old XEmacs code. + 2000-07-12 Gerd Moellmann * term.el (term-send-raw-meta): Strip modifiers from the keyboard diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 8c2a801ba77..c05c0d05666 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -3636,20 +3636,11 @@ or (if there were none) at the end of the buffer." ':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 @@ Otherwise the menu will be named `Customize'. 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.