Skip to content

Commit abc34b4

Browse files
committed
org-mouse: Make recently ported change compatible with Emacs < 29
* lisp/org-mouse.el (org-mouse-show-context-menu): Conditionally restore old code path, falling back to double-click-time if mouse-double-click-time isn't available. This is a follow-up to the port of Emacs's 2fba71cf1.
1 parent 42c4186 commit abc34b4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lisp/org-mouse.el

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,11 @@ this function is called. Otherwise, the current major mode menu is used."
211211
(interactive "@e \nP")
212212
(if (and (= (event-click-count event) 1)
213213
(or (not mark-active)
214-
(sit-for (/ (mouse-double-click-time) 1000.0))))
214+
(sit-for
215+
(/ (if (fboundp 'mouse-double-click-time) ; Emacs >= 29
216+
(mouse-double-click-time)
217+
double-click-time)
218+
1000.0))))
215219
(progn
216220
(select-window (posn-window (event-start event)))
217221
(when (not (org-mouse-mark-active))

0 commit comments

Comments
 (0)