From ec1c43540c86886be6a4c9280e89942d0db417a9 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Thu, 28 Feb 2008 02:57:50 +0000 Subject: [PATCH] (display_mode_element): Cancel the previous change. (decode_mode_spec): Likewise. --- src/ChangeLog | 10 ++++++++++ src/xdisp.c | 27 +++++++++------------------ 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 @@ +2008-02-28 Kenichi Handa + + * xdisp.c (display_mode_element): Cancel the previous change. + (decode_mode_spec): Likewise. + 2008-02-27 Kim F. Storm * lisp.h (GLYPH): Change type from int to struct with separate char @@ -98,6 +103,11 @@ (Fenlarge_window, Fshrink_window, Fset_window_configuration): Use run_window_configuration_change_hook. +2008-02-25 Kenichi Handa + + * xdisp.c (x_produce_glyphs): For a visible glyph, assure at least + 1-pixel width. + 2008-02-25 Kenichi Handa * xdisp.c (fill_glyph_string): Pay attention to glyph->padding_p. 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 *)); static int display_mode_line P_ ((struct window *, enum face_id, Lisp_Object)); static int display_mode_element P_ ((struct it *, int, int, int, Lisp_Object, Lisp_Object, int)); static int store_mode_line_string P_ ((char *, Lisp_Object, int, int, int, Lisp_Object)); -static char *decode_mode_spec P_ ((struct window *, int, int, int, int *, - Lisp_Object *)); +static char *decode_mode_spec P_ ((struct window *, int, int, int, int *)); static void display_menu_bar P_ ((struct window *)); static int display_count_lines P_ ((int, int, int, int, int *)); static 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) int multibyte; int bytepos, charpos; unsigned char *spec; - Lisp_Object string; bytepos = percent_position; charpos = (STRING_MULTIBYTE (elt) ? string_byte_to_char (elt, bytepos) : bytepos); - spec = decode_mode_spec (it->w, c, field, prec, &multibyte, - &string); + spec + = decode_mode_spec (it->w, c, field, prec, &multibyte); switch (mode_line_target) { @@ -17240,24 +17238,19 @@ display_mode_element (it, depth, field_width, precision, elt, props, risky) break; case MODE_LINE_STRING: { - if (NILP (string)) - { - int len = strlen (spec); - string = make_string (spec, len); - } + int len = strlen (spec); + Lisp_Object tem = make_string (spec, len); props = Ftext_properties_at (make_number (charpos), elt); /* Should only keep face property in props */ - n += store_mode_line_string (NULL, string, 0, field, prec, props); + n += store_mode_line_string (NULL, tem, 0, field, prec, props); } break; case MODE_LINE_DISPLAY: { int nglyphs_before, nwritten; - if (STRINGP (string)) - spec = NULL; nglyphs_before = it->glyph_row->used[TEXT_AREA]; - nwritten = display_string (spec, string, elt, + nwritten = display_string (spec, Qnil, elt, charpos, 0, it, field, prec, 0, multibyte); @@ -17921,19 +17914,18 @@ decode_mode_spec_coding (coding_system, buf, eol_flag) static char lots_of_dashes[] = "--------------------------------------------------------------------------------------------------------------------------------------------"; static char * -decode_mode_spec (w, c, field_width, precision, multibyte, string) +decode_mode_spec (w, c, field_width, precision, multibyte) struct window *w; register int c; int field_width, precision; int *multibyte; - Lisp_Object *string; { Lisp_Object obj; struct frame *f = XFRAME (WINDOW_FRAME (w)); char *decode_mode_spec_buf = f->decode_mode_spec_buffer; struct buffer *b = current_buffer; - *string = obj = Qnil; + obj = Qnil; *multibyte = 0; switch (c) @@ -18326,7 +18318,6 @@ decode_mode_spec (w, c, field_width, precision, multibyte, string) if (STRINGP (obj)) { *multibyte = STRING_MULTIBYTE (obj); - *string = obj; return (char *) SDATA (obj); } else -- 2.39.5