diff options
| author | Miles Bader | 2005-04-02 22:40:25 +0000 |
|---|---|---|
| committer | Miles Bader | 2005-04-02 22:40:25 +0000 |
| commit | 4a2283bcc7998fef3788136a16a6c2b10df6fe6f (patch) | |
| tree | dc8199f604a6e5a2d57754d843773be6c88c4f36 /src | |
| parent | 417294f4d1d8872d7a4a698de1a9650f18af3b37 (diff) | |
| parent | ab77efd0e55c661ea8fd45df28f2a39d0c46fbd8 (diff) | |
| download | emacs-4a2283bcc7998fef3788136a16a6c2b10df6fe6f.tar.gz emacs-4a2283bcc7998fef3788136a16a6c2b10df6fe6f.zip | |
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-33
Merge from emacs--cvs-trunk--0
Patches applied:
* emacs--cvs-trunk--0 (patch 223-227)
- Update from CVS
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 55 | ||||
| -rw-r--r-- | src/alloc.c | 4 | ||||
| -rw-r--r-- | src/casetab.c | 7 | ||||
| -rw-r--r-- | src/coding.c | 2 | ||||
| -rw-r--r-- | src/keyboard.c | 14 | ||||
| -rw-r--r-- | src/lisp.h | 3 | ||||
| -rw-r--r-- | src/ralloc.c | 5 | ||||
| -rw-r--r-- | src/search.c | 67 | ||||
| -rw-r--r-- | src/xterm.c | 29 |
9 files changed, 140 insertions, 46 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index c3f13e624a8..a7c0dfdb8fa 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,56 @@ | |||
| 1 | 2005-04-02 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 2 | |||
| 3 | * alloc.c (allocate_string_data): Call BLOCK_INPUT before calling | ||
| 4 | mallopt. | ||
| 5 | |||
| 6 | * ralloc.c (r_alloc_init): Ditto. | ||
| 7 | |||
| 8 | 2005-04-01 Kenichi Handa <handa@m17n.org> | ||
| 9 | |||
| 10 | * lisp.h (Vascii_upcase_table, Vascii_canon_table, | ||
| 11 | Vascii_eqv_table): Extern them. | ||
| 12 | |||
| 13 | * casetab.c (set_case_table): If standard is nonzero, setup | ||
| 14 | Vascii_upcase_table, Vascii_canon_table, and Vascii_eqv_table. | ||
| 15 | |||
| 16 | * search.c (looking_at_1): Use current_buffer->case_canon_table, | ||
| 17 | not DOWNCASE_TABLE. | ||
| 18 | (string_match_1): Likewise. | ||
| 19 | (fast_c_string_match_ignore_case): Use Vascii_canon_table, not | ||
| 20 | Vascii_downcase_table. | ||
| 21 | (fast_string_match_ignore_case): Likewise. | ||
| 22 | (search_buffer): Fix checking of boyer-moore usability. | ||
| 23 | (boyer_moore): Calculate translate_prev_byte1/2/3 in advance. No | ||
| 24 | need of tranlating characters in PAT. Fix calculation of | ||
| 25 | simple_translate. | ||
| 26 | |||
| 27 | 2005-03-31 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 28 | |||
| 29 | * xterm.c [HAVE_XAW3D]: Include ThreeD.h for XtNbeNiceToColormap. | ||
| 30 | (x_create_toolkit_scroll_bar): Test XtNbeNiceToColormap before using it. | ||
| 31 | Use XtNtopShadowPixel and XtNbottomShadowPixel. | ||
| 32 | (x_set_toolkit_scroll_bar_thumb): Remove ugly old hack that didn't | ||
| 33 | really work and that breaks with some versions of Xaw3d. | ||
| 34 | |||
| 35 | 2005-03-31 Kenichi Handa <handa@m17n.org> | ||
| 36 | |||
| 37 | * coding.c (syms_of_coding): Fix previous change. | ||
| 38 | |||
| 39 | 2005-03-30 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 40 | |||
| 41 | * fileio.c (search_embedded_absfilename): Fix last change. | ||
| 42 | |||
| 43 | 2005-03-25 Kenichi Handa <handa@m17n.org> | ||
| 44 | |||
| 45 | * coding.c (syms_of_coding): Suggest to use set-coding-category in | ||
| 46 | the docstring of coding-category-list. | ||
| 47 | |||
| 48 | 2005-03-31 Kim F. Storm <storm@cua.dk> | ||
| 49 | |||
| 50 | * keyboard.c (Qmouse_fixup_help_message): New var. | ||
| 51 | (syms_of_keyboard): Intern and staticpro it. | ||
| 52 | (show_help_echo): Apply mouse-fixup-help-message to help string. | ||
| 53 | |||
| 1 | 2005-03-30 Kim F. Storm <storm@cua.dk> | 54 | 2005-03-30 Kim F. Storm <storm@cua.dk> |
| 2 | 55 | ||
| 3 | * xdisp.c (display_line): Allow multiple overlay arrows in window. | 56 | * xdisp.c (display_line): Allow multiple overlay arrows in window. |
| @@ -15,7 +68,7 @@ | |||
| 15 | 68 | ||
| 16 | 2005-03-26 Lennart Borgman <lennart.borgman.073@student.lu.se> | 69 | 2005-03-26 Lennart Borgman <lennart.borgman.073@student.lu.se> |
| 17 | 70 | ||
| 18 | * w32term.h (x_output): add focus_state. | 71 | * w32term.h (x_output): Add focus_state. |
| 19 | 72 | ||
| 20 | * w32term.c (x_focus_changed, w32_detect_focus_change): New functions. | 73 | * w32term.c (x_focus_changed, w32_detect_focus_change): New functions. |
| 21 | (w32_read_socket) [WM_SETFOCUS]: Call w32_detect_focus_change. | 74 | (w32_read_socket) [WM_SETFOCUS]: Call w32_detect_focus_change. |
diff --git a/src/alloc.c b/src/alloc.c index aacce3041d5..aee09c3f16c 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -1933,14 +1933,18 @@ allocate_string_data (s, nchars, nbytes) | |||
| 1933 | mmap'ed data typically have an address towards the top of the | 1933 | mmap'ed data typically have an address towards the top of the |
| 1934 | address space, which won't fit into an EMACS_INT (at least on | 1934 | address space, which won't fit into an EMACS_INT (at least on |
| 1935 | 32-bit systems with the current tagging scheme). --fx */ | 1935 | 32-bit systems with the current tagging scheme). --fx */ |
| 1936 | BLOCK_INPUT; | ||
| 1936 | mallopt (M_MMAP_MAX, 0); | 1937 | mallopt (M_MMAP_MAX, 0); |
| 1938 | UNBLOCK_INPUT; | ||
| 1937 | #endif | 1939 | #endif |
| 1938 | 1940 | ||
| 1939 | b = (struct sblock *) lisp_malloc (size + GC_STRING_EXTRA, MEM_TYPE_NON_LISP); | 1941 | b = (struct sblock *) lisp_malloc (size + GC_STRING_EXTRA, MEM_TYPE_NON_LISP); |
| 1940 | 1942 | ||
| 1941 | #ifdef DOUG_LEA_MALLOC | 1943 | #ifdef DOUG_LEA_MALLOC |
| 1942 | /* Back to a reasonable maximum of mmap'ed areas. */ | 1944 | /* Back to a reasonable maximum of mmap'ed areas. */ |
| 1945 | BLOCK_INPUT; | ||
| 1943 | mallopt (M_MMAP_MAX, MMAP_MAX_AREAS); | 1946 | mallopt (M_MMAP_MAX, MMAP_MAX_AREAS); |
| 1947 | UNBLOCK_INPUT; | ||
| 1944 | #endif | 1948 | #endif |
| 1945 | 1949 | ||
| 1946 | b->next_free = &b->first_data; | 1950 | b->next_free = &b->first_data; |
diff --git a/src/casetab.c b/src/casetab.c index 63f29666a50..d0e0e137462 100644 --- a/src/casetab.c +++ b/src/casetab.c | |||
| @@ -161,7 +161,12 @@ set_case_table (table, standard) | |||
| 161 | XCHAR_TABLE (canon)->extras[2] = eqv; | 161 | XCHAR_TABLE (canon)->extras[2] = eqv; |
| 162 | 162 | ||
| 163 | if (standard) | 163 | if (standard) |
| 164 | Vascii_downcase_table = table; | 164 | { |
| 165 | Vascii_downcase_table = table; | ||
| 166 | Vascii_upcase_table = up; | ||
| 167 | Vascii_canon_table = canon; | ||
| 168 | Vascii_eqv_table = eqv; | ||
| 169 | } | ||
| 165 | else | 170 | else |
| 166 | { | 171 | { |
| 167 | current_buffer->downcase_table = table; | 172 | current_buffer->downcase_table = table; |
diff --git a/src/coding.c b/src/coding.c index 6fcb031b432..66430553a84 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -9357,7 +9357,7 @@ associated with each coding-category one by one in this order. When | |||
| 9357 | one algorithm agrees with a byte sequence of source text, the coding | 9357 | one algorithm agrees with a byte sequence of source text, the coding |
| 9358 | system bound to the corresponding coding-category is selected. | 9358 | system bound to the corresponding coding-category is selected. |
| 9359 | 9359 | ||
| 9360 | Don't modify this variable directly, but use `set-coding-category'. */); | 9360 | Don't modify this variable directly, but use `set-coding-priority'. */); |
| 9361 | { | 9361 | { |
| 9362 | int i; | 9362 | int i; |
| 9363 | 9363 | ||
diff --git a/src/keyboard.c b/src/keyboard.c index ec68d35cae6..bd3e27c0f1a 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -523,6 +523,10 @@ Lisp_Object Qmake_frame_visible; | |||
| 523 | Lisp_Object Qselect_window; | 523 | Lisp_Object Qselect_window; |
| 524 | Lisp_Object Qhelp_echo; | 524 | Lisp_Object Qhelp_echo; |
| 525 | 525 | ||
| 526 | #ifdef HAVE_MOUSE | ||
| 527 | Lisp_Object Qmouse_fixup_help_message; | ||
| 528 | #endif | ||
| 529 | |||
| 526 | /* Symbols to denote kinds of events. */ | 530 | /* Symbols to denote kinds of events. */ |
| 527 | Lisp_Object Qfunction_key; | 531 | Lisp_Object Qfunction_key; |
| 528 | Lisp_Object Qmouse_click; | 532 | Lisp_Object Qmouse_click; |
| @@ -2304,6 +2308,11 @@ show_help_echo (help, window, object, pos, ok_to_overwrite_keystroke_echo) | |||
| 2304 | return; | 2308 | return; |
| 2305 | } | 2309 | } |
| 2306 | 2310 | ||
| 2311 | #ifdef HAVE_MOUSE | ||
| 2312 | if (!noninteractive && STRINGP (help)) | ||
| 2313 | help = call1 (Qmouse_fixup_help_message, help); | ||
| 2314 | #endif | ||
| 2315 | |||
| 2307 | if (STRINGP (help) || NILP (help)) | 2316 | if (STRINGP (help) || NILP (help)) |
| 2308 | { | 2317 | { |
| 2309 | if (!NILP (Vshow_help_function)) | 2318 | if (!NILP (Vshow_help_function)) |
| @@ -10873,6 +10882,11 @@ syms_of_keyboard () | |||
| 10873 | Qmenu_bar = intern ("menu-bar"); | 10882 | Qmenu_bar = intern ("menu-bar"); |
| 10874 | staticpro (&Qmenu_bar); | 10883 | staticpro (&Qmenu_bar); |
| 10875 | 10884 | ||
| 10885 | #ifdef HAVE_MOUSE | ||
| 10886 | Qmouse_fixup_help_message = intern ("mouse-fixup-help-message"); | ||
| 10887 | staticpro (&Qmouse_fixup_help_message); | ||
| 10888 | #endif | ||
| 10889 | |||
| 10876 | Qabove_handle = intern ("above-handle"); | 10890 | Qabove_handle = intern ("above-handle"); |
| 10877 | staticpro (&Qabove_handle); | 10891 | staticpro (&Qabove_handle); |
| 10878 | Qhandle = intern ("handle"); | 10892 | Qhandle = intern ("handle"); |
diff --git a/src/lisp.h b/src/lisp.h index 160a5cb398b..ca8795fb1e1 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -1879,7 +1879,8 @@ extern Lisp_Object case_temp2; | |||
| 1879 | NATNUMP (case_temp2)) \ | 1879 | NATNUMP (case_temp2)) \ |
| 1880 | ? XFASTINT (case_temp2) : case_temp1) | 1880 | ? XFASTINT (case_temp2) : case_temp1) |
| 1881 | 1881 | ||
| 1882 | extern Lisp_Object Vascii_downcase_table; | 1882 | extern Lisp_Object Vascii_downcase_table, Vascii_upcase_table; |
| 1883 | extern Lisp_Object Vascii_canon_table, Vascii_eqv_table; | ||
| 1883 | 1884 | ||
| 1884 | /* Number of bytes of structure consed since last GC. */ | 1885 | /* Number of bytes of structure consed since last GC. */ |
| 1885 | 1886 | ||
diff --git a/src/ralloc.c b/src/ralloc.c index 75c25258a9d..fd0d62e1977 100644 --- a/src/ralloc.c +++ b/src/ralloc.c | |||
| @@ -28,6 +28,7 @@ Boston, MA 02111-1307, USA. */ | |||
| 28 | 28 | ||
| 29 | #include <config.h> | 29 | #include <config.h> |
| 30 | #include "lisp.h" /* Needed for VALBITS. */ | 30 | #include "lisp.h" /* Needed for VALBITS. */ |
| 31 | #include "blockinput.h" | ||
| 31 | 32 | ||
| 32 | #ifdef HAVE_UNISTD_H | 33 | #ifdef HAVE_UNISTD_H |
| 33 | #include <unistd.h> | 34 | #include <unistd.h> |
| @@ -1255,7 +1256,9 @@ r_alloc_init () | |||
| 1255 | #endif | 1256 | #endif |
| 1256 | 1257 | ||
| 1257 | #ifdef DOUG_LEA_MALLOC | 1258 | #ifdef DOUG_LEA_MALLOC |
| 1258 | mallopt (M_TOP_PAD, 64 * 4096); | 1259 | BLOCK_INPUT; |
| 1260 | mallopt (M_TOP_PAD, 64 * 4096); | ||
| 1261 | UNBLOCK_INPUT; | ||
| 1259 | #else | 1262 | #else |
| 1260 | #ifndef SYSTEM_MALLOC | 1263 | #ifndef SYSTEM_MALLOC |
| 1261 | /* Give GNU malloc's morecore some hysteresis | 1264 | /* Give GNU malloc's morecore some hysteresis |
diff --git a/src/search.c b/src/search.c index 30e4be41ca9..fb149c665a9 100644 --- a/src/search.c +++ b/src/search.c | |||
| @@ -259,7 +259,7 @@ looking_at_1 (string, posix) | |||
| 259 | CHECK_STRING (string); | 259 | CHECK_STRING (string); |
| 260 | bufp = compile_pattern (string, &search_regs, | 260 | bufp = compile_pattern (string, &search_regs, |
| 261 | (!NILP (current_buffer->case_fold_search) | 261 | (!NILP (current_buffer->case_fold_search) |
| 262 | ? DOWNCASE_TABLE : Qnil), | 262 | ? current_buffer->case_canon_table : Qnil), |
| 263 | posix, | 263 | posix, |
| 264 | !NILP (current_buffer->enable_multibyte_characters)); | 264 | !NILP (current_buffer->enable_multibyte_characters)); |
| 265 | 265 | ||
| @@ -365,7 +365,7 @@ string_match_1 (regexp, string, start, posix) | |||
| 365 | 365 | ||
| 366 | bufp = compile_pattern (regexp, &search_regs, | 366 | bufp = compile_pattern (regexp, &search_regs, |
| 367 | (!NILP (current_buffer->case_fold_search) | 367 | (!NILP (current_buffer->case_fold_search) |
| 368 | ? DOWNCASE_TABLE : Qnil), | 368 | ? current_buffer->case_canon_table : Qnil), |
| 369 | posix, | 369 | posix, |
| 370 | STRING_MULTIBYTE (string)); | 370 | STRING_MULTIBYTE (string)); |
| 371 | immediate_quit = 1; | 371 | immediate_quit = 1; |
| @@ -465,7 +465,7 @@ fast_c_string_match_ignore_case (regexp, string) | |||
| 465 | regexp = string_make_unibyte (regexp); | 465 | regexp = string_make_unibyte (regexp); |
| 466 | re_match_object = Qt; | 466 | re_match_object = Qt; |
| 467 | bufp = compile_pattern (regexp, 0, | 467 | bufp = compile_pattern (regexp, 0, |
| 468 | Vascii_downcase_table, 0, | 468 | Vascii_canon_table, 0, |
| 469 | 0); | 469 | 0); |
| 470 | immediate_quit = 1; | 470 | immediate_quit = 1; |
| 471 | val = re_search (bufp, string, len, 0, len, 0); | 471 | val = re_search (bufp, string, len, 0, len, 0); |
| @@ -482,7 +482,7 @@ fast_string_match_ignore_case (regexp, string) | |||
| 482 | int val; | 482 | int val; |
| 483 | struct re_pattern_buffer *bufp; | 483 | struct re_pattern_buffer *bufp; |
| 484 | 484 | ||
| 485 | bufp = compile_pattern (regexp, 0, Vascii_downcase_table, | 485 | bufp = compile_pattern (regexp, 0, Vascii_canon_table, |
| 486 | 0, STRING_MULTIBYTE (string)); | 486 | 0, STRING_MULTIBYTE (string)); |
| 487 | immediate_quit = 1; | 487 | immediate_quit = 1; |
| 488 | re_match_object = string; | 488 | re_match_object = string; |
| @@ -1253,6 +1253,7 @@ search_buffer (string, pos, pos_byte, lim, lim_byte, n, | |||
| 1253 | if (RE && *base_pat == '\\') | 1253 | if (RE && *base_pat == '\\') |
| 1254 | { | 1254 | { |
| 1255 | len--; | 1255 | len--; |
| 1256 | raw_pattern_size--; | ||
| 1256 | base_pat++; | 1257 | base_pat++; |
| 1257 | } | 1258 | } |
| 1258 | c = *base_pat++; | 1259 | c = *base_pat++; |
| @@ -1487,16 +1488,18 @@ simple_search (n, pat, len, len_byte, trt, pos, pos_byte, lim, lim_byte) | |||
| 1487 | return n; | 1488 | return n; |
| 1488 | } | 1489 | } |
| 1489 | 1490 | ||
| 1490 | /* Do Boyer-Moore search N times for the string PAT, | 1491 | /* Do Boyer-Moore search N times for the string BASE_PAT, |
| 1491 | whose length is LEN/LEN_BYTE, | 1492 | whose length is LEN/LEN_BYTE, |
| 1492 | from buffer position POS/POS_BYTE until LIM/LIM_BYTE. | 1493 | from buffer position POS/POS_BYTE until LIM/LIM_BYTE. |
| 1493 | DIRECTION says which direction we search in. | 1494 | DIRECTION says which direction we search in. |
| 1494 | TRT and INVERSE_TRT are translation tables. | 1495 | TRT and INVERSE_TRT are translation tables. |
| 1496 | Characters in PAT are already translated by TRT. | ||
| 1495 | 1497 | ||
| 1496 | This kind of search works if all the characters in PAT that have | 1498 | This kind of search works if all the characters in BASE_PAT that |
| 1497 | nontrivial translation are the same aside from the last byte. This | 1499 | have nontrivial translation are the same aside from the last byte. |
| 1498 | makes it possible to translate just the last byte of a character, | 1500 | This makes it possible to translate just the last byte of a |
| 1499 | and do so after just a simple test of the context. | 1501 | character, and do so after just a simple test of the context. |
| 1502 | CHARSET_BASE is nonzero iff there is such a non-ASCII character. | ||
| 1500 | 1503 | ||
| 1501 | If that criterion is not satisfied, do not call this function. */ | 1504 | If that criterion is not satisfied, do not call this function. */ |
| 1502 | 1505 | ||
| @@ -1523,8 +1526,13 @@ boyer_moore (n, base_pat, len, len_byte, trt, inverse_trt, | |||
| 1523 | int multibyte = ! NILP (current_buffer->enable_multibyte_characters); | 1526 | int multibyte = ! NILP (current_buffer->enable_multibyte_characters); |
| 1524 | 1527 | ||
| 1525 | unsigned char simple_translate[0400]; | 1528 | unsigned char simple_translate[0400]; |
| 1526 | int translate_prev_byte = 0; | 1529 | /* These are set to the preceding bytes of a byte to be translated |
| 1527 | int translate_anteprev_byte = 0; | 1530 | if charset_base is nonzero. As the maximum byte length of a |
| 1531 | multibyte character is 4, we have to check at most three previous | ||
| 1532 | bytes. */ | ||
| 1533 | int translate_prev_byte1 = 0; | ||
| 1534 | int translate_prev_byte2 = 0; | ||
| 1535 | int translate_prev_byte3 = 0; | ||
| 1528 | 1536 | ||
| 1529 | #ifdef C_ALLOCA | 1537 | #ifdef C_ALLOCA |
| 1530 | int BM_tab_space[0400]; | 1538 | int BM_tab_space[0400]; |
| @@ -1590,6 +1598,23 @@ boyer_moore (n, base_pat, len, len_byte, trt, inverse_trt, | |||
| 1590 | for (i = 0; i < 0400; i++) | 1598 | for (i = 0; i < 0400; i++) |
| 1591 | simple_translate[i] = i; | 1599 | simple_translate[i] = i; |
| 1592 | 1600 | ||
| 1601 | if (charset_base) | ||
| 1602 | { | ||
| 1603 | /* Setup translate_prev_byte1/2/3 from CHARSET_BASE. Only a | ||
| 1604 | byte following them are the target of translation. */ | ||
| 1605 | int sample_char = charset_base | 0x20; | ||
| 1606 | unsigned char str[MAX_MULTIBYTE_LENGTH]; | ||
| 1607 | int len = CHAR_STRING (sample_char, str); | ||
| 1608 | |||
| 1609 | translate_prev_byte1 = str[len - 2]; | ||
| 1610 | if (len > 2) | ||
| 1611 | { | ||
| 1612 | translate_prev_byte2 = str[len - 3]; | ||
| 1613 | if (len > 3) | ||
| 1614 | translate_prev_byte3 = str[len - 4]; | ||
| 1615 | } | ||
| 1616 | } | ||
| 1617 | |||
| 1593 | i = 0; | 1618 | i = 0; |
| 1594 | while (i != infinity) | 1619 | while (i != infinity) |
| 1595 | { | 1620 | { |
| @@ -1777,9 +1802,13 @@ boyer_moore (n, base_pat, len, len_byte, trt, inverse_trt, | |||
| 1777 | || ((cursor == tail_end_ptr | 1802 | || ((cursor == tail_end_ptr |
| 1778 | || CHAR_HEAD_P (cursor[1])) | 1803 | || CHAR_HEAD_P (cursor[1])) |
| 1779 | && (CHAR_HEAD_P (cursor[0]) | 1804 | && (CHAR_HEAD_P (cursor[0]) |
| 1780 | || (translate_prev_byte == cursor[-1] | 1805 | /* Check if this is the last byte of |
| 1781 | && (CHAR_HEAD_P (translate_prev_byte) | 1806 | a translable character. */ |
| 1782 | || translate_anteprev_byte == cursor[-2]))))) | 1807 | || (translate_prev_byte1 == cursor[-1] |
| 1808 | && (CHAR_HEAD_P (translate_prev_byte1) | ||
| 1809 | || (translate_prev_byte2 == cursor[-2] | ||
| 1810 | && (CHAR_HEAD_P (translate_prev_byte2) | ||
| 1811 | || (translate_prev_byte3 == cursor[-3])))))))) | ||
| 1783 | ch = simple_translate[*cursor]; | 1812 | ch = simple_translate[*cursor]; |
| 1784 | else | 1813 | else |
| 1785 | ch = *cursor; | 1814 | ch = *cursor; |
| @@ -1857,9 +1886,13 @@ boyer_moore (n, base_pat, len, len_byte, trt, inverse_trt, | |||
| 1857 | || ((ptr == tail_end_ptr | 1886 | || ((ptr == tail_end_ptr |
| 1858 | || CHAR_HEAD_P (ptr[1])) | 1887 | || CHAR_HEAD_P (ptr[1])) |
| 1859 | && (CHAR_HEAD_P (ptr[0]) | 1888 | && (CHAR_HEAD_P (ptr[0]) |
| 1860 | || (translate_prev_byte == ptr[-1] | 1889 | /* Check if this is the last byte of a |
| 1861 | && (CHAR_HEAD_P (translate_prev_byte) | 1890 | translable character. */ |
| 1862 | || translate_anteprev_byte == ptr[-2]))))) | 1891 | || (translate_prev_byte1 == ptr[-1] |
| 1892 | && (CHAR_HEAD_P (translate_prev_byte1) | ||
| 1893 | || (translate_prev_byte2 == ptr[-2] | ||
| 1894 | && (CHAR_HEAD_P (translate_prev_byte2) | ||
| 1895 | || translate_prev_byte3 == ptr[-3]))))))) | ||
| 1863 | ch = simple_translate[*ptr]; | 1896 | ch = simple_translate[*ptr]; |
| 1864 | else | 1897 | else |
| 1865 | ch = *ptr; | 1898 | ch = *ptr; |
diff --git a/src/xterm.c b/src/xterm.c index 3b6d2e18ac6..26af2848f9b 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -131,9 +131,7 @@ extern void _XEditResCheckMessages (); | |||
| 131 | #ifdef HAVE_XAW3D | 131 | #ifdef HAVE_XAW3D |
| 132 | #include <X11/Xaw3d/Simple.h> | 132 | #include <X11/Xaw3d/Simple.h> |
| 133 | #include <X11/Xaw3d/Scrollbar.h> | 133 | #include <X11/Xaw3d/Scrollbar.h> |
| 134 | #define ARROW_SCROLLBAR | 134 | #include <X11/Xaw3d/ThreeD.h> |
| 135 | #define XAW_ARROW_SCROLLBARS | ||
| 136 | #include <X11/Xaw3d/ScrollbarP.h> | ||
| 137 | #else /* !HAVE_XAW3D */ | 135 | #else /* !HAVE_XAW3D */ |
| 138 | #include <X11/Xaw/Simple.h> | 136 | #include <X11/Xaw/Simple.h> |
| 139 | #include <X11/Xaw/Scrollbar.h> | 137 | #include <X11/Xaw/Scrollbar.h> |
| @@ -4553,6 +4551,7 @@ x_create_toolkit_scroll_bar (f, bar) | |||
| 4553 | f->output_data.x->scroll_bar_bottom_shadow_pixel = pixel; | 4551 | f->output_data.x->scroll_bar_bottom_shadow_pixel = pixel; |
| 4554 | } | 4552 | } |
| 4555 | 4553 | ||
| 4554 | #ifdef XtNbeNiceToColormap | ||
| 4556 | /* Tell the toolkit about them. */ | 4555 | /* Tell the toolkit about them. */ |
| 4557 | if (f->output_data.x->scroll_bar_top_shadow_pixel == -1 | 4556 | if (f->output_data.x->scroll_bar_top_shadow_pixel == -1 |
| 4558 | || f->output_data.x->scroll_bar_bottom_shadow_pixel == -1) | 4557 | || f->output_data.x->scroll_bar_bottom_shadow_pixel == -1) |
| @@ -4576,16 +4575,17 @@ x_create_toolkit_scroll_bar (f, bar) | |||
| 4576 | pixel = f->output_data.x->scroll_bar_top_shadow_pixel; | 4575 | pixel = f->output_data.x->scroll_bar_top_shadow_pixel; |
| 4577 | if (pixel != -1) | 4576 | if (pixel != -1) |
| 4578 | { | 4577 | { |
| 4579 | XtSetArg (av[ac], "topShadowPixel", pixel); | 4578 | XtSetArg (av[ac], XtNtopShadowPixel, pixel); |
| 4580 | ++ac; | 4579 | ++ac; |
| 4581 | } | 4580 | } |
| 4582 | pixel = f->output_data.x->scroll_bar_bottom_shadow_pixel; | 4581 | pixel = f->output_data.x->scroll_bar_bottom_shadow_pixel; |
| 4583 | if (pixel != -1) | 4582 | if (pixel != -1) |
| 4584 | { | 4583 | { |
| 4585 | XtSetArg (av[ac], "bottomShadowPixel", pixel); | 4584 | XtSetArg (av[ac], XtNbottomShadowPixel, pixel); |
| 4586 | ++ac; | 4585 | ++ac; |
| 4587 | } | 4586 | } |
| 4588 | } | 4587 | } |
| 4588 | #endif | ||
| 4589 | 4589 | ||
| 4590 | widget = XtCreateWidget (scroll_bar_name, scrollbarWidgetClass, | 4590 | widget = XtCreateWidget (scroll_bar_name, scrollbarWidgetClass, |
| 4591 | f->output_data.x->edit_widget, av, ac); | 4591 | f->output_data.x->edit_widget, av, ac); |
| @@ -4731,30 +4731,11 @@ x_set_toolkit_scroll_bar_thumb (bar, portion, position, whole) | |||
| 4731 | XawScrollbarSetThumb (widget, top, shown); | 4731 | XawScrollbarSetThumb (widget, top, shown); |
| 4732 | else | 4732 | else |
| 4733 | { | 4733 | { |
| 4734 | #ifdef HAVE_XAW3D | ||
| 4735 | ScrollbarWidget sb = (ScrollbarWidget) widget; | ||
| 4736 | int scroll_mode = 0; | ||
| 4737 | |||
| 4738 | /* `scroll_mode' only exists with Xaw3d + ARROW_SCROLLBAR. */ | ||
| 4739 | if (xaw3d_arrow_scroll) | ||
| 4740 | { | ||
| 4741 | /* Xaw3d stupidly ignores resize requests while dragging | ||
| 4742 | so we have to make it believe it's not in dragging mode. */ | ||
| 4743 | scroll_mode = sb->scrollbar.scroll_mode; | ||
| 4744 | if (scroll_mode == 2) | ||
| 4745 | sb->scrollbar.scroll_mode = 0; | ||
| 4746 | } | ||
| 4747 | #endif | ||
| 4748 | /* Try to make the scrolling a tad smoother. */ | 4734 | /* Try to make the scrolling a tad smoother. */ |
| 4749 | if (!xaw3d_pick_top) | 4735 | if (!xaw3d_pick_top) |
| 4750 | shown = min (shown, old_shown); | 4736 | shown = min (shown, old_shown); |
| 4751 | 4737 | ||
| 4752 | XawScrollbarSetThumb (widget, top, shown); | 4738 | XawScrollbarSetThumb (widget, top, shown); |
| 4753 | |||
| 4754 | #ifdef HAVE_XAW3D | ||
| 4755 | if (xaw3d_arrow_scroll && scroll_mode == 2) | ||
| 4756 | sb->scrollbar.scroll_mode = scroll_mode; | ||
| 4757 | #endif | ||
| 4758 | } | 4739 | } |
| 4759 | } | 4740 | } |
| 4760 | } | 4741 | } |