# HG changeset patch # User Juanma Barranquero # Date 1279848586 -7200 # Node ID 715d5a9df4aa55005c2a824e9d3295d5cbd71203 # Parent b4b02bfd4d95020a6e2dc6f491a6366a23d9761c * custom.el (custom-declare-variable): Give clearer error message (bug#6476). diff -r b4b02bfd4d95 -r 715d5a9df4aa lisp/ChangeLog --- 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 + + * custom.el (custom-declare-variable): Give a clearer error message + when the docstring is missing (bug#6476). + 2010-07-22 Michael R. Mauger * progmodes/sql.el: Version 2.4. Improved Login prompting. diff -r b4b02bfd4d95 -r 715d5a9df4aa lisp/custom.el --- 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)