From de9f1bcfe4d335a84a19587b56be03c788d93635 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Fri, 21 Feb 2025 18:31:10 +0100 Subject: [PATCH] Better help-echo for condition symbols --- lisp/progmodes/elisp-mode.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 99c70a09e4a..6a1e67b3cbe 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -460,7 +460,12 @@ happens in interactive invocations." (widget-type "Widget type") (type "Type") (group "Customization group") - (condition "`condition-case' condition") + (condition (lambda (&rest _) + (let ((msg (get (intern (buffer-substring beg end)) 'error-message))) + (apply #'concat + "`condition-case' condition" + (when (and msg (not (string-empty-p msg))) + `(": " ,msg)))))) (ampersand "Arguments separator") (constant "Constant") (defun "Function definition") -- 2.39.5