comparison src/xdisp.c @ 83236:6b379caca6fa

Merged in changes from CVS trunk. Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-720 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-721 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-722 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-723 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-724 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-725 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-276
author Karoly Lorentey <lorentey@elte.hu>
date Fri, 10 Dec 2004 15:24:54 +0000
parents 549734260e34 5a16d4350770
children 4ee39d9428b0
comparison
equal deleted inserted replaced
83235:7950b2b0a56a 83236:6b379caca6fa
339 Lisp_Object Vvoid_text_area_pointer; 339 Lisp_Object Vvoid_text_area_pointer;
340 340
341 /* Name of the face used to highlight trailing whitespace. */ 341 /* Name of the face used to highlight trailing whitespace. */
342 342
343 Lisp_Object Qtrailing_whitespace; 343 Lisp_Object Qtrailing_whitespace;
344
345 /* Name and number of the face used to highlight escape glyphs. */
346
347 Lisp_Object Qescape_glyph;
348 int escape_glyph_face;
344 349
345 /* The symbol `image' which is the car of the lists used to represent 350 /* The symbol `image' which is the car of the lists used to represent
346 images in Lisp. */ 351 images in Lisp. */
347 352
348 Lisp_Object Qimage; 353 Lisp_Object Qimage;
4919 can be defined in the display table. Fill 4924 can be defined in the display table. Fill
4920 IT->ctl_chars with glyphs for what we have to 4925 IT->ctl_chars with glyphs for what we have to
4921 display. Then, set IT->dpvec to these glyphs. */ 4926 display. Then, set IT->dpvec to these glyphs. */
4922 GLYPH g; 4927 GLYPH g;
4923 int ctl_len; 4928 int ctl_len;
4929 int face_id = escape_glyph_face;
4930
4931 /* Find the face id if `escape-glyph' unless we recently did. */
4932 if (face_id < 0)
4933 {
4934 Lisp_Object tem = Fget (Qescape_glyph, Qface);
4935 if (INTEGERP (tem))
4936 face_id = XINT (tem);
4937 else
4938 face_id = 0;
4939 /* If there's overflow, use 0 instead. */
4940 if (FAST_GLYPH_FACE (FAST_MAKE_GLYPH (0, face_id)) != face_id)
4941 face_id = 0;
4942 escape_glyph_face = face_id;
4943 }
4924 4944
4925 if (it->c < 128 && it->ctl_arrow_p) 4945 if (it->c < 128 && it->ctl_arrow_p)
4926 { 4946 {
4927 /* Set IT->ctl_chars[0] to the glyph for `^'. */ 4947 /* Set IT->ctl_chars[0] to the glyph for `^'. */
4928 if (it->dp 4948 if (it->dp
4929 && INTEGERP (DISP_CTRL_GLYPH (it->dp)) 4949 && INTEGERP (DISP_CTRL_GLYPH (it->dp))
4930 && GLYPH_CHAR_VALID_P (XINT (DISP_CTRL_GLYPH (it->dp)))) 4950 && GLYPH_CHAR_VALID_P (XINT (DISP_CTRL_GLYPH (it->dp))))
4931 g = XINT (DISP_CTRL_GLYPH (it->dp)); 4951 g = XINT (DISP_CTRL_GLYPH (it->dp));
4932 else 4952 else
4933 g = FAST_MAKE_GLYPH ('^', 0); 4953 g = FAST_MAKE_GLYPH ('^', face_id);
4934 XSETINT (it->ctl_chars[0], g); 4954 XSETINT (it->ctl_chars[0], g);
4935 4955
4936 g = FAST_MAKE_GLYPH (it->c ^ 0100, 0); 4956 g = FAST_MAKE_GLYPH (it->c ^ 0100, face_id);
4937 XSETINT (it->ctl_chars[1], g); 4957 XSETINT (it->ctl_chars[1], g);
4938 ctl_len = 2; 4958 ctl_len = 2;
4939 } 4959 }
4940 else 4960 else
4941 { 4961 {
4948 if (it->dp 4968 if (it->dp
4949 && INTEGERP (DISP_ESCAPE_GLYPH (it->dp)) 4969 && INTEGERP (DISP_ESCAPE_GLYPH (it->dp))
4950 && GLYPH_CHAR_VALID_P (XFASTINT (DISP_ESCAPE_GLYPH (it->dp)))) 4970 && GLYPH_CHAR_VALID_P (XFASTINT (DISP_ESCAPE_GLYPH (it->dp))))
4951 escape_glyph = XFASTINT (DISP_ESCAPE_GLYPH (it->dp)); 4971 escape_glyph = XFASTINT (DISP_ESCAPE_GLYPH (it->dp));
4952 else 4972 else
4953 escape_glyph = FAST_MAKE_GLYPH ('\\', 0); 4973 escape_glyph = FAST_MAKE_GLYPH ('\\', face_id);
4954 4974
4955 if (SINGLE_BYTE_CHAR_P (it->c)) 4975 if (SINGLE_BYTE_CHAR_P (it->c))
4956 str[0] = it->c, len = 1; 4976 str[0] = it->c, len = 1;
4957 else 4977 else
4958 { 4978 {
4975 for (i = 0; i < len; i++) 4995 for (i = 0; i < len; i++)
4976 { 4996 {
4977 XSETINT (it->ctl_chars[i * 4], escape_glyph); 4997 XSETINT (it->ctl_chars[i * 4], escape_glyph);
4978 /* Insert three more glyphs into IT->ctl_chars for 4998 /* Insert three more glyphs into IT->ctl_chars for
4979 the octal display of the character. */ 4999 the octal display of the character. */
4980 g = FAST_MAKE_GLYPH (((str[i] >> 6) & 7) + '0', 0); 5000 g = FAST_MAKE_GLYPH (((str[i] >> 6) & 7) + '0',
5001 face_id);
4981 XSETINT (it->ctl_chars[i * 4 + 1], g); 5002 XSETINT (it->ctl_chars[i * 4 + 1], g);
4982 g = FAST_MAKE_GLYPH (((str[i] >> 3) & 7) + '0', 0); 5003 g = FAST_MAKE_GLYPH (((str[i] >> 3) & 7) + '0',
5004 face_id);
4983 XSETINT (it->ctl_chars[i * 4 + 2], g); 5005 XSETINT (it->ctl_chars[i * 4 + 2], g);
4984 g = FAST_MAKE_GLYPH ((str[i] & 7) + '0', 0); 5006 g = FAST_MAKE_GLYPH ((str[i] & 7) + '0',
5007 face_id);
4985 XSETINT (it->ctl_chars[i * 4 + 3], g); 5008 XSETINT (it->ctl_chars[i * 4 + 3], g);
4986 } 5009 }
4987 ctl_len = len * 4; 5010 ctl_len = len * 4;
4988 } 5011 }
4989 5012
11577 xassert (!NILP (w->buffer)); 11600 xassert (!NILP (w->buffer));
11578 #if GLYPH_DEBUG 11601 #if GLYPH_DEBUG
11579 *w->desired_matrix->method = 0; 11602 *w->desired_matrix->method = 0;
11580 #endif 11603 #endif
11581 11604
11605 /* Force this to be looked up again for each redisp of each window. */
11606 escape_glyph_face = -1;
11607
11582 specbind (Qinhibit_point_motion_hooks, Qt); 11608 specbind (Qinhibit_point_motion_hooks, Qt);
11583 11609
11584 reconsider_clip_changes (w, buffer); 11610 reconsider_clip_changes (w, buffer);
11585 11611
11586 /* Has the mode line to be updated? */ 11612 /* Has the mode line to be updated? */
22148 staticpro (&Qfontified); 22174 staticpro (&Qfontified);
22149 Qfontification_functions = intern ("fontification-functions"); 22175 Qfontification_functions = intern ("fontification-functions");
22150 staticpro (&Qfontification_functions); 22176 staticpro (&Qfontification_functions);
22151 Qtrailing_whitespace = intern ("trailing-whitespace"); 22177 Qtrailing_whitespace = intern ("trailing-whitespace");
22152 staticpro (&Qtrailing_whitespace); 22178 staticpro (&Qtrailing_whitespace);
22179 Qescape_glyph = intern ("escape-glyph");
22180 staticpro (&Qescape_glyph);
22153 Qimage = intern ("image"); 22181 Qimage = intern ("image");
22154 staticpro (&Qimage); 22182 staticpro (&Qimage);
22155 QCmap = intern (":map"); 22183 QCmap = intern (":map");
22156 staticpro (&QCmap); 22184 staticpro (&QCmap);
22157 QCpointer = intern (":pointer"); 22185 QCpointer = intern (":pointer");