diff options
| author | Stefan Monnier | 2013-03-08 23:15:53 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2013-03-08 23:15:53 -0500 |
| commit | 27a98a62d1c46b057428cc3ed964743b69628299 (patch) | |
| tree | fdc16fac06dcfa759f0d02e281a92cabc000ab5e /src | |
| parent | c410dad5e907d7780b83eacf2ad8990294c920b8 (diff) | |
| download | emacs-27a98a62d1c46b057428cc3ed964743b69628299.tar.gz emacs-27a98a62d1c46b057428cc3ed964743b69628299.zip | |
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/ChangeLog | 21 | ||||
| -rw-r--r-- | src/keyboard.c | 2 | ||||
| -rw-r--r-- | src/keyboard.h | 12 |
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 @@ | |||
| 1 | 2013-03-09 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * keyboard.h (EVENT_START, EVENT_END, POSN_WINDOW, POSN_POSN) | ||
| 4 | (POSN_WINDOW_POSN, POSN_TIMESTAMP): Be careful since events may come | ||
| 5 | from Elisp via unread-command-events. | ||
| 6 | |||
| 7 | * keyboard.c (access_keymap_keyremap): Accept nil return value from | ||
| 8 | functions to mean "no change". | ||
| 9 | |||
| 1 | 2013-03-08 Paul Eggert <eggert@cs.ucla.edu> | 10 | 2013-03-08 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 11 | ||
| 3 | region-cache.c, scroll.c, search.c: Use bool for booleans. | 12 | region-cache.c, scroll.c, search.c: Use bool for booleans. |
| @@ -19,8 +28,8 @@ | |||
| 19 | * lisp.h (find_newline, find_newline_no_quit): Adjust prototype. | 28 | * lisp.h (find_newline, find_newline_no_quit): Adjust prototype. |
| 20 | * bidi.c (bidi_find_paragraph_start): Pass byte position to | 29 | * bidi.c (bidi_find_paragraph_start): Pass byte position to |
| 21 | find_newline_no_quit, thus eliminating CHAR_TO_BYTE. | 30 | find_newline_no_quit, thus eliminating CHAR_TO_BYTE. |
| 22 | * editfns.c (Fconstrain_to_field): Break long line. Adjust | 31 | * editfns.c (Fconstrain_to_field): Break long line. |
| 23 | call to find_newline. | 32 | Adjust call to find_newline. |
| 24 | * indent.c (vmotion): Adjust calls to find_newline_no_quit. | 33 | * indent.c (vmotion): Adjust calls to find_newline_no_quit. |
| 25 | Use DEC_BOTH to start next search from the previous buffer | 34 | Use DEC_BOTH to start next search from the previous buffer |
| 26 | position, where appropriate. | 35 | position, where appropriate. |
| @@ -270,8 +279,8 @@ | |||
| 270 | 279 | ||
| 271 | 2013-03-02 Eli Zaretskii <eliz@gnu.org> | 280 | 2013-03-02 Eli Zaretskii <eliz@gnu.org> |
| 272 | 281 | ||
| 273 | * textprop.c (Fadd_text_properties, Fremove_text_properties): If | 282 | * textprop.c (Fadd_text_properties, Fremove_text_properties): |
| 274 | the interval tree changes as a side effect of calling | 283 | If the interval tree changes as a side effect of calling |
| 275 | modify_region, re-do processing starting from the call to | 284 | modify_region, re-do processing starting from the call to |
| 276 | validate_interval_range. (Bug#13743) | 285 | validate_interval_range. (Bug#13743) |
| 277 | 286 | ||
| @@ -347,8 +356,8 @@ | |||
| 347 | * textprop.c (Fadd_text_properties, Fremove_text_properties) | 356 | * textprop.c (Fadd_text_properties, Fremove_text_properties) |
| 348 | (Fremove_list_of_text_properties): Skip all of the intervals in | 357 | (Fremove_list_of_text_properties): Skip all of the intervals in |
| 349 | the region between START and END that already have resp. don't | 358 | the region between START and END that already have resp. don't |
| 350 | have the requested properties, not just the first one. Add | 359 | have the requested properties, not just the first one. |
| 351 | assertions that the loop afterwards always modifies the | 360 | Add assertions that the loop afterwards always modifies the |
| 352 | properties. (Bug#13743) | 361 | properties. (Bug#13743) |
| 353 | 362 | ||
| 354 | 2013-02-25 Stefan Monnier <monnier@iro.umontreal.ca> | 363 | 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, | |||
| 8699 | barf--don't ignore it. | 8699 | barf--don't ignore it. |
| 8700 | (To ignore it safely, we would need to gcpro a bunch of | 8700 | (To ignore it safely, we would need to gcpro a bunch of |
| 8701 | other variables.) */ | 8701 | other variables.) */ |
| 8702 | if (! (VECTORP (next) || STRINGP (next))) | 8702 | if (! (NILP (next) || VECTORP (next) || STRINGP (next))) |
| 8703 | error ("Function %s returns invalid key sequence", | 8703 | error ("Function %s returns invalid key sequence", |
| 8704 | SSDATA (SYMBOL_NAME (tem))); | 8704 | SSDATA (SYMBOL_NAME (tem))); |
| 8705 | } | 8705 | } |
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 | |||
| 421 | (EVENT_HAS_PARAMETERS (event) ? XCAR (event) : (event)) | 421 | (EVENT_HAS_PARAMETERS (event) ? XCAR (event) : (event)) |
| 422 | 422 | ||
| 423 | /* Extract the starting and ending positions from a composite event. */ | 423 | /* Extract the starting and ending positions from a composite event. */ |
| 424 | #define EVENT_START(event) (XCAR (XCDR (event))) | 424 | #define EVENT_START(event) (CAR_SAFE (CDR_SAFE (event))) |
| 425 | #define EVENT_END(event) (XCAR (XCDR (XCDR (event)))) | 425 | #define EVENT_END(event) (CAR_SAFE (CDR_SAFE (CDR_SAFE (event)))) |
| 426 | 426 | ||
| 427 | /* Extract the click count from a multi-click event. */ | 427 | /* Extract the click count from a multi-click event. */ |
| 428 | #define EVENT_CLICK_COUNT(event) (Fnth (make_number (2), (event))) | 428 | #define EVENT_CLICK_COUNT(event) (Fnth (make_number (2), (event))) |
| 429 | 429 | ||
| 430 | /* Extract the fields of a position. */ | 430 | /* Extract the fields of a position. */ |
| 431 | #define POSN_WINDOW(posn) (XCAR (posn)) | 431 | #define POSN_WINDOW(posn) (CAR_SAFE (posn)) |
| 432 | #define POSN_POSN(posn) (XCAR (XCDR (posn))) | 432 | #define POSN_POSN(posn) (CAR_SAFE (CDR_SAFE (posn))) |
| 433 | #define POSN_SET_POSN(posn,x) (XSETCAR (XCDR (posn), (x))) | 433 | #define POSN_SET_POSN(posn,x) (XSETCAR (XCDR (posn), (x))) |
| 434 | #define POSN_WINDOW_POSN(posn) (XCAR (XCDR (XCDR (posn)))) | 434 | #define POSN_WINDOW_POSN(posn) (CAR_SAFE (CDR_SAFE (CDR_SAFE (posn)))) |
| 435 | #define POSN_TIMESTAMP(posn) (XCAR (XCDR (XCDR (XCDR (posn))))) | 435 | #define POSN_TIMESTAMP(posn) (CAR_SAFE (CDR_SAFE (CDR_SAFE (CDR_SAFE (posn))))) |
| 436 | #define POSN_SCROLLBAR_PART(posn) (Fnth (make_number (4), (posn))) | 436 | #define POSN_SCROLLBAR_PART(posn) (Fnth (make_number (4), (posn))) |
| 437 | 437 | ||
| 438 | /* A cons (STRING . STRING-CHARPOS), or nil in mouse-click events. | 438 | /* A cons (STRING . STRING-CHARPOS), or nil in mouse-click events. |