From: Juanma Barranquero Date: Fri, 23 Jul 2010 01:29:46 +0000 (+0200) Subject: * custom.el (custom-declare-variable): Give clearer error message (bug#6476). X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~51^2~4 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=440735a764419d93c481915904aef24016614f92;p=emacs.git * custom.el (custom-declare-variable): Give clearer error message (bug#6476). --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f8639607abf..d7db00201cb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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 --git a/lisp/custom.el b/lisp/custom.el index 726f70492b3..273c67dc66d 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -143,7 +143,9 @@ set to nil, as the value is no longer rogue." (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)