Skip to content

Commit 61d7c5d

Browse files
committed
Add eca-buttons-allow-mouse with default as nil
1 parent a5abede commit 61d7c5d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

eca-util.el

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
(require 'dash)
1616
(require 'transient)
1717

18+
(defcustom eca-buttons-allow-mouse nil
19+
"Whether to allow mouse clicks on ECA buttons."
20+
:type 'boolean
21+
:group 'eca)
22+
1823
(defun eca-assoc (map key val)
1924
"Return a new MAP with KEY associated to flat plist VAL, replacing any existing."
2025
(cons (cons key val)
@@ -165,7 +170,8 @@
165170
(callback-int (lambda (&rest _)
166171
(interactive)
167172
(funcall callback))))
168-
(define-key km (kbd "<mouse-1>") callback-int)
173+
(when eca-buttons-allow-mouse
174+
(define-key km (kbd "<mouse-1>") callback-int))
169175
(define-key km (kbd "<return>") callback-int)
170176
(define-key km (kbd "RET") callback-int)
171177
(propertize text

0 commit comments

Comments
 (0)