emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/compat a46ab78 19/99: Add button-buttonize to emacs-28.


From: ELPA Syncer
Subject: [elpa] externals/compat a46ab78 19/99: Add button-buttonize to emacs-28.1
Date: Sun, 17 Oct 2021 05:57:50 -0400 (EDT)

branch: externals/compat
commit a46ab784becf8126a05102746ae37f42a85b8ba8
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>

    Add button-buttonize to emacs-28.1
---
 compat-28.1.el | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/compat-28.1.el b/compat-28.1.el
index 71fab35..2d45223 100644
--- a/compat-28.1.el
+++ b/compat-28.1.el
@@ -452,5 +452,22 @@ The previous values will be be restored upon exit."
                variables)
      ,@body))
 
+;;;; Defined in button.el
+
+(compat-defun button-buttonize (string callback &optional data)
+  "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."
+  :feature button
+  (propertize string
+              'face 'button
+              'button t
+              'follow-link t
+              'category t
+              'button-data data
+              'keymap button-map
+              'action callback))
+
 (provide 'compat-28.1)
 ;;; compat-28.1.el ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]