diff options
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. |