From: Richard M. Stallman Date: Sun, 1 Jun 1997 05:58:36 +0000 (+0000) Subject: (custom-variable-prompt): Handle variable-at-point returning 0. X-Git-Tag: emacs-20.1~1861 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5b5cdd97a31b35223adaa703d661ec501ce86420;p=emacs.git (custom-variable-prompt): Handle variable-at-point returning 0. --- diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index c4d6b7f6c2f..8c4bf9deef6 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -362,7 +362,7 @@ Return a list suitable for use in `interactive'." (enable-recursive-minibuffers t) val) (setq val (completing-read - (if v + (if (symbolp v) (format "Customize variable: (default %s) " v) "Customize variable: ") obarray (lambda (symbol) @@ -370,7 +370,8 @@ Return a list suitable for use in `interactive'." (or (get symbol 'custom-type) (user-variable-p symbol)))))) (list (if (equal val "") - v (intern val))))) + (if (symbolp v) v nil) + (intern val))))) (defun custom-menu-filter (menu widget) "Convert MENU to the form used by `widget-choose'.