aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2008-02-28 02:57:50 +0000
committerKenichi Handa2008-02-28 02:57:50 +0000
commitec1c43540c86886be6a4c9280e89942d0db417a9 (patch)
tree1e11b059db0f819d3ff67603770bc721a106f4ab /src
parent758710cb94511217f61909dbb48708a29503f44b (diff)
downloademacs-ec1c43540c86886be6a4c9280e89942d0db417a9.tar.gz
emacs-ec1c43540c86886be6a4c9280e89942d0db417a9.zip
(display_mode_element): Cancel the previous change.
(decode_mode_spec): Likewise.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog10
-rw-r--r--src/xdisp.c27
2 files changed, 19 insertions, 18 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 5311610b95a..20f1b129faf 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12008-02-28 Kenichi Handa <handa@ni.aist.go.jp>
2
3 * xdisp.c (display_mode_element): Cancel the previous change.
4 (decode_mode_spec): Likewise.
5
12008-02-27 Kim F. Storm <storm@cua.dk> 62008-02-27 Kim F. Storm <storm@cua.dk>
2 7
3 * lisp.h (GLYPH): Change type from int to struct with separate char 8 * lisp.h (GLYPH): Change type from int to struct with separate char
@@ -100,6 +105,11 @@
100 105
1012008-02-25 Kenichi Handa <handa@ni.aist.go.jp> 1062008-02-25 Kenichi Handa <handa@ni.aist.go.jp>
102 107
108 * xdisp.c (x_produce_glyphs): For a visible glyph, assure at least
109 1-pixel width.
110
1112008-02-25 Kenichi Handa <handa@ni.aist.go.jp>
112
103 * xdisp.c (fill_glyph_string): Pay attention to glyph->padding_p. 113 * xdisp.c (fill_glyph_string): Pay attention to glyph->padding_p.
104 (append_glyph): Set glyph->pixel_width and glyph->padding_p to 1 114 (append_glyph): Set glyph->pixel_width and glyph->padding_p to 1
105 if the glyph in the font is zero pixel with. 115 if the glyph in the font is zero pixel with.
diff --git a/src/xdisp.c b/src/xdisp.c
index cc8c4277cac..c6ebd596c2d 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -917,8 +917,7 @@ static int display_mode_lines P_ ((struct window *));
917static int display_mode_line P_ ((struct window *, enum face_id, Lisp_Object)); 917static int display_mode_line P_ ((struct window *, enum face_id, Lisp_Object));
918static int display_mode_element P_ ((struct it *, int, int, int, Lisp_Object, Lisp_Object, int)); 918static int display_mode_element P_ ((struct it *, int, int, int, Lisp_Object, Lisp_Object, int));
919static int store_mode_line_string P_ ((char *, Lisp_Object, int, int, int, Lisp_Object)); 919static int store_mode_line_string P_ ((char *, Lisp_Object, int, int, int, Lisp_Object));
920static char *decode_mode_spec P_ ((struct window *, int, int, int, int *, 920static char *decode_mode_spec P_ ((struct window *, int, int, int, int *));
921 Lisp_Object *));
922static void display_menu_bar P_ ((struct window *)); 921static void display_menu_bar P_ ((struct window *));
923static int display_count_lines P_ ((int, int, int, int, int *)); 922static int display_count_lines P_ ((int, int, int, int, int *));
924static int display_string P_ ((unsigned char *, Lisp_Object, Lisp_Object, 923static int display_string P_ ((unsigned char *, Lisp_Object, Lisp_Object,
@@ -17223,14 +17222,13 @@ display_mode_element (it, depth, field_width, precision, elt, props, risky)
17223 int multibyte; 17222 int multibyte;
17224 int bytepos, charpos; 17223 int bytepos, charpos;
17225 unsigned char *spec; 17224 unsigned char *spec;
17226 Lisp_Object string;
17227 17225
17228 bytepos = percent_position; 17226 bytepos = percent_position;
17229 charpos = (STRING_MULTIBYTE (elt) 17227 charpos = (STRING_MULTIBYTE (elt)
17230 ? string_byte_to_char (elt, bytepos) 17228 ? string_byte_to_char (elt, bytepos)
17231 : bytepos); 17229 : bytepos);
17232 spec = decode_mode_spec (it->w, c, field, prec, &multibyte, 17230 spec
17233 &string); 17231 = decode_mode_spec (it->w, c, field, prec, &multibyte);
17234 17232
17235 switch (mode_line_target) 17233 switch (mode_line_target)
17236 { 17234 {
@@ -17240,24 +17238,19 @@ display_mode_element (it, depth, field_width, precision, elt, props, risky)
17240 break; 17238 break;
17241 case MODE_LINE_STRING: 17239 case MODE_LINE_STRING:
17242 { 17240 {
17243 if (NILP (string)) 17241 int len = strlen (spec);
17244 { 17242 Lisp_Object tem = make_string (spec, len);
17245 int len = strlen (spec);
17246 string = make_string (spec, len);
17247 }
17248 props = Ftext_properties_at (make_number (charpos), elt); 17243 props = Ftext_properties_at (make_number (charpos), elt);
17249 /* Should only keep face property in props */ 17244 /* Should only keep face property in props */
17250 n += store_mode_line_string (NULL, string, 0, field, prec, props); 17245 n += store_mode_line_string (NULL, tem, 0, field, prec, props);
17251 } 17246 }
17252 break; 17247 break;
17253 case MODE_LINE_DISPLAY: 17248 case MODE_LINE_DISPLAY:
17254 { 17249 {
17255 int nglyphs_before, nwritten; 17250 int nglyphs_before, nwritten;
17256 17251
17257 if (STRINGP (string))
17258 spec = NULL;
17259 nglyphs_before = it->glyph_row->used[TEXT_AREA]; 17252 nglyphs_before = it->glyph_row->used[TEXT_AREA];
17260 nwritten = display_string (spec, string, elt, 17253 nwritten = display_string (spec, Qnil, elt,
17261 charpos, 0, it, 17254 charpos, 0, it,
17262 field, prec, 0, 17255 field, prec, 0,
17263 multibyte); 17256 multibyte);
@@ -17921,19 +17914,18 @@ decode_mode_spec_coding (coding_system, buf, eol_flag)
17921static char lots_of_dashes[] = "--------------------------------------------------------------------------------------------------------------------------------------------"; 17914static char lots_of_dashes[] = "--------------------------------------------------------------------------------------------------------------------------------------------";
17922 17915
17923static char * 17916static char *
17924decode_mode_spec (w, c, field_width, precision, multibyte, string) 17917decode_mode_spec (w, c, field_width, precision, multibyte)
17925 struct window *w; 17918 struct window *w;
17926 register int c; 17919 register int c;
17927 int field_width, precision; 17920 int field_width, precision;
17928 int *multibyte; 17921 int *multibyte;
17929 Lisp_Object *string;
17930{ 17922{
17931 Lisp_Object obj; 17923 Lisp_Object obj;
17932 struct frame *f = XFRAME (WINDOW_FRAME (w)); 17924 struct frame *f = XFRAME (WINDOW_FRAME (w));
17933 char *decode_mode_spec_buf = f->decode_mode_spec_buffer; 17925 char *decode_mode_spec_buf = f->decode_mode_spec_buffer;
17934 struct buffer *b = current_buffer; 17926 struct buffer *b = current_buffer;
17935 17927
17936 *string = obj = Qnil; 17928 obj = Qnil;
17937 *multibyte = 0; 17929 *multibyte = 0;
17938 17930
17939 switch (c) 17931 switch (c)
@@ -18326,7 +18318,6 @@ decode_mode_spec (w, c, field_width, precision, multibyte, string)
18326 if (STRINGP (obj)) 18318 if (STRINGP (obj))
18327 { 18319 {
18328 *multibyte = STRING_MULTIBYTE (obj); 18320 *multibyte = STRING_MULTIBYTE (obj);
18329 *string = obj;
18330 return (char *) SDATA (obj); 18321 return (char *) SDATA (obj);
18331 } 18322 }
18332 else 18323 else