diff options
| author | Paul Eggert | 2016-11-04 15:02:03 -0700 |
|---|---|---|
| committer | Paul Eggert | 2016-11-04 15:02:03 -0700 |
| commit | ae0a1a890ec7b885e85cd945a21ca42fed80df3d (patch) | |
| tree | 495f1d851cb3a43a0e677bff9c09d4211a35fbde /src/search.c | |
| parent | 66b5222c3cd72839bf72e0b2a03912719c930451 (diff) | |
| parent | acae275b2752357497a2411876b83240ce7c8aec (diff) | |
| download | emacs-ae0a1a890ec7b885e85cd945a21ca42fed80df3d.tar.gz emacs-ae0a1a890ec7b885e85cd945a21ca42fed80df3d.zip | |
Merge from origin/emacs-25
acae275 ; Spelling fixes
d8fac73 Update README for precompiled windows Emacs.
23570fd Clarify documentation of 'vc-responsible-backend' wrt symlinks
f708cb2 Clarify doc string of 'transpose-sexps'
cd05b1d Fix docstring of 'browse-url-firefox-new-window-is-tab'
bdc89eb Improve documentation of 'font-lock-remove-keywords'
4a0c590 Fix documentation of the command summary key
0221b7a Mark relocation workarounds with REL_ALLOC
Diffstat (limited to 'src/search.c')
| -rw-r--r-- | src/search.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/search.c b/src/search.c index 25d81f2baf6..e597c33a0fb 100644 --- a/src/search.c +++ b/src/search.c | |||
| @@ -2022,20 +2022,27 @@ boyer_moore (EMACS_INT n, unsigned char *base_pat, | |||
| 2022 | cursor += dirlen - i - direction; /* fix cursor */ | 2022 | cursor += dirlen - i - direction; /* fix cursor */ |
| 2023 | if (i + direction == 0) | 2023 | if (i + direction == 0) |
| 2024 | { | 2024 | { |
| 2025 | ptrdiff_t position, start, end, cursor_off; | 2025 | ptrdiff_t position, start, end; |
| 2026 | #ifdef REL_ALLOC | ||
| 2027 | ptrdiff_t cursor_off; | ||
| 2028 | #endif | ||
| 2026 | 2029 | ||
| 2027 | cursor -= direction; | 2030 | cursor -= direction; |
| 2028 | 2031 | ||
| 2029 | position = pos_byte + cursor - p2 + ((direction > 0) | 2032 | position = pos_byte + cursor - p2 + ((direction > 0) |
| 2030 | ? 1 - len_byte : 0); | 2033 | ? 1 - len_byte : 0); |
| 2034 | #ifdef REL_ALLOC | ||
| 2031 | /* set_search_regs might call malloc, which could | 2035 | /* set_search_regs might call malloc, which could |
| 2032 | cause ralloc.c relocate buffer text. We need to | 2036 | cause ralloc.c relocate buffer text. We need to |
| 2033 | update pointers into buffer text due to that. */ | 2037 | update pointers into buffer text due to that. */ |
| 2034 | cursor_off = cursor - p2; | 2038 | cursor_off = cursor - p2; |
| 2039 | #endif | ||
| 2035 | set_search_regs (position, len_byte); | 2040 | set_search_regs (position, len_byte); |
| 2041 | #ifdef REL_ALLOC | ||
| 2036 | p_limit = BYTE_POS_ADDR (limit); | 2042 | p_limit = BYTE_POS_ADDR (limit); |
| 2037 | p2 = BYTE_POS_ADDR (pos_byte); | 2043 | p2 = BYTE_POS_ADDR (pos_byte); |
| 2038 | cursor = p2 + cursor_off; | 2044 | cursor = p2 + cursor_off; |
| 2045 | #endif | ||
| 2039 | 2046 | ||
| 2040 | if (NILP (Vinhibit_changing_match_data)) | 2047 | if (NILP (Vinhibit_changing_match_data)) |
| 2041 | { | 2048 | { |