diff options
| author | Miles Bader | 2007-08-03 05:20:51 +0000 |
|---|---|---|
| committer | Miles Bader | 2007-08-03 05:20:51 +0000 |
| commit | e145a7fe95fb8f97407d125f94653ef95e42696d (patch) | |
| tree | 4f83705aac9d1a4416dabcf774115f7cccb80bda /src | |
| parent | 2a4924ce174b1a2b032558f3036f1d95445c4936 (diff) | |
| parent | 2f12b713116a4e15b4744fc78d5f0dbb57fcd1ca (diff) | |
| download | emacs-e145a7fe95fb8f97407d125f94653ef95e42696d.tar.gz emacs-e145a7fe95fb8f97407d125f94653ef95e42696d.zip | |
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 832-838)
- Remove lisp/erc/erc-nicklist.el
- Update some .arch-inventory files
- Fix void function definition error in cus-edit.el
- Update from CVS
- Restore lisp/emacs-lisp/cl-loaddefs.el
- Merge from emacs--rel--22
* emacs--rel--22 (patch 75-83)
- Update from CVS
- Remove lisp/erc/erc-nicklist.el
- Update some .arch-inventory files
- Indicate that emacs--devo--0--patch-834 does not need to be applied
- Merge from gnus--rel--5.10
- Restore lisp/emacs-lisp/cl-loaddefs.el
* gnus--rel--5.10 (patch 239-241)
- Merge from emacs--devo--0
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-239
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 42 | ||||
| -rw-r--r-- | src/buffer.c | 4 | ||||
| -rw-r--r-- | src/gmalloc.c | 9 | ||||
| -rw-r--r-- | src/lread.c | 8 | ||||
| -rw-r--r-- | src/puresize.h | 2 | ||||
| -rw-r--r-- | src/w32term.c | 96 | ||||
| -rw-r--r-- | src/w32term.h | 8 | ||||
| -rw-r--r-- | src/xdisp.c | 2 | ||||
| -rw-r--r-- | src/xterm.c | 108 | ||||
| -rw-r--r-- | src/xterm.h | 6 |
10 files changed, 240 insertions, 45 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index d8668be9400..8c6d978a09f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,45 @@ | |||
| 1 | 2007-07-30 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 2 | |||
| 3 | * puresize.h (BASE_PURESIZE): Increase to 1130000. | ||
| 4 | |||
| 5 | 2007-07-30 Richard Stallman <rms@gnu.org> | ||
| 6 | |||
| 7 | * lread.c (readevalloop, read1): Treat NBSP as whitespace. | ||
| 8 | |||
| 9 | 2007-07-29 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 10 | |||
| 11 | * gmalloc.c (__malloc_initialize): Remove pthread_once. Not needed. | ||
| 12 | |||
| 13 | 2007-07-28 Nick Roberts <nickrob@snap.net.nz> | ||
| 14 | |||
| 15 | * xdisp.c (decode_mode_spec): Use '@' instead of 'R' to test for | ||
| 16 | remote default-directory. | ||
| 17 | |||
| 18 | * buffer.c (mode-line-format): Update doc string. | ||
| 19 | |||
| 20 | 2007-07-27 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 21 | |||
| 22 | * w32term.c (w32_draw_fringe_bitmap): Extend fringe background to | ||
| 23 | scroll bar gap. | ||
| 24 | (x_scroll_bar_create): Set bar->fringe_extended_p. | ||
| 25 | (w32_set_vertical_scroll_bar): Put leftmost/rightmost scroll bars | ||
| 26 | on frame edge. Check fringe background extension. Don't clear | ||
| 27 | extended fringe background area. | ||
| 28 | |||
| 29 | * w32term.h (struct scroll_bar): New member fringe_extended_p. | ||
| 30 | (w32_fill_area): Enclose multiple statements with do ... while (0). | ||
| 31 | |||
| 32 | * xterm.c (x_draw_fringe_bitmap) [USE_TOOLKIT_SCROLL_BARS]: | ||
| 33 | Extend fringe background to scroll bar gap. | ||
| 34 | (x_scroll_bar_create) [USE_TOOLKIT_SCROLL_BARS]: | ||
| 35 | Set bar->fringe_extended_p. | ||
| 36 | (XTset_vertical_scroll_bar) [USE_TOOLKIT_SCROLL_BARS]: | ||
| 37 | Put leftmost/rightmost scroll bars on frame edge. Check fringe | ||
| 38 | background extension. Don't clear extended fringe background area. | ||
| 39 | |||
| 40 | * xterm.h (struct scroll_bar) [USE_TOOLKIT_SCROLL_BARS]: | ||
| 41 | New member fringe_extended_p. | ||
| 42 | |||
| 1 | 2007-07-25 Glenn Morris <rgm@gnu.org> | 43 | 2007-07-25 Glenn Morris <rgm@gnu.org> |
| 2 | 44 | ||
| 3 | * Relicense all FSF files to GPLv3 or later. | 45 | * Relicense all FSF files to GPLv3 or later. |
diff --git a/src/buffer.c b/src/buffer.c index 0f38851e9eb..3a2b9460c17 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -5517,12 +5517,12 @@ A string is printed verbatim in the mode line except for %-constructs: | |||
| 5517 | %P -- print percent of buffer above bottom of window, perhaps plus Top, | 5517 | %P -- print percent of buffer above bottom of window, perhaps plus Top, |
| 5518 | or print Bottom or All. | 5518 | or print Bottom or All. |
| 5519 | %n -- print Narrow if appropriate. | 5519 | %n -- print Narrow if appropriate. |
| 5520 | %R -- print R or hyphen. R means that default-directory is on a | ||
| 5521 | remote machine. | ||
| 5522 | %t -- visited file is text or binary (if OS supports this distinction). | 5520 | %t -- visited file is text or binary (if OS supports this distinction). |
| 5523 | %z -- print mnemonics of keyboard, terminal, and buffer coding systems. | 5521 | %z -- print mnemonics of keyboard, terminal, and buffer coding systems. |
| 5524 | %Z -- like %z, but including the end-of-line format. | 5522 | %Z -- like %z, but including the end-of-line format. |
| 5525 | %e -- print error message about full memory. | 5523 | %e -- print error message about full memory. |
| 5524 | %@ -- print @ or hyphen. @ means that default-directory is on a | ||
| 5525 | remote machine. | ||
| 5526 | %[ -- print one [ for each recursive editing level. %] similar. | 5526 | %[ -- print one [ for each recursive editing level. %] similar. |
| 5527 | %% -- print %. %- -- print infinitely many dashes. | 5527 | %% -- print %. %- -- print infinitely many dashes. |
| 5528 | Decimal digits after the % specify field width to which to pad. */); | 5528 | Decimal digits after the % specify field width to which to pad. */); |
diff --git a/src/gmalloc.c b/src/gmalloc.c index fcd9f655321..cf79b9159f2 100644 --- a/src/gmalloc.c +++ b/src/gmalloc.c | |||
| @@ -561,7 +561,6 @@ register_heapinfo () | |||
| 561 | } | 561 | } |
| 562 | 562 | ||
| 563 | #ifdef USE_PTHREAD | 563 | #ifdef USE_PTHREAD |
| 564 | static pthread_once_t malloc_init_once_control = PTHREAD_ONCE_INIT; | ||
| 565 | pthread_mutex_t _malloc_mutex = PTHREAD_MUTEX_INITIALIZER; | 564 | pthread_mutex_t _malloc_mutex = PTHREAD_MUTEX_INITIALIZER; |
| 566 | pthread_mutex_t _aligned_blocks_mutex = PTHREAD_MUTEX_INITIALIZER; | 565 | pthread_mutex_t _aligned_blocks_mutex = PTHREAD_MUTEX_INITIALIZER; |
| 567 | #endif | 566 | #endif |
| @@ -607,18 +606,16 @@ malloc_initialize_1 () | |||
| 607 | return; | 606 | return; |
| 608 | } | 607 | } |
| 609 | 608 | ||
| 610 | /* Set everything up and remember that we have. */ | 609 | /* Set everything up and remember that we have. |
| 610 | main will call malloc which calls this function. That is before any threads | ||
| 611 | or signal handlers has been set up, so we don't need thread protection. */ | ||
| 611 | int | 612 | int |
| 612 | __malloc_initialize () | 613 | __malloc_initialize () |
| 613 | { | 614 | { |
| 614 | #ifdef USE_PTHREAD | ||
| 615 | pthread_once (&malloc_init_once_control, malloc_initialize_1); | ||
| 616 | #else | ||
| 617 | if (__malloc_initialized) | 615 | if (__malloc_initialized) |
| 618 | return 0; | 616 | return 0; |
| 619 | 617 | ||
| 620 | malloc_initialize_1 (); | 618 | malloc_initialize_1 (); |
| 621 | #endif | ||
| 622 | 619 | ||
| 623 | return __malloc_initialized; | 620 | return __malloc_initialized; |
| 624 | } | 621 | } |
diff --git a/src/lread.c b/src/lread.c index c74b45fbd5d..6ca7121b363 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -1697,7 +1697,8 @@ readevalloop (readcharfun, stream, sourcename, evalfun, | |||
| 1697 | } | 1697 | } |
| 1698 | 1698 | ||
| 1699 | /* Ignore whitespace here, so we can detect eof. */ | 1699 | /* Ignore whitespace here, so we can detect eof. */ |
| 1700 | if (c == ' ' || c == '\t' || c == '\n' || c == '\f' || c == '\r') | 1700 | if (c == ' ' || c == '\t' || c == '\n' || c == '\f' || c == '\r' |
| 1701 | || c == 0x8a0) /* NBSP */ | ||
| 1701 | goto read_next; | 1702 | goto read_next; |
| 1702 | 1703 | ||
| 1703 | if (!NILP (Vpurify_flag) && c == '(') | 1704 | if (!NILP (Vpurify_flag) && c == '(') |
| @@ -2808,7 +2809,9 @@ read1 (readcharfun, pch, first_in_list) | |||
| 2808 | } | 2809 | } |
| 2809 | default: | 2810 | default: |
| 2810 | default_label: | 2811 | default_label: |
| 2811 | if (c <= 040) goto retry; | 2812 | if (c <= 040) goto retry; |
| 2813 | if (c == 0x8a0) /* NBSP */ | ||
| 2814 | goto retry; | ||
| 2812 | { | 2815 | { |
| 2813 | char *p = read_buffer; | 2816 | char *p = read_buffer; |
| 2814 | int quoted = 0; | 2817 | int quoted = 0; |
| @@ -2817,6 +2820,7 @@ read1 (readcharfun, pch, first_in_list) | |||
| 2817 | char *end = read_buffer + read_buffer_size; | 2820 | char *end = read_buffer + read_buffer_size; |
| 2818 | 2821 | ||
| 2819 | while (c > 040 | 2822 | while (c > 040 |
| 2823 | && c != 0x8a0 /* NBSP */ | ||
| 2820 | && (c >= 0200 | 2824 | && (c >= 0200 |
| 2821 | || (!index ("\"';()[]#", c) | 2825 | || (!index ("\"';()[]#", c) |
| 2822 | && !(!first_in_list && c == '`') | 2826 | && !(!first_in_list && c == '`') |
diff --git a/src/puresize.h b/src/puresize.h index 49cb9b1b387..c6456730075 100644 --- a/src/puresize.h +++ b/src/puresize.h | |||
| @@ -43,7 +43,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 43 | #endif | 43 | #endif |
| 44 | 44 | ||
| 45 | #ifndef BASE_PURESIZE | 45 | #ifndef BASE_PURESIZE |
| 46 | #define BASE_PURESIZE (1120000 + SYSTEM_PURESIZE_EXTRA + SITELOAD_PURESIZE_EXTRA) | 46 | #define BASE_PURESIZE (1130000 + SYSTEM_PURESIZE_EXTRA + SITELOAD_PURESIZE_EXTRA) |
| 47 | #endif | 47 | #endif |
| 48 | 48 | ||
| 49 | /* Increase BASE_PURESIZE by a ratio depending on the machine's word size. */ | 49 | /* Increase BASE_PURESIZE by a ratio depending on the machine's word size. */ |
diff --git a/src/w32term.c b/src/w32term.c index 78fcb35f6c4..ddb98070b87 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -713,6 +713,60 @@ w32_draw_fringe_bitmap (w, row, p) | |||
| 713 | 713 | ||
| 714 | hdc = get_frame_dc (f); | 714 | hdc = get_frame_dc (f); |
| 715 | 715 | ||
| 716 | if (!p->overlay_p) | ||
| 717 | { | ||
| 718 | int bx = p->bx, by = p->by, nx = p->nx, ny = p->ny; | ||
| 719 | |||
| 720 | /* If the fringe is adjacent to the left (right) scroll bar of a | ||
| 721 | leftmost (rightmost, respectively) window, then extend its | ||
| 722 | background to the gap between the fringe and the bar. */ | ||
| 723 | if ((WINDOW_LEFTMOST_P (w) | ||
| 724 | && WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w)) | ||
| 725 | || (WINDOW_RIGHTMOST_P (w) | ||
| 726 | && WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w))) | ||
| 727 | { | ||
| 728 | int sb_width = WINDOW_CONFIG_SCROLL_BAR_WIDTH (w); | ||
| 729 | |||
| 730 | if (sb_width > 0) | ||
| 731 | { | ||
| 732 | int left = WINDOW_SCROLL_BAR_AREA_X (w); | ||
| 733 | int width = (WINDOW_CONFIG_SCROLL_BAR_COLS (w) | ||
| 734 | * FRAME_COLUMN_WIDTH (f)); | ||
| 735 | |||
| 736 | if (bx < 0) | ||
| 737 | { | ||
| 738 | /* Bitmap fills the fringe. */ | ||
| 739 | if (left + width == p->x) | ||
| 740 | bx = left + sb_width; | ||
| 741 | else if (p->x + p->wd == left) | ||
| 742 | bx = left; | ||
| 743 | if (bx >= 0) | ||
| 744 | { | ||
| 745 | int header_line_height = WINDOW_HEADER_LINE_HEIGHT (w); | ||
| 746 | |||
| 747 | nx = width - sb_width; | ||
| 748 | by = WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height, | ||
| 749 | row->y)); | ||
| 750 | ny = row->visible_height; | ||
| 751 | } | ||
| 752 | } | ||
| 753 | else | ||
| 754 | { | ||
| 755 | if (left + width == bx) | ||
| 756 | { | ||
| 757 | bx = left + sb_width; | ||
| 758 | nx += width - sb_width; | ||
| 759 | } | ||
| 760 | else if (bx + nx == left) | ||
| 761 | nx += width - sb_width; | ||
| 762 | } | ||
| 763 | } | ||
| 764 | } | ||
| 765 | |||
| 766 | if (bx >= 0 && nx > 0) | ||
| 767 | w32_fill_area (f, hdc, face->background, bx, by, nx, ny); | ||
| 768 | } | ||
| 769 | |||
| 716 | /* Must clip because of partially visible lines. */ | 770 | /* Must clip because of partially visible lines. */ |
| 717 | rowY = WINDOW_TO_FRAME_PIXEL_Y (w, row->y); | 771 | rowY = WINDOW_TO_FRAME_PIXEL_Y (w, row->y); |
| 718 | if (p->y < rowY) | 772 | if (p->y < rowY) |
| @@ -730,12 +784,6 @@ w32_draw_fringe_bitmap (w, row, p) | |||
| 730 | else | 784 | else |
| 731 | w32_clip_to_row (w, row, -1, hdc); | 785 | w32_clip_to_row (w, row, -1, hdc); |
| 732 | 786 | ||
| 733 | if (p->bx >= 0 && !p->overlay_p) | ||
| 734 | { | ||
| 735 | w32_fill_area (f, hdc, face->background, | ||
| 736 | p->bx, p->by, p->nx, p->ny); | ||
| 737 | } | ||
| 738 | |||
| 739 | if (p->which && p->which < max_fringe_bmp) | 787 | if (p->which && p->which < max_fringe_bmp) |
| 740 | { | 788 | { |
| 741 | HBITMAP pixmap = fringe_bmp[p->which]; | 789 | HBITMAP pixmap = fringe_bmp[p->which]; |
| @@ -4072,6 +4120,7 @@ x_scroll_bar_create (w, top, left, width, height) | |||
| 4072 | XSETINT (bar->start, 0); | 4120 | XSETINT (bar->start, 0); |
| 4073 | XSETINT (bar->end, 0); | 4121 | XSETINT (bar->end, 0); |
| 4074 | bar->dragging = Qnil; | 4122 | bar->dragging = Qnil; |
| 4123 | bar->fringe_extended_p = Qnil; | ||
| 4075 | 4124 | ||
| 4076 | /* Requires geometry to be set before call to create the real window */ | 4125 | /* Requires geometry to be set before call to create the real window */ |
| 4077 | 4126 | ||
| @@ -4135,6 +4184,7 @@ w32_set_vertical_scroll_bar (w, portion, whole, position) | |||
| 4135 | struct scroll_bar *bar; | 4184 | struct scroll_bar *bar; |
| 4136 | int top, height, left, sb_left, width, sb_width; | 4185 | int top, height, left, sb_left, width, sb_width; |
| 4137 | int window_y, window_height; | 4186 | int window_y, window_height; |
| 4187 | int fringe_extended_p; | ||
| 4138 | 4188 | ||
| 4139 | /* Get window dimensions. */ | 4189 | /* Get window dimensions. */ |
| 4140 | window_box (w, -1, 0, &window_y, 0, &window_height); | 4190 | window_box (w, -1, 0, &window_y, 0, &window_height); |
| @@ -4154,9 +4204,20 @@ w32_set_vertical_scroll_bar (w, portion, whole, position) | |||
| 4154 | 4204 | ||
| 4155 | /* Compute the left edge of the scroll bar. */ | 4205 | /* Compute the left edge of the scroll bar. */ |
| 4156 | if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w)) | 4206 | if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w)) |
| 4157 | sb_left = left + width - sb_width - (width - sb_width) / 2; | 4207 | sb_left = left + (WINDOW_RIGHTMOST_P (w) ? width - sb_width : 0); |
| 4208 | else | ||
| 4209 | sb_left = left + (WINDOW_LEFTMOST_P (w) ? 0 : width - sb_width); | ||
| 4210 | |||
| 4211 | if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w)) | ||
| 4212 | fringe_extended_p = (WINDOW_LEFTMOST_P (w) | ||
| 4213 | && WINDOW_LEFT_FRINGE_WIDTH (w) | ||
| 4214 | && (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w) | ||
| 4215 | || WINDOW_LEFT_MARGIN_COLS (w) == 0)); | ||
| 4158 | else | 4216 | else |
| 4159 | sb_left = left + (width - sb_width) / 2; | 4217 | fringe_extended_p = (WINDOW_RIGHTMOST_P (w) |
| 4218 | && WINDOW_RIGHT_FRINGE_WIDTH (w) | ||
| 4219 | && (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w) | ||
| 4220 | || WINDOW_RIGHT_MARGIN_COLS (w) == 0)); | ||
| 4160 | 4221 | ||
| 4161 | /* Does the scroll bar exist yet? */ | 4222 | /* Does the scroll bar exist yet? */ |
| 4162 | if (NILP (w->vertical_scroll_bar)) | 4223 | if (NILP (w->vertical_scroll_bar)) |
| @@ -4166,7 +4227,10 @@ w32_set_vertical_scroll_bar (w, portion, whole, position) | |||
| 4166 | if (width > 0 && height > 0) | 4227 | if (width > 0 && height > 0) |
| 4167 | { | 4228 | { |
| 4168 | hdc = get_frame_dc (f); | 4229 | hdc = get_frame_dc (f); |
| 4169 | w32_clear_area (f, hdc, left, top, width, height); | 4230 | if (fringe_extended_p) |
| 4231 | w32_clear_area (f, hdc, sb_left, top, sb_width, height); | ||
| 4232 | else | ||
| 4233 | w32_clear_area (f, hdc, left, top, width, height); | ||
| 4170 | release_frame_dc (f, hdc); | 4234 | release_frame_dc (f, hdc); |
| 4171 | } | 4235 | } |
| 4172 | UNBLOCK_INPUT; | 4236 | UNBLOCK_INPUT; |
| @@ -4185,7 +4249,8 @@ w32_set_vertical_scroll_bar (w, portion, whole, position) | |||
| 4185 | if ( XINT (bar->left) == sb_left | 4249 | if ( XINT (bar->left) == sb_left |
| 4186 | && XINT (bar->top) == top | 4250 | && XINT (bar->top) == top |
| 4187 | && XINT (bar->width) == sb_width | 4251 | && XINT (bar->width) == sb_width |
| 4188 | && XINT (bar->height) == height ) | 4252 | && XINT (bar->height) == height |
| 4253 | && !NILP (bar->fringe_extended_p) == fringe_extended_p ) | ||
| 4189 | { | 4254 | { |
| 4190 | /* Redraw after clear_frame. */ | 4255 | /* Redraw after clear_frame. */ |
| 4191 | if (!my_show_window (f, hwnd, SW_NORMAL)) | 4256 | if (!my_show_window (f, hwnd, SW_NORMAL)) |
| @@ -4202,11 +4267,10 @@ w32_set_vertical_scroll_bar (w, portion, whole, position) | |||
| 4202 | hdc = get_frame_dc (f); | 4267 | hdc = get_frame_dc (f); |
| 4203 | /* Since Windows scroll bars are smaller than the space reserved | 4268 | /* Since Windows scroll bars are smaller than the space reserved |
| 4204 | for them on the frame, we have to clear "under" them. */ | 4269 | for them on the frame, we have to clear "under" them. */ |
| 4205 | w32_clear_area (f, hdc, | 4270 | if (fringe_extended_p) |
| 4206 | left, | 4271 | w32_clear_area (f, hdc, sb_left, top, sb_width, height); |
| 4207 | top, | 4272 | else |
| 4208 | width, | 4273 | w32_clear_area (f, hdc, left, top, width, height); |
| 4209 | height); | ||
| 4210 | release_frame_dc (f, hdc); | 4274 | release_frame_dc (f, hdc); |
| 4211 | } | 4275 | } |
| 4212 | /* Make sure scroll bar is "visible" before moving, to ensure the | 4276 | /* Make sure scroll bar is "visible" before moving, to ensure the |
| @@ -4236,6 +4300,8 @@ w32_set_vertical_scroll_bar (w, portion, whole, position) | |||
| 4236 | UNBLOCK_INPUT; | 4300 | UNBLOCK_INPUT; |
| 4237 | } | 4301 | } |
| 4238 | } | 4302 | } |
| 4303 | bar->fringe_extended_p = fringe_extended_p ? Qt : Qnil; | ||
| 4304 | |||
| 4239 | w32_set_scroll_bar_thumb (bar, portion, position, whole); | 4305 | w32_set_scroll_bar_thumb (bar, portion, position, whole); |
| 4240 | 4306 | ||
| 4241 | XSETVECTOR (w->vertical_scroll_bar, bar); | 4307 | XSETVECTOR (w->vertical_scroll_bar, bar); |
diff --git a/src/w32term.h b/src/w32term.h index 2febf4a33c7..d100cbee222 100644 --- a/src/w32term.h +++ b/src/w32term.h | |||
| @@ -497,6 +497,10 @@ struct scroll_bar { | |||
| 497 | place where the user grabbed it. If the handle isn't currently | 497 | place where the user grabbed it. If the handle isn't currently |
| 498 | being dragged, this is Qnil. */ | 498 | being dragged, this is Qnil. */ |
| 499 | Lisp_Object dragging; | 499 | Lisp_Object dragging; |
| 500 | |||
| 501 | /* t if the background of the fringe that is adjacent to a scroll | ||
| 502 | bar is extended to the gap between the fringe and the bar. */ | ||
| 503 | Lisp_Object fringe_extended_p; | ||
| 500 | }; | 504 | }; |
| 501 | 505 | ||
| 502 | /* The number of elements a vector holding a struct scroll_bar needs. */ | 506 | /* The number of elements a vector holding a struct scroll_bar needs. */ |
| @@ -586,14 +590,14 @@ extern void w32_fill_rect (); | |||
| 586 | extern void w32_clear_window (); | 590 | extern void w32_clear_window (); |
| 587 | 591 | ||
| 588 | #define w32_fill_area(f,hdc,pix,x,y,nx,ny) \ | 592 | #define w32_fill_area(f,hdc,pix,x,y,nx,ny) \ |
| 589 | { \ | 593 | do { \ |
| 590 | RECT rect; \ | 594 | RECT rect; \ |
| 591 | rect.left = x; \ | 595 | rect.left = x; \ |
| 592 | rect.top = y; \ | 596 | rect.top = y; \ |
| 593 | rect.right = x + nx; \ | 597 | rect.right = x + nx; \ |
| 594 | rect.bottom = y + ny; \ | 598 | rect.bottom = y + ny; \ |
| 595 | w32_fill_rect (f,hdc,pix,&rect); \ | 599 | w32_fill_rect (f,hdc,pix,&rect); \ |
| 596 | } | 600 | } while (0) |
| 597 | 601 | ||
| 598 | #define w32_clear_rect(f,hdc,lprect) \ | 602 | #define w32_clear_rect(f,hdc,lprect) \ |
| 599 | w32_fill_rect (f,hdc,f->output_data.x->background_pixel,lprect) | 603 | w32_fill_rect (f,hdc,f->output_data.x->background_pixel,lprect) |
diff --git a/src/xdisp.c b/src/xdisp.c index 9d9c40410ba..f18bfc020af 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -18144,7 +18144,7 @@ decode_mode_spec (w, c, field_width, precision, multibyte) | |||
| 18144 | #endif | 18144 | #endif |
| 18145 | break; | 18145 | break; |
| 18146 | 18146 | ||
| 18147 | case 'R': | 18147 | case '@': |
| 18148 | { | 18148 | { |
| 18149 | Lisp_Object val; | 18149 | Lisp_Object val; |
| 18150 | val = call1 (intern ("file-remote-p"), current_buffer->directory); | 18150 | val = call1 (intern ("file-remote-p"), current_buffer->directory); |
diff --git a/src/xterm.c b/src/xterm.c index 7ab663f5882..9c1e884c5ad 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -725,8 +725,10 @@ x_draw_fringe_bitmap (w, row, p) | |||
| 725 | else | 725 | else |
| 726 | x_clip_to_row (w, row, -1, gc); | 726 | x_clip_to_row (w, row, -1, gc); |
| 727 | 727 | ||
| 728 | if (p->bx >= 0 && !p->overlay_p) | 728 | if (!p->overlay_p) |
| 729 | { | 729 | { |
| 730 | int bx = p->bx, by = p->by, nx = p->nx, ny = p->ny; | ||
| 731 | |||
| 730 | /* In case the same realized face is used for fringes and | 732 | /* In case the same realized face is used for fringes and |
| 731 | for something displayed in the text (e.g. face `region' on | 733 | for something displayed in the text (e.g. face `region' on |
| 732 | mono-displays, the fill style may have been changed to | 734 | mono-displays, the fill style may have been changed to |
| @@ -736,8 +738,55 @@ x_draw_fringe_bitmap (w, row, p) | |||
| 736 | else | 738 | else |
| 737 | XSetForeground (display, face->gc, face->background); | 739 | XSetForeground (display, face->gc, face->background); |
| 738 | 740 | ||
| 739 | XFillRectangle (display, window, face->gc, | 741 | #ifdef USE_TOOLKIT_SCROLL_BARS |
| 740 | p->bx, p->by, p->nx, p->ny); | 742 | /* If the fringe is adjacent to the left (right) scroll bar of a |
| 743 | leftmost (rightmost, respectively) window, then extend its | ||
| 744 | background to the gap between the fringe and the bar. */ | ||
| 745 | if ((WINDOW_LEFTMOST_P (w) | ||
| 746 | && WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w)) | ||
| 747 | || (WINDOW_RIGHTMOST_P (w) | ||
| 748 | && WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w))) | ||
| 749 | { | ||
| 750 | int sb_width = WINDOW_CONFIG_SCROLL_BAR_WIDTH (w); | ||
| 751 | |||
| 752 | if (sb_width > 0) | ||
| 753 | { | ||
| 754 | int left = WINDOW_SCROLL_BAR_AREA_X (w); | ||
| 755 | int width = (WINDOW_CONFIG_SCROLL_BAR_COLS (w) | ||
| 756 | * FRAME_COLUMN_WIDTH (f)); | ||
| 757 | |||
| 758 | if (bx < 0) | ||
| 759 | { | ||
| 760 | /* Bitmap fills the fringe. */ | ||
| 761 | if (left + width == p->x) | ||
| 762 | bx = left + sb_width; | ||
| 763 | else if (p->x + p->wd == left) | ||
| 764 | bx = left; | ||
| 765 | if (bx >= 0) | ||
| 766 | { | ||
| 767 | int header_line_height = WINDOW_HEADER_LINE_HEIGHT (w); | ||
| 768 | |||
| 769 | nx = width - sb_width; | ||
| 770 | by = WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height, | ||
| 771 | row->y)); | ||
| 772 | ny = row->visible_height; | ||
| 773 | } | ||
| 774 | } | ||
| 775 | else | ||
| 776 | { | ||
| 777 | if (left + width == bx) | ||
| 778 | { | ||
| 779 | bx = left + sb_width; | ||
| 780 | nx += width - sb_width; | ||
| 781 | } | ||
| 782 | else if (bx + nx == left) | ||
| 783 | nx += width - sb_width; | ||
| 784 | } | ||
| 785 | } | ||
| 786 | } | ||
| 787 | #endif | ||
| 788 | if (bx >= 0 && nx > 0) | ||
| 789 | XFillRectangle (display, window, face->gc, bx, by, nx, ny); | ||
| 741 | 790 | ||
| 742 | if (!face->stipple) | 791 | if (!face->stipple) |
| 743 | XSetForeground (display, face->gc, face->foreground); | 792 | XSetForeground (display, face->gc, face->foreground); |
| @@ -5025,6 +5074,9 @@ x_scroll_bar_create (w, top, left, width, height) | |||
| 5025 | XSETINT (bar->start, 0); | 5074 | XSETINT (bar->start, 0); |
| 5026 | XSETINT (bar->end, 0); | 5075 | XSETINT (bar->end, 0); |
| 5027 | bar->dragging = Qnil; | 5076 | bar->dragging = Qnil; |
| 5077 | #ifdef USE_TOOLKIT_SCROLL_BARS | ||
| 5078 | bar->fringe_extended_p = Qnil; | ||
| 5079 | #endif | ||
| 5028 | 5080 | ||
| 5029 | /* Add bar to its frame's list of scroll bars. */ | 5081 | /* Add bar to its frame's list of scroll bars. */ |
| 5030 | bar->next = FRAME_SCROLL_BARS (f); | 5082 | bar->next = FRAME_SCROLL_BARS (f); |
| @@ -5217,6 +5269,9 @@ XTset_vertical_scroll_bar (w, portion, whole, position) | |||
| 5217 | struct scroll_bar *bar; | 5269 | struct scroll_bar *bar; |
| 5218 | int top, height, left, sb_left, width, sb_width; | 5270 | int top, height, left, sb_left, width, sb_width; |
| 5219 | int window_y, window_height; | 5271 | int window_y, window_height; |
| 5272 | #ifdef USE_TOOLKIT_SCROLL_BARS | ||
| 5273 | int fringe_extended_p; | ||
| 5274 | #endif | ||
| 5220 | 5275 | ||
| 5221 | /* Get window dimensions. */ | 5276 | /* Get window dimensions. */ |
| 5222 | window_box (w, -1, 0, &window_y, 0, &window_height); | 5277 | window_box (w, -1, 0, &window_y, 0, &window_height); |
| @@ -5237,15 +5292,9 @@ XTset_vertical_scroll_bar (w, portion, whole, position) | |||
| 5237 | /* Compute the left edge of the scroll bar. */ | 5292 | /* Compute the left edge of the scroll bar. */ |
| 5238 | #ifdef USE_TOOLKIT_SCROLL_BARS | 5293 | #ifdef USE_TOOLKIT_SCROLL_BARS |
| 5239 | if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w)) | 5294 | if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w)) |
| 5240 | sb_left = (left + | 5295 | sb_left = left + (WINDOW_RIGHTMOST_P (w) ? width - sb_width : 0); |
| 5241 | (WINDOW_RIGHTMOST_P (w) | ||
| 5242 | ? width - sb_width - (width - sb_width) / 2 | ||
| 5243 | : 0)); | ||
| 5244 | else | 5296 | else |
| 5245 | sb_left = (left + | 5297 | sb_left = left + (WINDOW_LEFTMOST_P (w) ? 0 : width - sb_width); |
| 5246 | (WINDOW_LEFTMOST_P (w) | ||
| 5247 | ? (width - sb_width) / 2 | ||
| 5248 | : width - sb_width)); | ||
| 5249 | #else | 5298 | #else |
| 5250 | if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w)) | 5299 | if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w)) |
| 5251 | sb_left = left + width - sb_width; | 5300 | sb_left = left + width - sb_width; |
| @@ -5253,14 +5302,33 @@ XTset_vertical_scroll_bar (w, portion, whole, position) | |||
| 5253 | sb_left = left; | 5302 | sb_left = left; |
| 5254 | #endif | 5303 | #endif |
| 5255 | 5304 | ||
| 5305 | #ifdef USE_TOOLKIT_SCROLL_BARS | ||
| 5306 | if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w)) | ||
| 5307 | fringe_extended_p = (WINDOW_LEFTMOST_P (w) | ||
| 5308 | && WINDOW_LEFT_FRINGE_WIDTH (w) | ||
| 5309 | && (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w) | ||
| 5310 | || WINDOW_LEFT_MARGIN_COLS (w) == 0)); | ||
| 5311 | else | ||
| 5312 | fringe_extended_p = (WINDOW_RIGHTMOST_P (w) | ||
| 5313 | && WINDOW_RIGHT_FRINGE_WIDTH (w) | ||
| 5314 | && (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w) | ||
| 5315 | || WINDOW_RIGHT_MARGIN_COLS (w) == 0)); | ||
| 5316 | #endif | ||
| 5317 | |||
| 5256 | /* Does the scroll bar exist yet? */ | 5318 | /* Does the scroll bar exist yet? */ |
| 5257 | if (NILP (w->vertical_scroll_bar)) | 5319 | if (NILP (w->vertical_scroll_bar)) |
| 5258 | { | 5320 | { |
| 5259 | if (width > 0 && height > 0) | 5321 | if (width > 0 && height > 0) |
| 5260 | { | 5322 | { |
| 5261 | BLOCK_INPUT; | 5323 | BLOCK_INPUT; |
| 5262 | x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), | 5324 | #ifdef USE_TOOLKIT_SCROLL_BARS |
| 5263 | left, top, width, height, False); | 5325 | if (fringe_extended_p) |
| 5326 | x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), | ||
| 5327 | sb_left, top, sb_width, height, False); | ||
| 5328 | else | ||
| 5329 | #endif | ||
| 5330 | x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), | ||
| 5331 | left, top, width, height, False); | ||
| 5264 | UNBLOCK_INPUT; | 5332 | UNBLOCK_INPUT; |
| 5265 | } | 5333 | } |
| 5266 | 5334 | ||
| @@ -5287,13 +5355,19 @@ XTset_vertical_scroll_bar (w, portion, whole, position) | |||
| 5287 | #ifdef USE_TOOLKIT_SCROLL_BARS | 5355 | #ifdef USE_TOOLKIT_SCROLL_BARS |
| 5288 | 5356 | ||
| 5289 | /* Move/size the scroll bar widget. */ | 5357 | /* Move/size the scroll bar widget. */ |
| 5290 | if (mask) | 5358 | if (mask || !NILP (bar->fringe_extended_p) != fringe_extended_p) |
| 5291 | { | 5359 | { |
| 5292 | /* Since toolkit scroll bars are smaller than the space reserved | 5360 | /* Since toolkit scroll bars are smaller than the space reserved |
| 5293 | for them on the frame, we have to clear "under" them. */ | 5361 | for them on the frame, we have to clear "under" them. */ |
| 5294 | if (width > 0 && height > 0) | 5362 | if (width > 0 && height > 0) |
| 5295 | x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), | 5363 | { |
| 5296 | left, top, width, height, False); | 5364 | if (fringe_extended_p) |
| 5365 | x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), | ||
| 5366 | sb_left, top, sb_width, height, False); | ||
| 5367 | else | ||
| 5368 | x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), | ||
| 5369 | left, top, width, height, False); | ||
| 5370 | } | ||
| 5297 | #ifdef USE_GTK | 5371 | #ifdef USE_GTK |
| 5298 | xg_update_scrollbar_pos (f, | 5372 | xg_update_scrollbar_pos (f, |
| 5299 | SCROLL_BAR_X_WINDOW (bar), | 5373 | SCROLL_BAR_X_WINDOW (bar), |
| @@ -5368,6 +5442,8 @@ XTset_vertical_scroll_bar (w, portion, whole, position) | |||
| 5368 | } | 5442 | } |
| 5369 | 5443 | ||
| 5370 | #ifdef USE_TOOLKIT_SCROLL_BARS | 5444 | #ifdef USE_TOOLKIT_SCROLL_BARS |
| 5445 | bar->fringe_extended_p = fringe_extended_p ? Qt : Qnil; | ||
| 5446 | |||
| 5371 | x_set_toolkit_scroll_bar_thumb (bar, portion, position, whole); | 5447 | x_set_toolkit_scroll_bar_thumb (bar, portion, position, whole); |
| 5372 | #else /* not USE_TOOLKIT_SCROLL_BARS */ | 5448 | #else /* not USE_TOOLKIT_SCROLL_BARS */ |
| 5373 | /* Set the scroll bar's current state, unless we're currently being | 5449 | /* Set the scroll bar's current state, unless we're currently being |
diff --git a/src/xterm.h b/src/xterm.h index 7fa02cc066b..a0b4704e13f 100644 --- a/src/xterm.h +++ b/src/xterm.h | |||
| @@ -818,6 +818,12 @@ struct scroll_bar | |||
| 818 | place where the user grabbed it. If the handle isn't currently | 818 | place where the user grabbed it. If the handle isn't currently |
| 819 | being dragged, this is Qnil. */ | 819 | being dragged, this is Qnil. */ |
| 820 | Lisp_Object dragging; | 820 | Lisp_Object dragging; |
| 821 | |||
| 822 | #ifdef USE_TOOLKIT_SCROLL_BARS | ||
| 823 | /* t if the background of the fringe that is adjacent to a scroll | ||
| 824 | bar is extended to the gap between the fringe and the bar. */ | ||
| 825 | Lisp_Object fringe_extended_p; | ||
| 826 | #endif | ||
| 821 | }; | 827 | }; |
| 822 | 828 | ||
| 823 | /* The number of elements a vector holding a struct scroll_bar needs. */ | 829 | /* The number of elements a vector holding a struct scroll_bar needs. */ |