From 522ff5074033208da5470ea418bc27777cfcc220 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Mon, 27 Sep 2021 23:34:36 +0200 Subject: [PATCH] Improve coding conventions for error messages * doc/lispref/tips.texi (Programming Tips): Clarify coding conventions for error messages to say that an error message can start with a Lisp symbol. (Bug#50658) --- doc/lispref/tips.texi | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/lispref/tips.texi b/doc/lispref/tips.texi index e56ddf3c28..2eb6c78212 100644 --- a/doc/lispref/tips.texi +++ b/doc/lispref/tips.texi @@ -393,7 +393,13 @@ Programming Tips @item An error message should start with a capital letter but should not end -with a period. +with a period or other punctuation. + +It is occasionally useful to tell the user where an error originated, +even if @code{debug-on-error} is nil. In such cases, a lower-case +Lisp symbol can be added to the error message. For example, the error +message ``Invalid input'' could be extended say ``some-function: +Invalid input''. This convention is better avoided in most cases. @item A question asked in the minibuffer with @code{yes-or-no-p} or -- 2.30.2