Function: x-dnd-note-click
x-dnd-note-click is a byte-compiled function defined in x-dnd.el.gz.
Signature
(x-dnd-note-click BUTTON TIMESTAMP)
Documentation
Note that button BUTTON was pressed at TIMESTAMP during drag-and-drop.
Return the number of clicks that were made in quick succession.
Source Code
;; Defined in /usr/src/emacs/lisp/x-dnd.el.gz
(defun x-dnd-note-click (button timestamp)
"Note that button BUTTON was pressed at TIMESTAMP during drag-and-drop.
Return the number of clicks that were made in quick succession."
(if (not (integerp double-click-time))
1
(let ((cell (cdr (assq button x-dnd-click-count))))
(unless cell
(setq cell (cons 0 timestamp))
(push (cons button cell)
x-dnd-click-count))
(when (< (cdr cell) (- timestamp double-click-time))
(setcar cell 0))
(setcar cell (1+ (car cell)))
(setcdr cell timestamp)
(car cell))))