changeset 109490:715d5a9df4aa

* custom.el (custom-declare-variable): Give clearer error message (bug#6476).
author Juanma Barranquero <lekktu@gmail.com>
date Fri, 23 Jul 2010 03:29:46 +0200
parents b4b02bfd4d95
children 73388ad3c364
files lisp/ChangeLog lisp/custom.el
diffstat 2 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Thu Jul 22 20:59:43 2010 -0400
+++ b/lisp/ChangeLog	Fri Jul 23 03:29:46 2010 +0200
@@ -1,3 +1,8 @@
+2010-07-23  Juanma Barranquero  <lekktu@gmail.com>
+
+	* custom.el (custom-declare-variable): Give a clearer error message
+	when the docstring is missing (bug#6476).
+
 2010-07-22  Michael R. Mauger  <mmaug@yahoo.com>
 
 	* progmodes/sql.el: Version 2.4.  Improved Login prompting.
--- a/lisp/custom.el	Thu Jul 22 20:59:43 2010 -0400
+++ b/lisp/custom.el	Fri Jul 23 03:29:46 2010 +0200
@@ -143,7 +143,9 @@
   (when (get symbol 'force-value)
     (put symbol 'force-value nil))
   (when doc
-    (put symbol 'variable-documentation doc))
+    (if (keywordp doc)
+	(error "Doc string is missing")
+      (put symbol 'variable-documentation doc)))
   (let ((initialize 'custom-initialize-reset)
 	(requests nil))
     (unless (memq :group args)