aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog14
-rw-r--r--src/keyboard.c57
2 files changed, 43 insertions, 28 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 7a63543d60b..102a1481af7 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,19 @@
12001-11-04 Richard M. Stallman <rms@gnu.org> 12001-11-04 Richard M. Stallman <rms@gnu.org>
2 2
3 * buffer.c (Fbuffer_local_value): Remove extra args from CHECK_SYMBOL
4 and CHECK_BUFFER.
5
6 * keyboard.c (read_char): Use Fcar and Fcdr, not Fnth.
7 (record_char): Likewise.
8
9 * keyboard.c (make_lispy_event): Don't insist a drag event must
10 move to a different buffer position. Instead, check for moving at
11 least double_click_fuzz.
12
13 * fns.c (Fmake_hash_table): Use XCAR and XCDR, not Fnth and Flength.
14
15 * keyboard.c (echo-area-clear-hook): Undo Oct 29 change.
16
3 * indent.c (current_column_1, Fmove_to_column): Separate the code 17 * indent.c (current_column_1, Fmove_to_column): Separate the code
4 for display-table glyphs from the code buffer text, to fix 18 for display-table glyphs from the code buffer text, to fix
5 bugs in the former. 19 bugs in the former.
diff --git a/src/keyboard.c b/src/keyboard.c
index 4557b596dd7..ff430fddde7 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -2847,11 +2847,17 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
2847 if (CONSP (c) && EQ (XCAR (c), Qhelp_echo)) 2847 if (CONSP (c) && EQ (XCAR (c), Qhelp_echo))
2848 { 2848 {
2849 /* (help-echo FRAME HELP WINDOW OBJECT POS). */ 2849 /* (help-echo FRAME HELP WINDOW OBJECT POS). */
2850 Lisp_Object help, object, position, window; 2850 Lisp_Object help, object, position, window, tem;
2851 help = Fnth (make_number (2), c); 2851
2852 window = Fnth (make_number (3), c); 2852 tem = Fcdr (XCDR (c));
2853 object = Fnth (make_number (4), c); 2853 help = Fcar (tem);
2854 position = Fnth (make_number (5), c); 2854 tem = Fcdr (tem);
2855 window = Fcar (tem);
2856 tem = Fcdr (tem);
2857 object = Fcar (tem);
2858 tem = Fcdr (tem);
2859 position = Fcar (tem);
2860
2855 show_help_echo (help, window, object, position, 0); 2861 show_help_echo (help, window, object, position, 0);
2856 2862
2857 /* We stopped being idle for this event; undo that. */ 2863 /* We stopped being idle for this event; undo that. */
@@ -2983,7 +2989,7 @@ record_char (c)
2983 { 2989 {
2984 Lisp_Object help; 2990 Lisp_Object help;
2985 2991
2986 help = Fnth (make_number (2), c); 2992 help = Fcar (Fcdr (XCDR (c)));
2987 if (STRINGP (help)) 2993 if (STRINGP (help))
2988 { 2994 {
2989 int last_idx; 2995 int last_idx;
@@ -2996,7 +3002,7 @@ record_char (c)
2996 3002
2997 if (!CONSP (last_c) 3003 if (!CONSP (last_c)
2998 || !EQ (XCAR (last_c), Qhelp_echo) 3004 || !EQ (XCAR (last_c), Qhelp_echo)
2999 || (last_help = Fnth (make_number (2), last_c), 3005 || (last_help = Fcar (Fcdr (XCDR (last_c))),
3000 !EQ (last_help, help))) 3006 !EQ (last_help, help)))
3001 { 3007 {
3002 total_keys++; 3008 total_keys++;
@@ -4984,32 +4990,27 @@ make_lispy_event (event)
4984 else 4990 else
4985#endif 4991#endif
4986 { 4992 {
4987 /* The third element of every position should be the (x,y)
4988 pair. */
4989 Lisp_Object down; 4993 Lisp_Object down;
4994 EMACS_INT xdiff = double_click_fuzz, ydiff = double_click_fuzz;
4990 4995
4991 down = Fnth (make_number (2), start_pos); 4996 /* The third element of every position
4992 if (EQ (event->x, XCAR (down)) && EQ (event->y, XCDR (down))) 4997 should be the (x,y) pair. */
4993 /* Mouse hasn't moved. */ 4998 down = Fcar (Fcdr (Fcdr (start_pos)));
4999 if (CONSP (down))
5000 {
5001 xdiff = event->x - XCAR (down);
5002 ydiff = event->y - XCDR (down);
5003 }
5004
5005 if (xdiff < double_click_fuzz && xdiff > - double_click_fuzz
5006 && ydiff < double_click_fuzz
5007 && ydiff > - double_click_fuzz)
5008 /* Mouse hasn't moved (much). */
4994 event->modifiers |= click_modifier; 5009 event->modifiers |= click_modifier;
4995 else 5010 else
4996 { 5011 {
4997 Lisp_Object window1, window2, posn1, posn2; 5012 button_down_time = 0;
4998 5013 event->modifiers |= drag_modifier;
4999 /* Avoid generating a drag event if the mouse
5000 hasn't actually moved off the buffer position. */
5001 window1 = Fnth (make_number (0), position);
5002 posn1 = Fnth (make_number (1), position);
5003 window2 = Fnth (make_number (0), start_pos);
5004 posn2 = Fnth (make_number (1), start_pos);
5005
5006 if (EQ (window1, window2) && EQ (posn1, posn2))
5007 event->modifiers |= click_modifier;
5008 else
5009 {
5010 button_down_time = 0;
5011 event->modifiers |= drag_modifier;
5012 }
5013 } 5014 }
5014 5015
5015 /* Don't check is_double; treat this as multiple 5016 /* Don't check is_double; treat this as multiple