summaryrefslogtreecommitdiff
path: root/lisp/cus-edit.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2002-08-30 21:52:10 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2002-08-30 21:52:10 +0000
commit3b2f3d306efc27458662cb3572c90a68cd4b99fa (patch)
treee161f73745c83aa19979e40bf08784e1408ebdb0 /lisp/cus-edit.el
parentcb285f914884589c59e4a2a5a645162f433b62ae (diff)
downloademacs-3b2f3d306efc27458662cb3572c90a68cd4b99fa.tar.gz
(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).
Diffstat (limited to 'lisp/cus-edit.el')
-rw-r--r--lisp/cus-edit.el16
1 files changed, 10 insertions, 6 deletions
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 1fdb56b1439..770f8f723f8 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -448,10 +448,12 @@ WIDGET is the widget to apply the filter entries of MENU on."
(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 @@ or (if there were none) at the end of the buffer."
"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 @@ The format is suitable for use with `easy-menu-define'."
(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.