Mercurial > emacs
changeset 53516:d8b5f748ccdd
(POSN_POSN, POSN_SET_POSN): Rename macros from
POSN_BUFFER_POSN and POSN_SET_BUFFER_POSN. All uses changed.
(POSN_INBUFFER_P, POSN_BUFFER_POSN): New macros.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Tue, 06 Jan 2004 22:37:48 +0000 |
parents | 12bc18575b80 |
children | 57e2656285e7 |
files | src/keyboard.h |
diffstat | 1 files changed, 9 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/keyboard.h Tue Jan 06 22:37:39 2004 +0000 +++ b/src/keyboard.h Tue Jan 06 22:37:48 2004 +0000 @@ -254,17 +254,21 @@ /* Extract the fields of a position. */ #define POSN_WINDOW(posn) (XCAR (posn)) -#define POSN_BUFFER_POSN(posn) (XCAR (XCDR (posn))) -#define POSN_BUFFER_SET_POSN(posn,x) (XSETCAR (XCDR (posn), (x))) +#define POSN_POSN(posn) (XCAR (XCDR (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_TIMESTAMP(posn) (XCAR (XCDR (XCDR (XCDR (posn))))) #define POSN_SCROLLBAR_PART(posn) (Fnth (make_number (4), (posn))) /* A cons (STRING . STRING-CHARPOS), or nil in mouse-click events. It's a cons if the click is over a string in the mode line. */ -#define POSN_STRING(POSN) Fnth (make_number (4), (POSN)) +#define POSN_STRING(posn) (Fnth (make_number (4), (posn))) + +/* If POSN_STRING is nil, event refers to buffer location. */ + +#define POSN_INBUFFER_P(posn) (NILP (POSN_STRING (posn))) +#define POSN_BUFFER_POSN(posn) (Fnth (make_number (5), (posn))) /* Some of the event heads. */ extern Lisp_Object Qswitch_frame;