[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master e9c7ef3: Improve coding conventions for error messages
From: |
Stefan Kangas |
Subject: |
master e9c7ef3: Improve coding conventions for error messages |
Date: |
Tue, 28 Sep 2021 08:56:27 -0400 (EDT) |
branch: master
commit e9c7ef3348b8acad25162fa91ee2156816722317
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>
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 e56ddf3..e8f7a3c 100644
--- a/doc/lispref/tips.texi
+++ b/doc/lispref/tips.texi
@@ -393,7 +393,13 @@ Don't use @code{message}, @code{throw}, @code{sleep-for},
or
@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 prepended to the error message. For example, the
+error message ``Invalid input'' could be extended to say
+``some-function: Invalid input''.
@item
A question asked in the minibuffer with @code{yes-or-no-p} or
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master e9c7ef3: Improve coding conventions for error messages,
Stefan Kangas <=