summaryrefslogtreecommitdiff
path: root/src/keyboard.h
diff options
context:
space:
mode:
authorKim F. Storm <storm@cua.dk>2004-01-06 22:37:48 +0000
committerKim F. Storm <storm@cua.dk>2004-01-06 22:37:48 +0000
commitf82a4aa4011dbd78bd50cf7e1560ddd89d9a5fd4 (patch)
tree6c6b57efe4cfb00020e5ad5a62d3c152dec6bbec /src/keyboard.h
parent9e40eb52e93e1911f06814e1e8944e044df8346d (diff)
downloademacs-f82a4aa4011dbd78bd50cf7e1560ddd89d9a5fd4.tar.gz
(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.
Diffstat (limited to 'src/keyboard.h')
-rw-r--r--src/keyboard.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/keyboard.h b/src/keyboard.h
index 6a8e08d41f3..a2121540e49 100644
--- a/src/keyboard.h
+++ b/src/keyboard.h
@@ -254,17 +254,21 @@ extern Lisp_Object item_properties;
/* 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;