[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/meow ec5a2cf00a 4/8: Use a copy of buttonize
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/meow ec5a2cf00a 4/8: Use a copy of buttonize |
Date: |
Sun, 1 Dec 2024 07:00:22 -0500 (EST) |
branch: elpa/meow
commit ec5a2cf00acdceca651c5440ca39b079b2dceabc
Author: DogLooksGood <doglooksgood@hotmail.com>
Commit: DogLooksGood <doglooksgood@hotmail.com>
Use a copy of buttonize
---
meow-util.el | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/meow-util.el b/meow-util.el
index 8454b21048..a2703a8d70 100644
--- a/meow-util.el
+++ b/meow-util.el
@@ -526,6 +526,15 @@ to use the status buffer's original `k' binding at point."
(upcase c)
c)))
+(defun meow--make-button (string callback &optional data help-echo)
+ "Copy from buttonize, which is available in Emacs 29.1"
+ (let ((string
+ (apply #'propertize string
+ (button--properties callback data help-echo))))
+ ;; Add the face to the end so that it can be overridden.
+ (add-face-text-property 0 (length string) 'button t string)
+ string))
+
(defun meow--parse-def (def)
"Return a command or keymap for DEF.
@@ -538,9 +547,7 @@ that bound to DEF. Otherwise, return DEF."
(lambda ()
(:documentation
(format "Execute the command which is bound to %s."
- (if (version<= "29.1" emacs-version)
- (buttonize def 'describe-key (kbd def))
- def)))
+ (meow--make-button def 'describe-key (kbd def))))
(interactive)
(meow--execute-kbd-macro def)))
(put cmd-name 'meow-dispatch def)
- [nongnu] elpa/meow updated (74fc0e50e9 -> 96bc722734), ELPA Syncer, 2024/12/01
- [nongnu] elpa/meow 8ae8b2cfa8 3/8: Use loop with read-event in keypad (#680), ELPA Syncer, 2024/12/01
- [nongnu] elpa/meow cde5f4c57b 2/8: Check the version before using buttonize, ELPA Syncer, 2024/12/01
- [nongnu] elpa/meow 37990e5323 1/8: Add meow-pop-to-global-mark (#679), ELPA Syncer, 2024/12/01
- [nongnu] elpa/meow 024f8e9196 6/8: Remove (kbd "ESC"), ELPA Syncer, 2024/12/01
- [nongnu] elpa/meow 5c18500b87 7/8: Fix the warning on (kbd "ESC"), ELPA Syncer, 2024/12/01
- [nongnu] elpa/meow 2c2d797b92 5/8: Use a copy of button--properties, ELPA Syncer, 2024/12/01
- [nongnu] elpa/meow ec5a2cf00a 4/8: Use a copy of buttonize,
ELPA Syncer <=
- [nongnu] elpa/meow 96bc722734 8/8: Remove emacs version 26.3 from CI, ELPA Syncer, 2024/12/01