summaryrefslogtreecommitdiff
path: root/lisp/subr.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/subr.el')
-rw-r--r--lisp/subr.el20
1 files changed, 10 insertions, 10 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index 62839c9b25b..8e5a65efcd2 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1511,22 +1511,22 @@ nil or (STRING . POSITION)'.
`posn-timestamp': The time the event occurred, in milliseconds.
For more information, see Info node `(elisp)Click Events'."
- (if (consp event) (nth 1 event)
- ;; Use `window-point' for the case when the current buffer
- ;; is temporarily switched to some other buffer (bug#50256)
- (or (posn-at-point (window-point))
- (list (selected-window) (window-point) '(0 . 0) 0))))
+ (or (and (consp event) (nth 1 event))
+ ;; Use `window-point' for the case when the current buffer
+ ;; is temporarily switched to some other buffer (bug#50256)
+ (posn-at-point (window-point))
+ (list (selected-window) (window-point) '(0 . 0) 0)))
(defun event-end (event)
"Return the ending position of EVENT.
EVENT should be a click, drag, or key press event.
See `event-start' for a description of the value returned."
- (if (consp event) (nth (if (consp (nth 2 event)) 2 1) event)
- ;; Use `window-point' for the case when the current buffer
- ;; is temporarily switched to some other buffer (bug#50256)
- (or (posn-at-point (window-point))
- (list (selected-window) (window-point) '(0 . 0) 0))))
+ (or (and (consp event) (nth (if (consp (nth 2 event)) 2 1) event))
+ ;; Use `window-point' for the case when the current buffer
+ ;; is temporarily switched to some other buffer (bug#50256)
+ (posn-at-point (window-point))
+ (list (selected-window) (window-point) '(0 . 0) 0)))
(defsubst event-click-count (event)
"Return the multi-click count of EVENT, a click or drag event.