Mercurial > emacs
comparison src/xdisp.c @ 47942:080b4586492b
Fix typo in comment.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Fri, 18 Oct 2002 10:09:43 +0000 |
parents | a0360c4a3066 |
children | 5dcac67745dc |
comparison
equal
deleted
inserted
replaced
47941:df5fb1f2c113 | 47942:080b4586492b |
---|---|
1529 xassert (charpos < 0 || (charpos >= BUF_BEG (current_buffer) | 1529 xassert (charpos < 0 || (charpos >= BUF_BEG (current_buffer) |
1530 && charpos <= ZV)); | 1530 && charpos <= ZV)); |
1531 | 1531 |
1532 /* If face attributes have been changed since the last redisplay, | 1532 /* If face attributes have been changed since the last redisplay, |
1533 free realized faces now because they depend on face definitions | 1533 free realized faces now because they depend on face definitions |
1534 that might have changed. Don't free faces while there might be | 1534 that might have changed. Don't free faces while there might be |
1535 desired matrices pending which reference these faces. */ | 1535 desired matrices pending which reference these faces. */ |
1536 if (face_change_count && !inhibit_free_realized_faces) | 1536 if (face_change_count && !inhibit_free_realized_faces) |
1537 { | 1537 { |
1538 face_change_count = 0; | 1538 face_change_count = 0; |
1539 free_all_realized_faces (Qnil); | 1539 free_all_realized_faces (Qnil); |
4213 | 4213 |
4214 int | 4214 int |
4215 get_next_display_element (it) | 4215 get_next_display_element (it) |
4216 struct it *it; | 4216 struct it *it; |
4217 { | 4217 { |
4218 /* Non-zero means that we found an display element. Zero means that | 4218 /* Non-zero means that we found a display element. Zero means that |
4219 we hit the end of what we iterate over. Performance note: the | 4219 we hit the end of what we iterate over. Performance note: the |
4220 function pointer `method' used here turns out to be faster than | 4220 function pointer `method' used here turns out to be faster than |
4221 using a sequence of if-statements. */ | 4221 using a sequence of if-statements. */ |
4222 int success_p = (*it->method) (it); | 4222 int success_p = (*it->method) (it); |
4223 | 4223 |
9031 internal_condition_case_1 (redisplay_window_1, selected_window, | 9031 internal_condition_case_1 (redisplay_window_1, selected_window, |
9032 list_of_error, | 9032 list_of_error, |
9033 redisplay_window_error); | 9033 redisplay_window_error); |
9034 | 9034 |
9035 /* Compare desired and current matrices, perform output. */ | 9035 /* Compare desired and current matrices, perform output. */ |
9036 | 9036 |
9037 update: | 9037 update: |
9038 /* If fonts changed, display again. */ | 9038 /* If fonts changed, display again. */ |
9039 if (fonts_changed_p) | 9039 if (fonts_changed_p) |
9040 goto retry; | 9040 goto retry; |
9041 | 9041 |
13749 | 13749 |
13750 Returns the hpos of the end of the text generated by ELT. | 13750 Returns the hpos of the end of the text generated by ELT. |
13751 | 13751 |
13752 PROPS is a property list to add to any string we encounter. | 13752 PROPS is a property list to add to any string we encounter. |
13753 | 13753 |
13754 If RISKY is nonzero, remove (disregard) any properties in any string | 13754 If RISKY is nonzero, remove (disregard) any properties in any string |
13755 we encounter, and ignore :eval and :propertize. | 13755 we encounter, and ignore :eval and :propertize. |
13756 | 13756 |
13757 If the global variable `frame_title_ptr' is non-NULL, then the output | 13757 If the global variable `frame_title_ptr' is non-NULL, then the output |
13758 is passed to `store_frame_title' instead of `display_string'. */ | 13758 is passed to `store_frame_title' instead of `display_string'. */ |
13759 | 13759 |
14163 STRING. PRECISION <= 0 means don't truncate the string. | 14163 STRING. PRECISION <= 0 means don't truncate the string. |
14164 | 14164 |
14165 If COPY_STRING is non-zero, make a copy of LISP_STRING before adding | 14165 If COPY_STRING is non-zero, make a copy of LISP_STRING before adding |
14166 properties to the string. | 14166 properties to the string. |
14167 | 14167 |
14168 PROPS are the properties to add to the string. | 14168 PROPS are the properties to add to the string. |
14169 The mode_line_string_face face property is always added to the string. | 14169 The mode_line_string_face face property is always added to the string. |
14170 */ | 14170 */ |
14171 | 14171 |
14172 static int store_mode_line_string (string, lisp_string, copy_string, field_width, precision, props) | 14172 static int store_mode_line_string (string, lisp_string, copy_string, field_width, precision, props) |
14173 char *string; | 14173 char *string; |
14199 props = Fplist_put (props, Qface, face); | 14199 props = Fplist_put (props, Qface, face); |
14200 } | 14200 } |
14201 Fadd_text_properties (make_number (0), make_number (len), | 14201 Fadd_text_properties (make_number (0), make_number (len), |
14202 props, lisp_string); | 14202 props, lisp_string); |
14203 } | 14203 } |
14204 else | 14204 else |
14205 { | 14205 { |
14206 len = XFASTINT (Flength (lisp_string)); | 14206 len = XFASTINT (Flength (lisp_string)); |
14207 if (precision > 0 && len > precision) | 14207 if (precision > 0 && len > precision) |
14208 { | 14208 { |
14209 len = precision; | 14209 len = precision; |
14230 } | 14230 } |
14231 | 14231 |
14232 if (len > 0) | 14232 if (len > 0) |
14233 { | 14233 { |
14234 mode_line_string_list = Fcons (lisp_string, mode_line_string_list); | 14234 mode_line_string_list = Fcons (lisp_string, mode_line_string_list); |
14235 n += len; | 14235 n += len; |
14236 } | 14236 } |
14237 | 14237 |
14238 if (field_width > len) | 14238 if (field_width > len) |
14239 { | 14239 { |
14240 field_width -= len; | 14240 field_width -= len; |
14241 lisp_string = Fmake_string (make_number (field_width), make_number (' ')); | 14241 lisp_string = Fmake_string (make_number (field_width), make_number (' ')); |
14242 if (!NILP (props)) | 14242 if (!NILP (props)) |
14243 Fadd_text_properties (make_number (0), make_number (field_width), | 14243 Fadd_text_properties (make_number (0), make_number (field_width), |
14244 props, lisp_string); | 14244 props, lisp_string); |
14245 mode_line_string_list = Fcons (lisp_string, mode_line_string_list); | 14245 mode_line_string_list = Fcons (lisp_string, mode_line_string_list); |
14246 n += field_width; | 14246 n += field_width; |
14247 } | 14247 } |
14248 | 14248 |
14249 return n; | 14249 return n; |
14250 } | 14250 } |
14251 | 14251 |
14303 Fcons (Qface, Fcons (mode_line_string_face, Qnil)); | 14303 Fcons (Qface, Fcons (mode_line_string_face, Qnil)); |
14304 | 14304 |
14305 /* We need a dummy last element in mode_line_string_list to | 14305 /* We need a dummy last element in mode_line_string_list to |
14306 indicate we are building the propertized mode-line string. | 14306 indicate we are building the propertized mode-line string. |
14307 Using mode_line_string_face_prop here GC protects it. */ | 14307 Using mode_line_string_face_prop here GC protects it. */ |
14308 mode_line_string_list = | 14308 mode_line_string_list = |
14309 Fcons (mode_line_string_face_prop, Qnil); | 14309 Fcons (mode_line_string_face_prop, Qnil); |
14310 frame_title_ptr = NULL; | 14310 frame_title_ptr = NULL; |
14311 } | 14311 } |
14312 else | 14312 else |
14313 { | 14313 { |
15212 get_specified_cursor_type (arg, width) | 15212 get_specified_cursor_type (arg, width) |
15213 Lisp_Object arg; | 15213 Lisp_Object arg; |
15214 int *width; | 15214 int *width; |
15215 { | 15215 { |
15216 enum text_cursor_kinds type; | 15216 enum text_cursor_kinds type; |
15217 | 15217 |
15218 if (NILP (arg)) | 15218 if (NILP (arg)) |
15219 return NO_CURSOR; | 15219 return NO_CURSOR; |
15220 | 15220 |
15221 if (EQ (arg, Qbox)) | 15221 if (EQ (arg, Qbox)) |
15222 return FILLED_BOX_CURSOR; | 15222 return FILLED_BOX_CURSOR; |
15367 if (FRAME_BLINK_OFF_CURSOR (f) != DEFAULT_CURSOR) | 15367 if (FRAME_BLINK_OFF_CURSOR (f) != DEFAULT_CURSOR) |
15368 { | 15368 { |
15369 *width = FRAME_BLINK_OFF_CURSOR_WIDTH (f); | 15369 *width = FRAME_BLINK_OFF_CURSOR_WIDTH (f); |
15370 return FRAME_BLINK_OFF_CURSOR (f); | 15370 return FRAME_BLINK_OFF_CURSOR (f); |
15371 } | 15371 } |
15372 | 15372 |
15373 /* Finally perform built-in cursor blinking: | 15373 /* Finally perform built-in cursor blinking: |
15374 filled box <-> hollow box | 15374 filled box <-> hollow box |
15375 wide [h]bar <-> narrow [h]bar | 15375 wide [h]bar <-> narrow [h]bar |
15376 narrow [h]bar <-> no cursor | 15376 narrow [h]bar <-> no cursor |
15377 other type <-> no cursor */ | 15377 other type <-> no cursor */ |
15378 | 15378 |