aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGlenn Morris2011-05-12 00:07:06 -0700
committerGlenn Morris2011-05-12 00:07:06 -0700
commitd2fc7e3d0f6f57f962cbd94df3bf4fd15a37bb68 (patch)
treee6d877c35b4396bd5092a7be244b1527374d4a0e /src
parentd45885f7e0025fb5bd0756ba78c511a981d64533 (diff)
parente531bdfff1ee57a0ba4af6c8575ed7856e4c86d2 (diff)
downloademacs-d2fc7e3d0f6f57f962cbd94df3bf4fd15a37bb68.tar.gz
emacs-d2fc7e3d0f6f57f962cbd94df3bf4fd15a37bb68.zip
Merge from emacs-23; up to 2010-06-10T12:56:11Z!michael.albinus@gmx.de.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog16
-rw-r--r--src/textprop.c4
-rw-r--r--src/w32term.c52
-rw-r--r--src/xterm.c54
4 files changed, 98 insertions, 28 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index f7010859baa..d8895a91a55 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,19 @@
12011-05-12 Drew Adams <drew.adams@oracle.com>
2
3 * textprop.c (Fprevious_single_char_property_change): Doc fix (bug#8655).
4
52011-05-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
6
7 * w32term.c (w32_draw_fringe_bitmap): Rename local vars `left' and
8 `width' to `bar_area_x' and `bar_area_width', respectively.
9 (x_scroll_run): Take account of fringe background extension.
10
11 * xterm.c (x_draw_fringe_bitmap) [USE_TOOLKIT_SCROLL_BARS]: Rename
12 local vars `left' and `width' to `bar_area_x' and
13 `bar_area_width', respectively.
14 (x_scroll_run) [USE_TOOLKIT_SCROLL_BARS]: Take account of fringe
15 background extension.
16
12011-05-10 Juanma Barranquero <lekktu@gmail.com> 172011-05-10 Juanma Barranquero <lekktu@gmail.com>
2 18
3 * image.c (Finit_image_library): Return t for built-in image types, 19 * image.c (Finit_image_library): Return t for built-in image types,
diff --git a/src/textprop.c b/src/textprop.c
index aad090c5b41..566b2962a63 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -838,8 +838,8 @@ In a buffer, it runs to (point-min), and the value cannot be less than that.
838The property values are compared with `eq'. 838The property values are compared with `eq'.
839If the property is constant all the way to the start of OBJECT, return the 839If the property is constant all the way to the start of OBJECT, return the
840first valid position in OBJECT. 840first valid position in OBJECT.
841If the optional fourth argument LIMIT is non-nil, don't search 841If the optional fourth argument LIMIT is non-nil, don't search back past
842back past position LIMIT; return LIMIT if nothing is found before LIMIT. */) 842position LIMIT; return LIMIT if nothing is found before reaching LIMIT. */)
843 (Lisp_Object position, Lisp_Object prop, Lisp_Object object, Lisp_Object limit) 843 (Lisp_Object position, Lisp_Object prop, Lisp_Object object, Lisp_Object limit)
844{ 844{
845 if (STRINGP (object)) 845 if (STRINGP (object))
diff --git a/src/w32term.c b/src/w32term.c
index f6a6ba3e82f..d22aee6dc76 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -715,22 +715,22 @@ w32_draw_fringe_bitmap (struct window *w, struct glyph_row *row,
715 715
716 if (sb_width > 0) 716 if (sb_width > 0)
717 { 717 {
718 int left = WINDOW_SCROLL_BAR_AREA_X (w); 718 int bar_area_x = WINDOW_SCROLL_BAR_AREA_X (w);
719 int width = (WINDOW_CONFIG_SCROLL_BAR_COLS (w) 719 int bar_area_width = (WINDOW_CONFIG_SCROLL_BAR_COLS (w)
720 * FRAME_COLUMN_WIDTH (f)); 720 * FRAME_COLUMN_WIDTH (f));
721 721
722 if (bx < 0) 722 if (bx < 0)
723 { 723 {
724 /* Bitmap fills the fringe. */ 724 /* Bitmap fills the fringe. */
725 if (left + width == p->x) 725 if (bar_area_x + bar_area_width == p->x)
726 bx = left + sb_width; 726 bx = bar_area_x + sb_width;
727 else if (p->x + p->wd == left) 727 else if (p->x + p->wd == bar_area_x)
728 bx = left; 728 bx = bar_area_x;
729 if (bx >= 0) 729 if (bx >= 0)
730 { 730 {
731 int header_line_height = WINDOW_HEADER_LINE_HEIGHT (w); 731 int header_line_height = WINDOW_HEADER_LINE_HEIGHT (w);
732 732
733 nx = width - sb_width; 733 nx = bar_area_width - sb_width;
734 by = WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height, 734 by = WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height,
735 row->y)); 735 row->y));
736 ny = row->visible_height; 736 ny = row->visible_height;
@@ -738,13 +738,13 @@ w32_draw_fringe_bitmap (struct window *w, struct glyph_row *row,
738 } 738 }
739 else 739 else
740 { 740 {
741 if (left + width == bx) 741 if (bar_area_x + bar_area_width == bx)
742 { 742 {
743 bx = left + sb_width; 743 bx = bar_area_x + sb_width;
744 nx += width - sb_width; 744 nx += bar_area_width - sb_width;
745 } 745 }
746 else if (bx + nx == left) 746 else if (bx + nx == bar_area_x)
747 nx += width - sb_width; 747 nx += bar_area_width - sb_width;
748 } 748 }
749 } 749 }
750 } 750 }
@@ -2619,6 +2619,32 @@ x_scroll_run (struct window *w, struct run *run)
2619 fringes of W. */ 2619 fringes of W. */
2620 window_box (w, -1, &x, &y, &width, &height); 2620 window_box (w, -1, &x, &y, &width, &height);
2621 2621
2622 /* If the fringe is adjacent to the left (right) scroll bar of a
2623 leftmost (rightmost, respectively) window, then extend its
2624 background to the gap between the fringe and the bar. */
2625 if ((WINDOW_LEFTMOST_P (w)
2626 && WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w))
2627 || (WINDOW_RIGHTMOST_P (w)
2628 && WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w)))
2629 {
2630 int sb_width = WINDOW_CONFIG_SCROLL_BAR_WIDTH (w);
2631
2632 if (sb_width > 0)
2633 {
2634 int bar_area_x = WINDOW_SCROLL_BAR_AREA_X (w);
2635 int bar_area_width = (WINDOW_CONFIG_SCROLL_BAR_COLS (w)
2636 * FRAME_COLUMN_WIDTH (f));
2637
2638 if (bar_area_x + bar_area_width == x)
2639 {
2640 x = bar_area_x + sb_width;
2641 width += bar_area_width - sb_width;
2642 }
2643 else if (x + width == bar_area_x)
2644 width += bar_area_width - sb_width;
2645 }
2646 }
2647
2622 from_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->current_y); 2648 from_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->current_y);
2623 to_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->desired_y); 2649 to_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->desired_y);
2624 bottom_y = y + height; 2650 bottom_y = y + height;
diff --git a/src/xterm.c b/src/xterm.c
index 20259b7ab2e..2352f51cfb7 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -753,22 +753,22 @@ x_draw_fringe_bitmap (struct window *w, struct glyph_row *row, struct draw_fring
753 753
754 if (sb_width > 0) 754 if (sb_width > 0)
755 { 755 {
756 int left = WINDOW_SCROLL_BAR_AREA_X (w); 756 int bar_area_x = WINDOW_SCROLL_BAR_AREA_X (w);
757 int width = (WINDOW_CONFIG_SCROLL_BAR_COLS (w) 757 int bar_area_width = (WINDOW_CONFIG_SCROLL_BAR_COLS (w)
758 * FRAME_COLUMN_WIDTH (f)); 758 * FRAME_COLUMN_WIDTH (f));
759 759
760 if (bx < 0) 760 if (bx < 0)
761 { 761 {
762 /* Bitmap fills the fringe. */ 762 /* Bitmap fills the fringe. */
763 if (left + width == p->x) 763 if (bar_area_x + bar_area_width == p->x)
764 bx = left + sb_width; 764 bx = bar_area_x + sb_width;
765 else if (p->x + p->wd == left) 765 else if (p->x + p->wd == bar_area_x)
766 bx = left; 766 bx = bar_area_x;
767 if (bx >= 0) 767 if (bx >= 0)
768 { 768 {
769 int header_line_height = WINDOW_HEADER_LINE_HEIGHT (w); 769 int header_line_height = WINDOW_HEADER_LINE_HEIGHT (w);
770 770
771 nx = width - sb_width; 771 nx = bar_area_width - sb_width;
772 by = WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height, 772 by = WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height,
773 row->y)); 773 row->y));
774 ny = row->visible_height; 774 ny = row->visible_height;
@@ -776,13 +776,13 @@ x_draw_fringe_bitmap (struct window *w, struct glyph_row *row, struct draw_fring
776 } 776 }
777 else 777 else
778 { 778 {
779 if (left + width == bx) 779 if (bar_area_x + bar_area_width == bx)
780 { 780 {
781 bx = left + sb_width; 781 bx = bar_area_x + sb_width;
782 nx += width - sb_width; 782 nx += bar_area_width - sb_width;
783 } 783 }
784 else if (bx + nx == left) 784 else if (bx + nx == bar_area_x)
785 nx += width - sb_width; 785 nx += bar_area_width - sb_width;
786 } 786 }
787 } 787 }
788 } 788 }
@@ -3232,6 +3232,34 @@ x_scroll_run (struct window *w, struct run *run)
3232 fringe of W. */ 3232 fringe of W. */
3233 window_box (w, -1, &x, &y, &width, &height); 3233 window_box (w, -1, &x, &y, &width, &height);
3234 3234
3235#ifdef USE_TOOLKIT_SCROLL_BARS
3236 /* If the fringe is adjacent to the left (right) scroll bar of a
3237 leftmost (rightmost, respectively) window, then extend its
3238 background to the gap between the fringe and the bar. */
3239 if ((WINDOW_LEFTMOST_P (w)
3240 && WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w))
3241 || (WINDOW_RIGHTMOST_P (w)
3242 && WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w)))
3243 {
3244 int sb_width = WINDOW_CONFIG_SCROLL_BAR_WIDTH (w);
3245
3246 if (sb_width > 0)
3247 {
3248 int bar_area_x = WINDOW_SCROLL_BAR_AREA_X (w);
3249 int bar_area_width = (WINDOW_CONFIG_SCROLL_BAR_COLS (w)
3250 * FRAME_COLUMN_WIDTH (f));
3251
3252 if (bar_area_x + bar_area_width == x)
3253 {
3254 x = bar_area_x + sb_width;
3255 width += bar_area_width - sb_width;
3256 }
3257 else if (x + width == bar_area_x)
3258 width += bar_area_width - sb_width;
3259 }
3260 }
3261#endif
3262
3235 from_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->current_y); 3263 from_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->current_y);
3236 to_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->desired_y); 3264 to_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->desired_y);
3237 bottom_y = y + height; 3265 bottom_y = y + height;