Skip to content

Commit

Permalink
Use a copy of button--properties
Browse files Browse the repository at this point in the history
  • Loading branch information
DogLooksGood committed Dec 1, 2024
1 parent ec5a2cf commit 2c2d797
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion meow-util.el
Original file line number Diff line number Diff line change
Expand Up @@ -526,11 +526,21 @@ 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))))
(list 'font-lock-face 'button
'mouse-face 'highlight
'help-echo help-echo
'button t
'follow-link t
'category t
'button-data data
'keymap button-map
'action callback))))
;; Add the face to the end so that it can be overridden.
(add-face-text-property 0 (length string) 'button t string)
string))
Expand Down

0 comments on commit 2c2d797

Please sign in to comment.