# HG changeset patch # User Stefan Monnier # Date 1030744330 0 # Node ID 59fc9e6fd3e8d21005e34bf78a88f7dbf98ac33a # Parent fb51fc1dba63bc04e9600c423eb9de7d21e4d52b (custom-unlispify-menu-entry): Don't remove the -p prefix from variables since they shouldn't have it anyway. (custom-group-menu-create, customize-menu-create): Only cdr if applicable, since custom-menu-create might return a vector (i.e. a single menu entry). diff -r fb51fc1dba63 -r 59fc9e6fd3e8 lisp/cus-edit.el --- a/lisp/cus-edit.el Fri Aug 30 20:41:05 2002 +0000 +++ b/lisp/cus-edit.el Fri Aug 30 21:52:10 2002 +0000 @@ -448,10 +448,12 @@ (erase-buffer) (princ symbol (current-buffer)) (goto-char (point-min)) - (when (and (eq (get symbol 'custom-type) 'boolean) - (re-search-forward "-p\\'" nil t)) - (replace-match "" t t) - (goto-char (point-min))) + ;; FIXME: Boolean variables are not predicates, so they shouldn't + ;; end with `-p'. -stef + ;; (when (and (eq (get symbol 'custom-type) 'boolean) + ;; (re-search-forward "-p\\'" nil t)) + ;; (replace-match "" t t) + ;; (goto-char (point-min))) (if custom-unlispify-remove-prefixes (let ((prefixes custom-prefix-list) prefix) @@ -3806,7 +3808,8 @@ "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))))) + (let ((menu (custom-menu-create ',symbol))) + (if (consp menu) (cdr menu) menu))))) ;;;###autoload (defun custom-menu-create (symbol) @@ -3845,7 +3848,8 @@ (setq name "Customize")) `(,name :filter (lambda (&rest junk) - (custom-menu-create ',symbol)))) + (let ((menu (custom-menu-create ',symbol))) + (if (consp menu) (cdr menu) menu))))) ;;; The Custom Mode.