[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r99310: Display buffer name, etc. in
From: |
Kenichi Handa |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r99310: Display buffer name, etc. in mode line by composing correctly. |
Date: |
Wed, 13 Jan 2010 10:40:39 +0900 |
User-agent: |
Bazaar (2.0.2) |
------------------------------------------------------------
revno: 99310 [merge]
committer: Kenichi Handa <address@hidden>
branch nick: trunk
timestamp: Wed 2010-01-13 10:40:39 +0900
message:
Display buffer name, etc. in mode line by composing correctly.
modified:
src/ChangeLog
src/composite.c
src/xdisp.c
src/xterm.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2010-01-12 10:10:51 +0000
+++ b/src/ChangeLog 2010-01-13 01:33:19 +0000
@@ -1,3 +1,21 @@
+2010-01-13 Kenichi Handa <address@hidden>
+
+ Display buffer name, etc. in mode line by composing correctly.
+
+ * xdisp.c (reseat_to_string): Call composition_compute_stop_pos if
+ STRING is not nil.
+ (display_mode_element): Adjusted for the change of
+ decode_mode_spec and display_line.
+ (decode_mode_spec): Change arg MULTIBYTE to STRING.
+ (display_string): Handle the case that STRING is non-null and
+ LISP_STRING is not nil.
+
+ * xterm.c (x_draw_composite_glyph_string_foreground): Pay
+ attention to s->face->overstrike.
+
+ * composite.c (composition_reseat_it): Don't check PT if STRING is
+ non nil.
+
2010-01-12 YAMAMOTO Mitsuharu <address@hidden>
* keyboard.c (read_char): Don't apply previous change when current
=== modified file 'src/composite.c'
--- a/src/composite.c 2010-01-04 05:35:18 +0000
+++ b/src/composite.c 2010-01-13 01:29:58 +0000
@@ -1104,7 +1104,7 @@
struct face *face;
Lisp_Object string;
{
- if (charpos < PT && PT < endpos)
+ if (NILP (string) && charpos < PT && PT < endpos)
endpos = PT;
if (cmp_it->ch == -2)
=== modified file 'src/xdisp.c'
--- a/src/xdisp.c 2010-01-09 19:48:16 +0000
+++ b/src/xdisp.c 2010-01-13 01:29:58 +0000
@@ -953,7 +953,8 @@
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 *));
+static char *decode_mode_spec P_ ((struct window *, int, int, int,
+ Lisp_Object *));
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,
@@ -5607,6 +5608,9 @@
it->dp = XCHAR_TABLE (Vstandard_display_table);
it->stop_charpos = charpos;
+ if (s == NULL && it->multibyte_p)
+ composition_compute_stop_pos (&it->cmp_it, charpos, -1, it->end_charpos,
+ it->string);
CHECK_IT (it);
}
@@ -17576,13 +17580,14 @@
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);
+ spec = decode_mode_spec (it->w, c, field, prec, &string);
+ multibyte = STRINGP (string) && STRING_MULTIBYTE (string);
switch (mode_line_target)
{
@@ -17604,7 +17609,7 @@
int nglyphs_before, nwritten;
nglyphs_before = it->glyph_row->used[TEXT_AREA];
- nwritten = display_string (spec, Qnil, elt,
+ nwritten = display_string (spec, string, elt,
charpos, 0, it,
field, prec, 0,
multibyte);
@@ -18267,8 +18272,8 @@
/* Return a string for the output of a mode line %-spec for window W,
generated by character C. PRECISION >= 0 means don't return a
string longer than that value. FIELD_WIDTH > 0 means pad the
- string returned with spaces to that value. Return 1 in *MULTIBYTE
- if the result is multibyte text.
+ string returned with spaces to that value. Return a Lisp string in
+ *STRING if the resulting string is taken from that Lisp string.
Note we operate on the current buffer for most purposes,
the exception being w->base_line_pos. */
@@ -18276,11 +18281,11 @@
static char lots_of_dashes[] =
"--------------------------------------------------------------------------------------------------------------------------------------------";
static char *
-decode_mode_spec (w, c, field_width, precision, multibyte)
+decode_mode_spec (w, c, field_width, precision, string)
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));
@@ -18288,7 +18293,7 @@
struct buffer *b = current_buffer;
obj = Qnil;
- *multibyte = 0;
+ *string = Qnil;
switch (c)
{
@@ -18682,7 +18687,7 @@
if (STRINGP (obj))
{
- *multibyte = STRING_MULTIBYTE (obj);
+ *string = obj;
return (char *) SDATA (obj);
}
else
@@ -18803,7 +18808,10 @@
/* Display a NUL-terminated string, starting with index START.
If STRING is non-null, display that C string. Otherwise, the Lisp
- string LISP_STRING is displayed.
+ string LISP_STRING is displayed. There's a case that STRING is
+ non-null and LISP_STRING is not nil. It means STRING is a string
+ data of LISP_STRING. In that case, we display LISP_STRING while
+ ignoring its text properties.
If FACE_STRING is not nil, FACE_STRING_POS is a position in
FACE_STRING. Display STRING or LISP_STRING with the face at
@@ -18853,8 +18861,12 @@
/* Initialize the iterator IT for iteration over STRING beginning
with index START. */
- reseat_to_string (it, string, lisp_string, start,
+ reseat_to_string (it, NILP (lisp_string) ? string : NULL, lisp_string, start,
precision, field_width, multibyte);
+ if (string && STRINGP (lisp_string))
+ /* LISP_STRING is the one returned by decode_mode_spec. We should
+ ignore its text properties. */
+ it->stop_charpos = -1;
/* If displaying STRING, set up the face of the iterator
from LISP_STRING, if that's given. */
=== modified file 'src/xterm.c'
--- a/src/xterm.c 2010-01-09 04:16:32 +0000
+++ b/src/xterm.c 2010-01-13 01:29:58 +0000
@@ -1378,19 +1378,27 @@
if (j < i)
{
font->driver->draw (s, j, i, x, y, 0);
+ if (s->face->overstrike)
+ font->driver->draw (s, j, i, x + 1, y, 0);
x += width;
}
xoff = LGLYPH_XOFF (glyph);
yoff = LGLYPH_YOFF (glyph);
wadjust = LGLYPH_WADJUST (glyph);
font->driver->draw (s, i, i + 1, x + xoff, y + yoff, 0);
+ if (s->face->overstrike)
+ font->driver->draw (s, i, i + 1, x + xoff + 1, y + yoff, 0);
x += wadjust;
j = i + 1;
width = 0;
}
}
if (j < i)
- font->driver->draw (s, j, i, x, y, 0);
+ {
+ font->driver->draw (s, j, i, x, y, 0);
+ if (s->face->overstrike)
+ font->driver->draw (s, j, i, x + 1, y, 0);
+ }
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r99310: Display buffer name, etc. in mode line by composing correctly.,
Kenichi Handa <=