changeset 18085:3da4eaba1fe8

(custom-variable-prompt): Handle variable-at-point returning 0.
author Richard M. Stallman <rms@gnu.org>
date Sun, 01 Jun 1997 05:58:36 +0000
parents 6f264bb70b49
children dbae3eb8b351
files lisp/cus-edit.el
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/cus-edit.el	Sun Jun 01 01:03:51 1997 +0000
+++ b/lisp/cus-edit.el	Sun Jun 01 05:58:36 1997 +0000
@@ -362,7 +362,7 @@
 	 (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 @@
 			       (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'.