Mercurial > emacs
changeset 18360:85a1366cbcec
(customize-menu-create): Return nil if Emacs.
(custom-mode): Handle custom-mode-customize-menu being nil.
(custom-mode-customize-menu): Don't initialize if customize-menu-create
returns nil.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 21 Jun 1997 05:02:47 +0000 |
parents | 057bb638549c |
children | eecbc06aed1c |
files | lisp/cus-edit.el |
diffstat | 1 files changed, 12 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/cus-edit.el Sat Jun 21 04:54:54 1997 +0000 +++ b/lisp/cus-edit.el Sat Jun 21 05:02:47 1997 +0000 @@ -2682,9 +2682,7 @@ ;; 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))))) + (cdr (custom-menu-create ',symbol)))))) ;;; The Custom Mode. @@ -2697,10 +2695,15 @@ (suppress-keymap custom-mode-map) (define-key custom-mode-map "q" 'bury-buffer)) -(easy-menu-define custom-mode-customize-menu - custom-mode-map - "Menu used to customize customization buffers." - (customize-menu-create 'customize)) +(defvar custom-mode-customize-menu) +(let ((menu (customize-menu-create 'customize))) + ;; In Emacs, this returns nil, so don't make this menu. + (if menu + (easy-menu-define custom-mode-customize-menu + custom-mode-map + "Menu used to customize customization buffers." + menu) + (setq custom-mode-customize-menu nil))) (easy-menu-define custom-mode-menu custom-mode-map @@ -2739,7 +2742,8 @@ (setq major-mode 'custom-mode mode-name "Custom") (use-local-map custom-mode-map) - (easy-menu-add custom-mode-customize-menu) + (if custom-mode-customize-menu + (easy-menu-add custom-mode-customize-menu)) (easy-menu-add custom-mode-menu) (make-local-variable 'custom-options) (run-hooks 'custom-mode-hook))