Mercurial > emacs
comparison src/xdisp.c @ 83310:e58cb448e07c
Merged from miles@gnu.org--gnu-2005 (patch 80-82, 350-422)
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-350
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-351
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-352
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-353
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-354
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-355
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-356
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-357
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-358
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-359
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-360
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-361
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-362
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-363
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-364
Remove "-face" suffix from widget faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-365
Remove "-face" suffix from custom faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-366
Remove "-face" suffix from change-log faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-367
Remove "-face" suffix from compilation faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-368
Remove "-face" suffix from diff-mode faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-369
lisp/longlines.el (longlines-visible-face): Face removed
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-370
Remove "-face" suffix from woman faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-371
Remove "-face" suffix from whitespace-highlight face
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-372
Remove "-face" suffix from ruler-mode faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-373
Remove "-face" suffix from show-paren faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-374
Remove "-face" suffix from log-view faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-375
Remove "-face" suffix from smerge faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-376
Remove "-face" suffix from show-tabs faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-377
Remove "-face" suffix from highlight-changes faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-378
Remove "-face" suffix from and downcase info faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-379
Remove "-face" suffix from pcvs faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-380
Update uses of renamed pcvs faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-381
Tweak ChangeLog
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-382
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-383
Remove "-face" suffix from strokes-char face
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-384
Remove "-face" suffix from compare-windows face
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-385
Remove "-face" suffix from calendar faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-386
Remove "-face" suffix from diary-button face
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-387
Remove "-face" suffix from testcover faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-388
Remove "-face" suffix from viper faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-389
Remove "-face" suffix from org faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-390
Remove "-face" suffix from sgml-namespace face
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-391
Remove "-face" suffix from table-cell face
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-392
Remove "-face" suffix from tex-mode faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-393
Remove "-face" suffix from texinfo-heading face
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-394
Remove "-face" suffix from flyspell faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-395
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-396
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-397
Remove "-face" suffix from gomoku faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-398
Remove "-face" suffix from mpuz faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-399
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-400
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-401
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-402
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-403
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-404
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-405
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-406
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-407
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-408
Remove "-face" suffix from Buffer-menu-buffer face
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-409
Remove "-face" suffix from antlr-mode faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-410
Remove "-face" suffix from ebrowse faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-411
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-412
Remove "-face" suffix from flymake faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-413
Remove "-face" suffix from idlwave faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-414
Remove "-face" suffix from sh-script faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-415
Remove "-face" suffix from vhdl-mode faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-416
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-417
Remove "-face" suffix from which-func face
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-418
Remove "-face" suffix from cperl-mode faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-419
Remove "-face" suffix from ld-script faces
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-420
Fix cperl-mode font-lock problem
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-421
Tweak which-func face
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-422
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-80
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-81
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-82
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-350
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Wed, 15 Jun 2005 12:57:51 +0000 |
parents | 6aee1e9b0bd7 e5a2d6aee2eb |
children | c016d82bf02b |
comparison
equal
deleted
inserted
replaced
83309:6aee1e9b0bd7 | 83310:e58cb448e07c |
---|---|
347 Lisp_Object Qtrailing_whitespace; | 347 Lisp_Object Qtrailing_whitespace; |
348 | 348 |
349 /* Name and number of the face used to highlight escape glyphs. */ | 349 /* Name and number of the face used to highlight escape glyphs. */ |
350 | 350 |
351 Lisp_Object Qescape_glyph; | 351 Lisp_Object Qescape_glyph; |
352 | |
353 /* Name and number of the face used to highlight non-breaking spaces. */ | |
354 | |
355 Lisp_Object Qno_break_space; | |
352 | 356 |
353 /* The symbol `image' which is the car of the lists used to represent | 357 /* The symbol `image' which is the car of the lists used to represent |
354 images in Lisp. */ | 358 images in Lisp. */ |
355 | 359 |
356 Lisp_Object Qimage; | 360 Lisp_Object Qimage; |
1879 struct glyph_row *row; | 1883 struct glyph_row *row; |
1880 struct glyph *glyph; | 1884 struct glyph *glyph; |
1881 int *heightp; | 1885 int *heightp; |
1882 { | 1886 { |
1883 struct frame *f = XFRAME (WINDOW_FRAME (w)); | 1887 struct frame *f = XFRAME (WINDOW_FRAME (w)); |
1884 int x, y, wd, h, h0, y0; | 1888 int y, wd, h, h0, y0; |
1885 | 1889 |
1886 /* Compute the width of the rectangle to draw. If on a stretch | 1890 /* Compute the width of the rectangle to draw. If on a stretch |
1887 glyph, and `x-stretch-block-cursor' is nil, don't draw a | 1891 glyph, and `x-stretch-block-cursor' is nil, don't draw a |
1888 rectangle as wide as the glyph, but use a canonical character | 1892 rectangle as wide as the glyph, but use a canonical character |
1889 width instead. */ | 1893 width instead. */ |
5079 || (it->multibyte_p | 5083 || (it->multibyte_p |
5080 ? ((it->c >= 127 | 5084 ? ((it->c >= 127 |
5081 && it->len == 1) | 5085 && it->len == 1) |
5082 || !CHAR_PRINTABLE_P (it->c) | 5086 || !CHAR_PRINTABLE_P (it->c) |
5083 || (!NILP (Vshow_nonbreak_escape) | 5087 || (!NILP (Vshow_nonbreak_escape) |
5084 && (it->c == 0x8ad || it->c == 0x8a0 | 5088 && (it->c == 0x8a0 || it->c == 0x8ad |
5085 || it->c == 0xf2d || it->c == 0xf20))) | 5089 || it->c == 0x920 || it->c == 0x92d |
5090 || it->c == 0xe20 || it->c == 0xe2d | |
5091 || it->c == 0xf20 || it->c == 0xf2d))) | |
5086 : (it->c >= 127 | 5092 : (it->c >= 127 |
5087 && (!unibyte_display_via_language_environment | 5093 && (!unibyte_display_via_language_environment |
5088 || it->c == unibyte_char_to_multibyte (it->c))))) | 5094 || it->c == unibyte_char_to_multibyte (it->c))))) |
5089 { | 5095 { |
5090 /* IT->c is a control character which must be displayed | 5096 /* IT->c is a control character which must be displayed |
5094 display. Then, set IT->dpvec to these glyphs. */ | 5100 display. Then, set IT->dpvec to these glyphs. */ |
5095 GLYPH g; | 5101 GLYPH g; |
5096 int ctl_len; | 5102 int ctl_len; |
5097 int face_id, lface_id = 0 ; | 5103 int face_id, lface_id = 0 ; |
5098 GLYPH escape_glyph; | 5104 GLYPH escape_glyph; |
5105 | |
5106 /* Handle control characters with ^. */ | |
5099 | 5107 |
5100 if (it->c < 128 && it->ctl_arrow_p) | 5108 if (it->c < 128 && it->ctl_arrow_p) |
5101 { | 5109 { |
5102 g = '^'; /* default glyph for Control */ | 5110 g = '^'; /* default glyph for Control */ |
5103 /* Set IT->ctl_chars[0] to the glyph for `^'. */ | 5111 /* Set IT->ctl_chars[0] to the glyph for `^'. */ |
5126 XSETINT (it->ctl_chars[1], g); | 5134 XSETINT (it->ctl_chars[1], g); |
5127 ctl_len = 2; | 5135 ctl_len = 2; |
5128 goto display_control; | 5136 goto display_control; |
5129 } | 5137 } |
5130 | 5138 |
5131 escape_glyph = '\\'; /* default for Octal display */ | 5139 /* Handle non-break space in the mode where it only gets |
5140 highlighting. */ | |
5141 | |
5142 if (! EQ (Vshow_nonbreak_escape, Qt) | |
5143 && (it->c == 0x8a0 || it->c == 0x920 | |
5144 || it->c == 0xe20 || it->c == 0xf20)) | |
5145 { | |
5146 /* Merge the no-break-space face into the current face. */ | |
5147 face_id = merge_faces (it->f, Qno_break_space, 0, | |
5148 it->face_id); | |
5149 | |
5150 g = it->c = ' '; | |
5151 XSETINT (it->ctl_chars[0], g); | |
5152 ctl_len = 1; | |
5153 goto display_control; | |
5154 } | |
5155 | |
5156 /* Handle sequences that start with the "escape glyph". */ | |
5157 | |
5158 /* the default escape glyph is \. */ | |
5159 escape_glyph = '\\'; | |
5160 | |
5132 if (it->dp | 5161 if (it->dp |
5133 && INTEGERP (DISP_ESCAPE_GLYPH (it->dp)) | 5162 && INTEGERP (DISP_ESCAPE_GLYPH (it->dp)) |
5134 && GLYPH_CHAR_VALID_P (XFASTINT (DISP_ESCAPE_GLYPH (it->dp)))) | 5163 && GLYPH_CHAR_VALID_P (XFASTINT (DISP_ESCAPE_GLYPH (it->dp)))) |
5135 { | 5164 { |
5136 escape_glyph = XFASTINT (DISP_ESCAPE_GLYPH (it->dp)); | 5165 escape_glyph = XFASTINT (DISP_ESCAPE_GLYPH (it->dp)); |
5137 lface_id = FAST_GLYPH_FACE (escape_glyph); | 5166 lface_id = FAST_GLYPH_FACE (escape_glyph); |
5138 } | 5167 } |
5139 if (lface_id) | 5168 if (lface_id) |
5140 { | 5169 { |
5170 /* The display table specified a face. | |
5171 Merge it into face_id and also into escape_glyph. */ | |
5141 escape_glyph = FAST_GLYPH_CHAR (escape_glyph); | 5172 escape_glyph = FAST_GLYPH_CHAR (escape_glyph); |
5142 face_id = merge_faces (it->f, Qt, lface_id, | 5173 face_id = merge_faces (it->f, Qt, lface_id, |
5143 it->face_id); | 5174 it->face_id); |
5144 } | 5175 } |
5145 else | 5176 else |
5147 /* Merge the escape-glyph face into the current face. */ | 5178 /* Merge the escape-glyph face into the current face. */ |
5148 face_id = merge_faces (it->f, Qescape_glyph, 0, | 5179 face_id = merge_faces (it->f, Qescape_glyph, 0, |
5149 it->face_id); | 5180 it->face_id); |
5150 } | 5181 } |
5151 | 5182 |
5183 /* Handle soft hyphens in the mode where they only get | |
5184 highlighting. */ | |
5185 | |
5186 if (! EQ (Vshow_nonbreak_escape, Qt) | |
5187 && (it->c == 0x8ad || it->c == 0x92d | |
5188 || it->c == 0xe2d || it->c == 0xf2d)) | |
5189 { | |
5190 g = it->c = '-'; | |
5191 XSETINT (it->ctl_chars[0], g); | |
5192 ctl_len = 1; | |
5193 goto display_control; | |
5194 } | |
5195 | |
5196 /* Handle non-break space and soft hyphen | |
5197 with the escape glyph. */ | |
5198 | |
5152 if (it->c == 0x8a0 || it->c == 0x8ad | 5199 if (it->c == 0x8a0 || it->c == 0x8ad |
5200 || it->c == 0x920 || it->c == 0x92d | |
5201 || it->c == 0xe20 || it->c == 0xe2d | |
5153 || it->c == 0xf20 || it->c == 0xf2d) | 5202 || it->c == 0xf20 || it->c == 0xf2d) |
5154 { | 5203 { |
5155 XSETINT (it->ctl_chars[0], escape_glyph); | 5204 XSETINT (it->ctl_chars[0], escape_glyph); |
5156 g = it->c; | 5205 g = it->c = ((it->c & 0xf) == 0 ? ' ' : '-'); |
5157 XSETINT (it->ctl_chars[1], g); | 5206 XSETINT (it->ctl_chars[1], g); |
5158 ctl_len = 2; | 5207 ctl_len = 2; |
5159 goto display_control; | 5208 goto display_control; |
5160 } | 5209 } |
5161 | 5210 |
8203 | 8252 |
8204 static Lisp_Object | 8253 static Lisp_Object |
8205 format_mode_line_unwind_data (obuf) | 8254 format_mode_line_unwind_data (obuf) |
8206 struct buffer *obuf; | 8255 struct buffer *obuf; |
8207 { | 8256 { |
8208 int i = 0; | |
8209 Lisp_Object vector; | 8257 Lisp_Object vector; |
8210 | 8258 |
8211 /* Reduce consing by keeping one vector in | 8259 /* Reduce consing by keeping one vector in |
8212 Vwith_echo_area_save_vector. */ | 8260 Vwith_echo_area_save_vector. */ |
8213 vector = Vmode_line_unwind_vector; | 8261 vector = Vmode_line_unwind_vector; |
8440 if (all_windows) | 8488 if (all_windows) |
8441 { | 8489 { |
8442 Lisp_Object tail, frame; | 8490 Lisp_Object tail, frame; |
8443 int count = SPECPDL_INDEX (); | 8491 int count = SPECPDL_INDEX (); |
8444 | 8492 |
8445 record_unwind_protect (Fset_match_data, Fmatch_data (Qnil, Qnil)); | 8493 record_unwind_save_match_data (); |
8446 | 8494 |
8447 FOR_EACH_FRAME (tail, frame) | 8495 FOR_EACH_FRAME (tail, frame) |
8448 { | 8496 { |
8449 f = XFRAME (frame); | 8497 f = XFRAME (frame); |
8450 | 8498 |
8563 | 8611 |
8564 specbind (Qinhibit_menubar_update, Qt); | 8612 specbind (Qinhibit_menubar_update, Qt); |
8565 | 8613 |
8566 set_buffer_internal_1 (XBUFFER (w->buffer)); | 8614 set_buffer_internal_1 (XBUFFER (w->buffer)); |
8567 if (save_match_data) | 8615 if (save_match_data) |
8568 record_unwind_protect (Fset_match_data, Fmatch_data (Qnil, Qnil)); | 8616 record_unwind_save_match_data (); |
8569 if (NILP (Voverriding_local_map_menu_flag)) | 8617 if (NILP (Voverriding_local_map_menu_flag)) |
8570 { | 8618 { |
8571 specbind (Qoverriding_terminal_local_map, Qnil); | 8619 specbind (Qoverriding_terminal_local_map, Qnil); |
8572 specbind (Qoverriding_local_map, Qnil); | 8620 specbind (Qoverriding_local_map, Qnil); |
8573 } | 8621 } |
8754 keymaps. */ | 8802 keymaps. */ |
8755 set_buffer_internal_1 (XBUFFER (w->buffer)); | 8803 set_buffer_internal_1 (XBUFFER (w->buffer)); |
8756 | 8804 |
8757 /* Save match data, if we must. */ | 8805 /* Save match data, if we must. */ |
8758 if (save_match_data) | 8806 if (save_match_data) |
8759 record_unwind_protect (Fset_match_data, Fmatch_data (Qnil, Qnil)); | 8807 record_unwind_save_match_data (); |
8760 | 8808 |
8761 /* Make sure that we don't accidentally use bogus keymaps. */ | 8809 /* Make sure that we don't accidentally use bogus keymaps. */ |
8762 if (NILP (Voverriding_local_map_menu_flag)) | 8810 if (NILP (Voverriding_local_map_menu_flag)) |
8763 { | 8811 { |
8764 specbind (Qoverriding_terminal_local_map, Qnil); | 8812 specbind (Qoverriding_terminal_local_map, Qnil); |
19158 static Lisp_Object | 19206 static Lisp_Object |
19159 get_line_height_property (it, prop) | 19207 get_line_height_property (it, prop) |
19160 struct it *it; | 19208 struct it *it; |
19161 Lisp_Object prop; | 19209 Lisp_Object prop; |
19162 { | 19210 { |
19163 Lisp_Object position, val; | 19211 Lisp_Object position; |
19164 | 19212 |
19165 if (STRINGP (it->object)) | 19213 if (STRINGP (it->object)) |
19166 position = make_number (IT_STRING_CHARPOS (*it)); | 19214 position = make_number (IT_STRING_CHARPOS (*it)); |
19167 else if (BUFFERP (it->object)) | 19215 else if (BUFFERP (it->object)) |
19168 position = make_number (IT_CHARPOS (*it)); | 19216 position = make_number (IT_CHARPOS (*it)); |
19509 extra_line_spacing = 0; | 19557 extra_line_spacing = 0; |
19510 } | 19558 } |
19511 else | 19559 else |
19512 { | 19560 { |
19513 Lisp_Object spacing; | 19561 Lisp_Object spacing; |
19514 int total = 0; | |
19515 | 19562 |
19516 it->phys_ascent = it->ascent; | 19563 it->phys_ascent = it->ascent; |
19517 it->phys_descent = it->descent; | 19564 it->phys_descent = it->descent; |
19518 | 19565 |
19519 if ((it->max_ascent > 0 || it->max_descent > 0) | 19566 if ((it->max_ascent > 0 || it->max_descent > 0) |
21478 int gpos; | 21525 int gpos; |
21479 int gseq_length; | 21526 int gseq_length; |
21480 int total_pixel_width; | 21527 int total_pixel_width; |
21481 int ignore; | 21528 int ignore; |
21482 | 21529 |
21483 | 21530 int vpos, hpos; |
21484 if (clear_mouse_face (dpyinfo)) | |
21485 cursor = No_Cursor; | |
21486 | 21531 |
21487 b = Fprevious_single_property_change (make_number (charpos + 1), | 21532 b = Fprevious_single_property_change (make_number (charpos + 1), |
21488 Qmouse_face, string, Qnil); | 21533 Qmouse_face, string, Qnil); |
21489 if (NILP (b)) | 21534 if (NILP (b)) |
21490 b = make_number (0); | 21535 b = make_number (0); |
21524 | 21569 |
21525 total_pixel_width = 0; | 21570 total_pixel_width = 0; |
21526 for (tmp_glyph = glyph - gpos; tmp_glyph != glyph; tmp_glyph++) | 21571 for (tmp_glyph = glyph - gpos; tmp_glyph != glyph; tmp_glyph++) |
21527 total_pixel_width += tmp_glyph->pixel_width; | 21572 total_pixel_width += tmp_glyph->pixel_width; |
21528 | 21573 |
21529 dpyinfo->mouse_face_beg_col = (x - gpos); | 21574 /* Pre calculation of re-rendering position */ |
21530 dpyinfo->mouse_face_beg_row = (area == ON_MODE_LINE | 21575 vpos = (x - gpos); |
21531 ? (w->current_matrix)->nrows - 1 | 21576 hpos = (area == ON_MODE_LINE |
21532 : 0); | 21577 ? (w->current_matrix)->nrows - 1 |
21578 : 0); | |
21579 | |
21580 /* If the re-rendering position is included in the last | |
21581 re-rendering area, we should do nothing. */ | |
21582 if ( EQ (window, dpyinfo->mouse_face_window) | |
21583 && dpyinfo->mouse_face_beg_col <= vpos | |
21584 && vpos < dpyinfo->mouse_face_end_col | |
21585 && dpyinfo->mouse_face_beg_row == hpos ) | |
21586 return; | |
21587 | |
21588 if (clear_mouse_face (dpyinfo)) | |
21589 cursor = No_Cursor; | |
21590 | |
21591 dpyinfo->mouse_face_beg_col = vpos; | |
21592 dpyinfo->mouse_face_beg_row = hpos; | |
21533 | 21593 |
21534 dpyinfo->mouse_face_beg_x = original_x_pixel - (total_pixel_width + dx); | 21594 dpyinfo->mouse_face_beg_x = original_x_pixel - (total_pixel_width + dx); |
21535 dpyinfo->mouse_face_beg_y = 0; | 21595 dpyinfo->mouse_face_beg_y = 0; |
21536 | 21596 |
21537 dpyinfo->mouse_face_end_col = (x - gpos) + gseq_length; | 21597 dpyinfo->mouse_face_end_col = vpos + gseq_length; |
21538 dpyinfo->mouse_face_end_row = dpyinfo->mouse_face_beg_row; | 21598 dpyinfo->mouse_face_end_row = dpyinfo->mouse_face_beg_row; |
21539 | 21599 |
21540 dpyinfo->mouse_face_end_x = 0; | 21600 dpyinfo->mouse_face_end_x = 0; |
21541 dpyinfo->mouse_face_end_y = 0; | 21601 dpyinfo->mouse_face_end_y = 0; |
21542 | 21602 |
21550 show_mouse_face (dpyinfo, DRAW_MOUSE_FACE); | 21610 show_mouse_face (dpyinfo, DRAW_MOUSE_FACE); |
21551 | 21611 |
21552 if (NILP (pointer)) | 21612 if (NILP (pointer)) |
21553 pointer = Qhand; | 21613 pointer = Qhand; |
21554 } | 21614 } |
21555 } | 21615 else if ((area == ON_MODE_LINE) || (area == ON_HEADER_LINE)) |
21556 | 21616 clear_mouse_face (dpyinfo); |
21617 } | |
21557 define_frame_cursor1 (f, cursor, pointer); | 21618 define_frame_cursor1 (f, cursor, pointer); |
21558 } | 21619 } |
21559 | 21620 |
21560 | 21621 |
21561 /* EXPORT: | 21622 /* EXPORT: |
21604 window = window_from_coordinates (f, x, y, &part, 0, 0, 1); | 21665 window = window_from_coordinates (f, x, y, &part, 0, 0, 1); |
21605 | 21666 |
21606 /* If we were displaying active text in another window, clear that. | 21667 /* If we were displaying active text in another window, clear that. |
21607 Also clear if we move out of text area in same window. */ | 21668 Also clear if we move out of text area in same window. */ |
21608 if (! EQ (window, dpyinfo->mouse_face_window) | 21669 if (! EQ (window, dpyinfo->mouse_face_window) |
21609 || (part != ON_TEXT && !NILP (dpyinfo->mouse_face_window))) | 21670 || (part != ON_TEXT && part != ON_MODE_LINE && part != ON_HEADER_LINE |
21671 && !NILP (dpyinfo->mouse_face_window))) | |
21610 clear_mouse_face (dpyinfo); | 21672 clear_mouse_face (dpyinfo); |
21611 | 21673 |
21612 /* Not on a window -> return. */ | 21674 /* Not on a window -> return. */ |
21613 if (!WINDOWP (window)) | 21675 if (!WINDOWP (window)) |
21614 return; | 21676 return; |
22721 staticpro (&Qfontification_functions); | 22783 staticpro (&Qfontification_functions); |
22722 Qtrailing_whitespace = intern ("trailing-whitespace"); | 22784 Qtrailing_whitespace = intern ("trailing-whitespace"); |
22723 staticpro (&Qtrailing_whitespace); | 22785 staticpro (&Qtrailing_whitespace); |
22724 Qescape_glyph = intern ("escape-glyph"); | 22786 Qescape_glyph = intern ("escape-glyph"); |
22725 staticpro (&Qescape_glyph); | 22787 staticpro (&Qescape_glyph); |
22788 Qno_break_space = intern ("no-break-space"); | |
22789 staticpro (&Qno_break_space); | |
22726 Qimage = intern ("image"); | 22790 Qimage = intern ("image"); |
22727 staticpro (&Qimage); | 22791 staticpro (&Qimage); |
22728 QCmap = intern (":map"); | 22792 QCmap = intern (":map"); |
22729 staticpro (&QCmap); | 22793 staticpro (&QCmap); |
22730 QCpointer = intern (":pointer"); | 22794 QCpointer = intern (":pointer"); |
22827 doc: /* *Non-nil means highlight trailing whitespace. | 22891 doc: /* *Non-nil means highlight trailing whitespace. |
22828 The face used for trailing whitespace is `trailing-whitespace'. */); | 22892 The face used for trailing whitespace is `trailing-whitespace'. */); |
22829 Vshow_trailing_whitespace = Qnil; | 22893 Vshow_trailing_whitespace = Qnil; |
22830 | 22894 |
22831 DEFVAR_LISP ("show-nonbreak-escape", &Vshow_nonbreak_escape, | 22895 DEFVAR_LISP ("show-nonbreak-escape", &Vshow_nonbreak_escape, |
22832 doc: /* *Non-nil means display escape character before non-break space and hyphen. */); | 22896 doc: /* *Control highlighting of non-break space and soft hyphen. |
22897 t means highlight the character itself (for non-break space, | |
22898 use face `non-break-space'. | |
22899 nil means no highlighting. | |
22900 other values mean display the escape glyph before the character. */); | |
22833 Vshow_nonbreak_escape = Qt; | 22901 Vshow_nonbreak_escape = Qt; |
22834 | 22902 |
22835 DEFVAR_LISP ("void-text-area-pointer", &Vvoid_text_area_pointer, | 22903 DEFVAR_LISP ("void-text-area-pointer", &Vvoid_text_area_pointer, |
22836 doc: /* *The pointer shape to show in void text areas. | 22904 doc: /* *The pointer shape to show in void text areas. |
22837 Nil means to show the text pointer. Other options are `arrow', `text', | 22905 Nil means to show the text pointer. Other options are `arrow', `text', |