aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2002-08-30 21:52:10 +0000
committerStefan Monnier2002-08-30 21:52:10 +0000
commit3b2f3d306efc27458662cb3572c90a68cd4b99fa (patch)
treee161f73745c83aa19979e40bf08784e1408ebdb0
parentcb285f914884589c59e4a2a5a645162f433b62ae (diff)
downloademacs-3b2f3d306efc27458662cb3572c90a68cd4b99fa.tar.gz
emacs-3b2f3d306efc27458662cb3572c90a68cd4b99fa.zip
(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).
-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."
448 (erase-buffer) 448 (erase-buffer)
449 (princ symbol (current-buffer)) 449 (princ symbol (current-buffer))
450 (goto-char (point-min)) 450 (goto-char (point-min))
451 (when (and (eq (get symbol 'custom-type) 'boolean) 451 ;; FIXME: Boolean variables are not predicates, so they shouldn't
452 (re-search-forward "-p\\'" nil t)) 452 ;; end with `-p'. -stef
453 (replace-match "" t t) 453 ;; (when (and (eq (get symbol 'custom-type) 'boolean)
454 (goto-char (point-min))) 454 ;; (re-search-forward "-p\\'" nil t))
455 ;; (replace-match "" t t)
456 ;; (goto-char (point-min)))
455 (if custom-unlispify-remove-prefixes 457 (if custom-unlispify-remove-prefixes
456 (let ((prefixes custom-prefix-list) 458 (let ((prefixes custom-prefix-list)
457 prefix) 459 prefix)
@@ -3806,7 +3808,8 @@ or (if there were none) at the end of the buffer."
3806 "Ignoring WIDGET, create a menu entry for customization group SYMBOL." 3808 "Ignoring WIDGET, create a menu entry for customization group SYMBOL."
3807 `( ,(custom-unlispify-menu-entry symbol t) 3809 `( ,(custom-unlispify-menu-entry symbol t)
3808 :filter (lambda (&rest junk) 3810 :filter (lambda (&rest junk)
3809 (cdr (custom-menu-create ',symbol))))) 3811 (let ((menu (custom-menu-create ',symbol)))
3812 (if (consp menu) (cdr menu) menu)))))
3810 3813
3811;;;###autoload 3814;;;###autoload
3812(defun custom-menu-create (symbol) 3815(defun custom-menu-create (symbol)
@@ -3845,7 +3848,8 @@ The format is suitable for use with `easy-menu-define'."
3845 (setq name "Customize")) 3848 (setq name "Customize"))
3846 `(,name 3849 `(,name
3847 :filter (lambda (&rest junk) 3850 :filter (lambda (&rest junk)
3848 (custom-menu-create ',symbol)))) 3851 (let ((menu (custom-menu-create ',symbol)))
3852 (if (consp menu) (cdr menu) menu)))))
3849 3853
3850;;; The Custom Mode. 3854;;; The Custom Mode.
3851 3855