Mercurial > emacs
comparison src/keyboard.c @ 7427:2ea6fdd2dacf
Use PT, not point.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Tue, 10 May 1994 05:45:24 +0000 |
parents | 3774d6d8a5ee |
children | e14086d8ba6f |
comparison
equal
deleted
inserted
replaced
7426:58372be37e3a | 7427:2ea6fdd2dacf |
---|---|
1081 { | 1081 { |
1082 if (NILP (Vprefix_arg) && ! no_direct) | 1082 if (NILP (Vprefix_arg) && ! no_direct) |
1083 { | 1083 { |
1084 /* Recognize some common commands in common situations and | 1084 /* Recognize some common commands in common situations and |
1085 do them directly. */ | 1085 do them directly. */ |
1086 if (EQ (this_command, Qforward_char) && point < ZV) | 1086 if (EQ (this_command, Qforward_char) && PT < ZV) |
1087 { | 1087 { |
1088 struct Lisp_Vector *dp | 1088 struct Lisp_Vector *dp |
1089 = window_display_table (XWINDOW (selected_window)); | 1089 = window_display_table (XWINDOW (selected_window)); |
1090 lose = FETCH_CHAR (point); | 1090 lose = FETCH_CHAR (PT); |
1091 SET_PT (point + 1); | 1091 SET_PT (PT + 1); |
1092 if ((dp | 1092 if ((dp |
1093 ? (VECTORP (DISP_CHAR_VECTOR (dp, lose)) | 1093 ? (VECTORP (DISP_CHAR_VECTOR (dp, lose)) |
1094 && XVECTOR (DISP_CHAR_VECTOR (dp, lose))->size == 1) | 1094 && XVECTOR (DISP_CHAR_VECTOR (dp, lose))->size == 1) |
1095 : (lose >= 0x20 && lose < 0x7f)) | 1095 : (lose >= 0x20 && lose < 0x7f)) |
1096 && (XFASTINT (XWINDOW (selected_window)->last_modified) | 1096 && (XFASTINT (XWINDOW (selected_window)->last_modified) |
1097 >= MODIFF) | 1097 >= MODIFF) |
1098 && (XFASTINT (XWINDOW (selected_window)->last_point) | 1098 && (XFASTINT (XWINDOW (selected_window)->last_point) |
1099 == point - 1) | 1099 == PT - 1) |
1100 && !windows_or_buffers_changed | 1100 && !windows_or_buffers_changed |
1101 && EQ (current_buffer->selective_display, Qnil) | 1101 && EQ (current_buffer->selective_display, Qnil) |
1102 && !detect_input_pending () | 1102 && !detect_input_pending () |
1103 && NILP (Vexecuting_macro)) | 1103 && NILP (Vexecuting_macro)) |
1104 no_redisplay = direct_output_forward_char (1); | 1104 no_redisplay = direct_output_forward_char (1); |
1105 goto directly_done; | 1105 goto directly_done; |
1106 } | 1106 } |
1107 else if (EQ (this_command, Qbackward_char) && point > BEGV) | 1107 else if (EQ (this_command, Qbackward_char) && PT > BEGV) |
1108 { | 1108 { |
1109 struct Lisp_Vector *dp | 1109 struct Lisp_Vector *dp |
1110 = window_display_table (XWINDOW (selected_window)); | 1110 = window_display_table (XWINDOW (selected_window)); |
1111 SET_PT (point - 1); | 1111 SET_PT (PT - 1); |
1112 lose = FETCH_CHAR (point); | 1112 lose = FETCH_CHAR (PT); |
1113 if ((dp | 1113 if ((dp |
1114 ? (XTYPE (DISP_CHAR_VECTOR (dp, lose)) != Lisp_Vector | 1114 ? (XTYPE (DISP_CHAR_VECTOR (dp, lose)) != Lisp_Vector |
1115 && XVECTOR (DISP_CHAR_VECTOR (dp, lose))->size == 1) | 1115 && XVECTOR (DISP_CHAR_VECTOR (dp, lose))->size == 1) |
1116 : (lose >= 0x20 && lose < 0x7f)) | 1116 : (lose >= 0x20 && lose < 0x7f)) |
1117 && (XFASTINT (XWINDOW (selected_window)->last_modified) | 1117 && (XFASTINT (XWINDOW (selected_window)->last_modified) |
1118 >= MODIFF) | 1118 >= MODIFF) |
1119 && (XFASTINT (XWINDOW (selected_window)->last_point) | 1119 && (XFASTINT (XWINDOW (selected_window)->last_point) |
1120 == point + 1) | 1120 == PT + 1) |
1121 && !windows_or_buffers_changed | 1121 && !windows_or_buffers_changed |
1122 && EQ (current_buffer->selective_display, Qnil) | 1122 && EQ (current_buffer->selective_display, Qnil) |
1123 && !detect_input_pending () | 1123 && !detect_input_pending () |
1124 && NILP (Vexecuting_macro)) | 1124 && NILP (Vexecuting_macro)) |
1125 no_redisplay = direct_output_forward_char (-1); | 1125 no_redisplay = direct_output_forward_char (-1); |
1141 } | 1141 } |
1142 nonundocount++; | 1142 nonundocount++; |
1143 } | 1143 } |
1144 lose = (XFASTINT (XWINDOW (selected_window)->last_modified) | 1144 lose = (XFASTINT (XWINDOW (selected_window)->last_modified) |
1145 < MODIFF) | 1145 < MODIFF) |
1146 || (XFASTINT (XWINDOW (selected_window)->last_point) | 1146 || (XFASTINT (XWINDOW (selected_window)->last_point) != PT) |
1147 != point) | |
1148 || MODIFF <= current_buffer->save_modified | 1147 || MODIFF <= current_buffer->save_modified |
1149 || windows_or_buffers_changed | 1148 || windows_or_buffers_changed |
1150 || !EQ (current_buffer->selective_display, Qnil) | 1149 || !EQ (current_buffer->selective_display, Qnil) |
1151 || detect_input_pending () | 1150 || detect_input_pending () |
1152 || !NILP (Vexecuting_macro); | 1151 || !NILP (Vexecuting_macro); |
1154 { | 1153 { |
1155 lose = 1; | 1154 lose = 1; |
1156 nonundocount = 0; | 1155 nonundocount = 0; |
1157 } | 1156 } |
1158 if (!lose && | 1157 if (!lose && |
1159 (point == ZV || FETCH_CHAR (point) == '\n')) | 1158 (PT == ZV || FETCH_CHAR (PT) == '\n')) |
1160 { | 1159 { |
1161 struct Lisp_Vector *dp | 1160 struct Lisp_Vector *dp |
1162 = window_display_table (XWINDOW (selected_window)); | 1161 = window_display_table (XWINDOW (selected_window)); |
1163 int lose = c; | 1162 int lose = c; |
1164 | 1163 |