summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2013-03-08 23:15:53 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2013-03-08 23:15:53 -0500
commit27a98a62d1c46b057428cc3ed964743b69628299 (patch)
treefdc16fac06dcfa759f0d02e281a92cabc000ab5e /src
parentc410dad5e907d7780b83eacf2ad8990294c920b8 (diff)
downloademacs-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')
-rw-r--r--src/ChangeLog21
-rw-r--r--src/keyboard.c2
-rw-r--r--src/keyboard.h12
3 files changed, 22 insertions, 13 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 69e8303111a..ae25a3c5d00 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,12 @@
+2013-03-09 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * 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.
+
+ * keyboard.c (access_keymap_keyremap): Accept nil return value from
+ functions to mean "no change".
+
2013-03-08 Paul Eggert <eggert@cs.ucla.edu>
region-cache.c, scroll.c, search.c: Use bool for booleans.
@@ -19,8 +28,8 @@
* lisp.h (find_newline, find_newline_no_quit): Adjust prototype.
* bidi.c (bidi_find_paragraph_start): Pass byte position to
find_newline_no_quit, thus eliminating CHAR_TO_BYTE.
- * editfns.c (Fconstrain_to_field): Break long line. Adjust
- call to find_newline.
+ * editfns.c (Fconstrain_to_field): Break long line.
+ Adjust call to find_newline.
* indent.c (vmotion): Adjust calls to find_newline_no_quit.
Use DEC_BOTH to start next search from the previous buffer
position, where appropriate.
@@ -270,8 +279,8 @@
2013-03-02 Eli Zaretskii <eliz@gnu.org>
- * textprop.c (Fadd_text_properties, Fremove_text_properties): If
- the interval tree changes as a side effect of calling
+ * textprop.c (Fadd_text_properties, Fremove_text_properties):
+ If the interval tree changes as a side effect of calling
modify_region, re-do processing starting from the call to
validate_interval_range. (Bug#13743)
@@ -347,8 +356,8 @@
* textprop.c (Fadd_text_properties, Fremove_text_properties)
(Fremove_list_of_text_properties): Skip all of the intervals in
the region between START and END that already have resp. don't
- have the requested properties, not just the first one. Add
- assertions that the loop afterwards always modifies the
+ have the requested properties, not just the first one.
+ Add assertions that the loop afterwards always modifies the
properties. (Bug#13743)
2013-02-25 Stefan Monnier <monnier@iro.umontreal.ca>
diff --git a/src/keyboard.c b/src/keyboard.c
index 914378947ed..a66c28dc3d3 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -8699,7 +8699,7 @@ access_keymap_keyremap (Lisp_Object map, Lisp_Object key, Lisp_Object prompt,
barf--don't ignore it.
(To ignore it safely, we would need to gcpro a bunch of
other variables.) */
- if (! (VECTORP (next) || STRINGP (next)))
+ if (! (NILP (next) || VECTORP (next) || STRINGP (next)))
error ("Function %s returns invalid key sequence",
SSDATA (SYMBOL_NAME (tem)));
}
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.