From: Stefan Monnier Date: Fri, 30 Aug 2002 21:35:53 +0000 (+0000) Subject: (custom-group-menu-create): Only cdr if possible X-Git-Tag: emacs-pretest-21.2.91~83 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e27c6c804baf9abdf10268c410c4a831d5d7fa0f;p=emacs.git (custom-group-menu-create): Only cdr if possible since custom-menu-create might return a single menu entry (a vector). --- diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 7f48db888ba..ce9829578f4 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -3694,7 +3694,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)