diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2013-03-08 23:15:53 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2013-03-08 23:15:53 -0500 |
commit | 27a98a62d1c46b057428cc3ed964743b69628299 (patch) | |
tree | fdc16fac06dcfa759f0d02e281a92cabc000ab5e /src/keyboard.h | |
parent | c410dad5e907d7780b83eacf2ad8990294c920b8 (diff) | |
download | emacs-27a98a62d1c46b057428cc3ed964743b69628299.tar.gz |
Separate mouse-1-click-follows-link from mouse-drag-region.
* lisp/mouse.el (mouse--down-1-maybe-follows-link): New function.
(key-translation-map): Use it to implement mouse-1-click-follows-link.
(mouse-drag-line, mouse-drag-track): Remove mouse-1-click-follows-link code.
(mouse--remap-link-click-p): Remove.
* src/keyboard.c (access_keymap_keyremap): Accept nil return value from
functions to mean "no change".
* src/keyboard.h (EVENT_START, EVENT_END, POSN_WINDOW, POSN_POSN)
(POSN_WINDOW_POSN, POSN_TIMESTAMP): Be careful since events may come
from Elisp via unread-command-events.
Diffstat (limited to 'src/keyboard.h')
-rw-r--r-- | src/keyboard.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/keyboard.h b/src/keyboard.h index c6ade35dd52..8bb1c409efc 100644 --- a/src/keyboard.h +++ b/src/keyboard.h @@ -421,18 +421,18 @@ typedef struct _widget_value (EVENT_HAS_PARAMETERS (event) ? XCAR (event) : (event)) /* Extract the starting and ending positions from a composite event. */ -#define EVENT_START(event) (XCAR (XCDR (event))) -#define EVENT_END(event) (XCAR (XCDR (XCDR (event)))) +#define EVENT_START(event) (CAR_SAFE (CDR_SAFE (event))) +#define EVENT_END(event) (CAR_SAFE (CDR_SAFE (CDR_SAFE (event)))) /* Extract the click count from a multi-click event. */ #define EVENT_CLICK_COUNT(event) (Fnth (make_number (2), (event))) /* Extract the fields of a position. */ -#define POSN_WINDOW(posn) (XCAR (posn)) -#define POSN_POSN(posn) (XCAR (XCDR (posn))) +#define POSN_WINDOW(posn) (CAR_SAFE (posn)) +#define POSN_POSN(posn) (CAR_SAFE (CDR_SAFE (posn))) #define POSN_SET_POSN(posn,x) (XSETCAR (XCDR (posn), (x))) -#define POSN_WINDOW_POSN(posn) (XCAR (XCDR (XCDR (posn)))) -#define POSN_TIMESTAMP(posn) (XCAR (XCDR (XCDR (XCDR (posn))))) +#define POSN_WINDOW_POSN(posn) (CAR_SAFE (CDR_SAFE (CDR_SAFE (posn)))) +#define POSN_TIMESTAMP(posn) (CAR_SAFE (CDR_SAFE (CDR_SAFE (CDR_SAFE (posn))))) #define POSN_SCROLLBAR_PART(posn) (Fnth (make_number (4), (posn))) /* A cons (STRING . STRING-CHARPOS), or nil in mouse-click events. |