[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/src ChangeLog dispextern.h font.c fontset...
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] emacs/src ChangeLog dispextern.h font.c fontset... |
Date: |
Thu, 30 Apr 2009 05:02:08 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Chong Yidong <cyd> 09/04/30 05:02:07
Modified files:
src : ChangeLog dispextern.h font.c fontset.c msdos.c
term.c xdisp.c xfaces.c
Log message:
* xfaces.c (face_at_buffer_position): New arg base_face_id.
* xdisp.c (handle_face_prop): Pass base_face_id of iterator to
face_at_buffer_position.
(face_before_or_after_it_pos, get_next_display_element)
(note_mouse_highlight): Update face_at_buffer_position call.
* term.c (term_mouse_highlight):
* msdos.c (IT_note_mouse_highlight):
* fontset.c (Finternal_char_font):
* font.c (font_at, font_range): Update face_at_buffer_position
call.
* dispextern.h (face_at_buffer_position): Update prototype.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/ChangeLog?cvsroot=emacs&r1=1.7521&r2=1.7522
http://cvs.savannah.gnu.org/viewcvs/emacs/src/dispextern.h?cvsroot=emacs&r1=1.265&r2=1.266
http://cvs.savannah.gnu.org/viewcvs/emacs/src/font.c?cvsroot=emacs&r1=1.127&r2=1.128
http://cvs.savannah.gnu.org/viewcvs/emacs/src/fontset.c?cvsroot=emacs&r1=1.169&r2=1.170
http://cvs.savannah.gnu.org/viewcvs/emacs/src/msdos.c?cvsroot=emacs&r1=1.231&r2=1.232
http://cvs.savannah.gnu.org/viewcvs/emacs/src/term.c?cvsroot=emacs&r1=1.241&r2=1.242
http://cvs.savannah.gnu.org/viewcvs/emacs/src/xdisp.c?cvsroot=emacs&r1=1.1280&r2=1.1281
http://cvs.savannah.gnu.org/viewcvs/emacs/src/xfaces.c?cvsroot=emacs&r1=1.433&r2=1.434
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/src/ChangeLog,v
retrieving revision 1.7521
retrieving revision 1.7522
diff -u -b -r1.7521 -r1.7522
--- ChangeLog 30 Apr 2009 04:53:57 -0000 1.7521
+++ ChangeLog 30 Apr 2009 05:01:57 -0000 1.7522
@@ -1,3 +1,20 @@
+2009-04-30 Chong Yidong <address@hidden>
+
+ * xfaces.c (face_at_buffer_position): New arg base_face_id.
+
+ * xdisp.c (handle_face_prop): Pass base_face_id of iterator to
+ face_at_buffer_position.
+ (face_before_or_after_it_pos, get_next_display_element)
+ (note_mouse_highlight): Update face_at_buffer_position call.
+
+ * term.c (term_mouse_highlight):
+ * msdos.c (IT_note_mouse_highlight):
+ * fontset.c (Finternal_char_font):
+ * font.c (font_at, font_range): Update face_at_buffer_position
+ call.
+
+ * dispextern.h (face_at_buffer_position): Update prototype.
+
2009-04-30 Kenichi Handa <address@hidden>
* fontset.c (fontset_find_font): Check if rfont_def is Qnil or
Index: dispextern.h
===================================================================
RCS file: /sources/emacs/emacs/src/dispextern.h,v
retrieving revision 1.265
retrieving revision 1.266
diff -u -b -r1.265 -r1.266
--- dispextern.h 14 Feb 2009 17:28:27 -0000 1.265
+++ dispextern.h 30 Apr 2009 05:02:00 -0000 1.266
@@ -2923,7 +2923,7 @@
int face_at_buffer_position P_ ((struct window *w, EMACS_INT pos,
EMACS_INT region_beg, EMACS_INT region_end,
EMACS_INT *endptr, EMACS_INT limit,
- int mouse));
+ int mouse, int base_face_id));
int face_for_overlay_string P_ ((struct window *w, EMACS_INT pos,
EMACS_INT region_beg, EMACS_INT region_end,
EMACS_INT *endptr, EMACS_INT limit,
Index: font.c
===================================================================
RCS file: /sources/emacs/emacs/src/font.c,v
retrieving revision 1.127
retrieving revision 1.128
diff -u -b -r1.127 -r1.128
--- font.c 21 Apr 2009 07:29:48 -0000 1.127
+++ font.c 30 Apr 2009 05:02:02 -0000 1.128
@@ -3780,7 +3780,7 @@
DEFAULT_FACE_ID, 0);
else
face_id = face_at_buffer_position (w, pos, -1, -1, &endptr,
- pos + 100, 0);
+ pos + 100, 0, -1);
face = FACE_FROM_ID (f, face_id);
}
if (multibyte)
@@ -3827,7 +3827,8 @@
{
int face_id;
- face_id = face_at_buffer_position (w, pos, 0, 0, &ignore, *limit, 0);
+ face_id = face_at_buffer_position (w, pos, 0, 0, &ignore,
+ *limit, 0, -1);
face = FACE_FROM_ID (XFRAME (w->frame), face_id);
}
}
Index: fontset.c
===================================================================
RCS file: /sources/emacs/emacs/src/fontset.c,v
retrieving revision 1.169
retrieving revision 1.170
diff -u -b -r1.169 -r1.170
--- fontset.c 30 Apr 2009 04:41:39 -0000 1.169
+++ fontset.c 30 Apr 2009 05:02:02 -0000 1.170
@@ -1876,7 +1876,8 @@
return Qnil;
w = XWINDOW (window);
f = XFRAME (w->frame);
- face_id = face_at_buffer_position (w, pos, -1, -1, &dummy, pos + 100, 0);
+ face_id = face_at_buffer_position (w, pos, -1, -1, &dummy,
+ pos + 100, 0, -1);
charset = Fget_char_property (position, Qcharset, Qnil);
if (CHARSETP (charset))
cs_id = XINT (CHARSET_SYMBOL_ID (charset));
Index: msdos.c
===================================================================
RCS file: /sources/emacs/emacs/src/msdos.c,v
retrieving revision 1.231
retrieving revision 1.232
diff -u -b -r1.231 -r1.232
--- msdos.c 14 Feb 2009 10:49:42 -0000 1.231
+++ msdos.c 30 Apr 2009 05:02:03 -0000 1.232
@@ -1524,7 +1524,8 @@
dpyinfo->mouse_face_face_id
= face_at_buffer_position (w, pos, 0, 0,
&ignore, pos + 1,
- !dpyinfo->mouse_face_hidden);
+ !dpyinfo->mouse_face_hidden,
+ -1);
/* Display it as active. */
show_mouse_face (dpyinfo, 1);
@@ -1559,7 +1560,8 @@
dpyinfo->mouse_face_face_id
= face_at_buffer_position (w, pos, 0, 0,
&ignore, pos + 1,
- !dpyinfo->mouse_face_hidden);
+ !dpyinfo->mouse_face_hidden,
+ -1);
/* Display it as active. */
show_mouse_face (dpyinfo, 1);
Index: term.c
===================================================================
RCS file: /sources/emacs/emacs/src/term.c,v
retrieving revision 1.241
retrieving revision 1.242
diff -u -b -r1.241 -r1.242
--- term.c 22 Apr 2009 03:51:26 -0000 1.241
+++ term.c 30 Apr 2009 05:02:03 -0000 1.242
@@ -2851,7 +2851,7 @@
mouse_face_face_id
= face_at_buffer_position (w, pos, 0, 0,
- &ignore, pos + 1, 1);
+ &ignore, pos + 1, 1, -1);
/* Display it as active. */
term_show_mouse_face (DRAW_MOUSE_FACE);
@@ -2886,7 +2886,7 @@
mouse_face_face_id
= face_at_buffer_position (w, pos, 0, 0,
- &ignore, pos + 1, 1);
+ &ignore, pos + 1, 1, -1);
/* Display it as active. */
term_show_mouse_face (DRAW_MOUSE_FACE);
Index: xdisp.c
===================================================================
RCS file: /sources/emacs/emacs/src/xdisp.c,v
retrieving revision 1.1280
retrieving revision 1.1281
diff -u -b -r1.1280 -r1.1281
--- xdisp.c 14 Apr 2009 02:28:45 -0000 1.1280
+++ xdisp.c 30 Apr 2009 05:02:04 -0000 1.1281
@@ -3452,7 +3452,7 @@
&next_stop,
(IT_CHARPOS (*it)
+ TEXT_PROP_DISTANCE_LIMIT),
- 0);
+ 0, it->base_face_id);
/* Is this a start of a run of characters with box face?
Caveat: this can be called for a freshly initialized
@@ -3693,7 +3693,7 @@
it->region_beg_charpos,
it->region_end_charpos,
&next_check_charpos,
- limit, 0);
+ limit, 0, -1);
/* Correct the face for charsets different from ASCII. Do it
for the multibyte case only. The face returned above is
@@ -5992,7 +5992,8 @@
next_face_id = face_at_buffer_position
(it->w, CHARPOS (pos), it->region_beg_charpos,
it->region_end_charpos, &ignore,
- (IT_CHARPOS (*it) + TEXT_PROP_DISTANCE_LIMIT), 0);
+ (IT_CHARPOS (*it) + TEXT_PROP_DISTANCE_LIMIT), 0,
+ -1);
it->end_of_box_run_p
= (FACE_FROM_ID (it->f, next_face_id)->box
== FACE_NO_BOX);
@@ -23898,7 +23899,8 @@
dpyinfo->mouse_face_face_id
= face_at_buffer_position (w, pos, 0, 0,
&ignore, pos + 1,
- !dpyinfo->mouse_face_hidden);
+ !dpyinfo->mouse_face_hidden,
+ -1);
/* Display it as active. */
show_mouse_face (dpyinfo, DRAW_MOUSE_FACE);
@@ -23941,7 +23943,8 @@
dpyinfo->mouse_face_face_id
= face_at_buffer_position (w, pos, 0, 0,
&ignore, pos + 1,
- !dpyinfo->mouse_face_hidden);
+ !dpyinfo->mouse_face_hidden,
+ -1);
/* Display it as active. */
show_mouse_face (dpyinfo, DRAW_MOUSE_FACE);
@@ -24022,7 +24025,8 @@
dpyinfo->mouse_face_face_id
= face_at_buffer_position (w, pos, 0, 0,
&ignore, pos + 1,
- !dpyinfo->mouse_face_hidden);
+ !dpyinfo->mouse_face_hidden,
+ -1);
/* Display it as active. */
show_mouse_face (dpyinfo, DRAW_MOUSE_FACE);
Index: xfaces.c
===================================================================
RCS file: /sources/emacs/emacs/src/xfaces.c,v
retrieving revision 1.433
retrieving revision 1.434
diff -u -b -r1.433 -r1.434
--- xfaces.c 23 Apr 2009 01:33:33 -0000 1.433
+++ xfaces.c 30 Apr 2009 05:02:06 -0000 1.434
@@ -6251,17 +6251,21 @@
If MOUSE is non-zero, use the character's mouse-face, not its face.
+ BASE_FACE_ID, if non-negative, specifies a base face id to use
+ instead of DEFAULT_FACE_ID.
+
The face returned is suitable for displaying ASCII characters. */
int
face_at_buffer_position (w, pos, region_beg, region_end,
- endptr, limit, mouse)
+ endptr, limit, mouse, base_face_id)
struct window *w;
EMACS_INT pos;
EMACS_INT region_beg, region_end;
EMACS_INT *endptr;
EMACS_INT limit;
int mouse;
+ int base_face_id;
{
struct frame *f = XFRAME (w->frame);
Lisp_Object attrs[LFACE_VECTOR_SIZE];
@@ -6304,12 +6308,9 @@
*endptr = endpos;
-
- /* Perhaps remap BASE_FACE_ID to a user-specified alternative. */
- if (NILP (Vface_remapping_alist))
- default_face = FACE_FROM_ID (f, DEFAULT_FACE_ID);
- else
- default_face = FACE_FROM_ID (f, lookup_basic_face (f, DEFAULT_FACE_ID));
+ default_face = FACE_FROM_ID (f, base_face_id >= 0 ? base_face_id
+ : NILP (Vface_remapping_alist) ? DEFAULT_FACE_ID
+ : lookup_basic_face (f, DEFAULT_FACE_ID));
/* Optimize common cases where we can use the default face. */
if (noverlays == 0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs/src ChangeLog dispextern.h font.c fontset...,
Chong Yidong <=