[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master de06e05: Make the lambda/closure buttons in `C-h b' say what they
From: |
Lars Ingebrigtsen |
Subject: |
master de06e05: Make the lambda/closure buttons in `C-h b' say what they do |
Date: |
Sat, 6 Nov 2021 17:31:23 -0400 (EDT) |
branch: master
commit de06e0539537a99e147cbb96ee9fceaecafc9190
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Make the lambda/closure buttons in `C-h b' say what they do
* lisp/button.el (buttonize): Add a help-echo property.
* lisp/help.el (help--describe-command): Say what the
lambda/closure buttons do.
---
lisp/button.el | 7 +++++--
lisp/help.el | 3 ++-
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/lisp/button.el b/lisp/button.el
index f166aa5..e3f91cb 100644
--- a/lisp/button.el
+++ b/lisp/button.el
@@ -618,14 +618,17 @@ button at point is the button to describe."
(define-obsolete-function-alias 'button-buttonize #'buttonize "29.1")
-(defun buttonize (string callback &optional data)
+(defun buttonize (string callback &optional data help-echo)
"Make STRING into a button and return it.
When clicked, CALLBACK will be called with the DATA as the
function argument. If DATA isn't present (or is nil), the button
-itself will be used instead as the function argument."
+itself will be used instead as the function argument.
+
+If HELP-ECHO, use that as the `help-echo' property."
(propertize string
'face 'button
'mouse-face 'highlight
+ 'help-echo help-echo
'button t
'follow-link t
'category t
diff --git a/lisp/help.el b/lisp/help.el
index 2a72656..b2772f4 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -1347,7 +1347,8 @@ Return nil if the key sequence is too long."
(symbol-name (car definition))
(lambda (_)
(pp-display-expression
- definition "*Help Source*" t))))))
+ definition "*Help Source*" t))
+ nil "View definition"))))
(t
(insert "??\n"))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master de06e05: Make the lambda/closure buttons in `C-h b' say what they do,
Lars Ingebrigtsen <=