From: Eshel Yaron Date: Fri, 21 Feb 2025 17:31:10 +0000 (+0100) Subject: Better help-echo for condition symbols X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=de9f1bcfe4d335a84a19587b56be03c788d93635;p=emacs.git Better help-echo for condition symbols --- 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")