]> git.eshelyaron.com Git - emacs.git/commitdiff
Better help-echo for condition symbols
authorEshel Yaron <me@eshelyaron.com>
Fri, 21 Feb 2025 17:31:10 +0000 (18:31 +0100)
committerEshel Yaron <me@eshelyaron.com>
Fri, 21 Feb 2025 17:31:10 +0000 (18:31 +0100)
lisp/progmodes/elisp-mode.el

index 99c70a09e4af4f5df35d1f1af94fa36b428af98d..6a1e67b3cbeff0931b13ceb9df0339717d39b822 100644 (file)
@@ -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")