From 440735a764419d93c481915904aef24016614f92 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 23 Jul 2010 03:29:46 +0200 Subject: [PATCH] * custom.el (custom-declare-variable): Give clearer error message (bug#6476). --- lisp/ChangeLog | 5 +++++ lisp/custom.el | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) 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) -- 2.39.2