summaryrefslogtreecommitdiff
path: root/src/search.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2016-11-04 15:02:03 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2016-11-04 15:02:03 -0700
commitae0a1a890ec7b885e85cd945a21ca42fed80df3d (patch)
tree495f1d851cb3a43a0e677bff9c09d4211a35fbde /src/search.c
parent66b5222c3cd72839bf72e0b2a03912719c930451 (diff)
parentacae275b2752357497a2411876b83240ce7c8aec (diff)
downloademacs-ae0a1a890ec7b885e85cd945a21ca42fed80df3d.tar.gz
emacs-ae0a1a890ec7b885e85cd945a21ca42fed80df3d.tar.bz2
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.c9
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,
cursor += dirlen - i - direction; /* fix cursor */
if (i + direction == 0)
{
- ptrdiff_t position, start, end, cursor_off;
+ ptrdiff_t position, start, end;
+#ifdef REL_ALLOC
+ ptrdiff_t cursor_off;
+#endif
cursor -= direction;
position = pos_byte + cursor - p2 + ((direction > 0)
? 1 - len_byte : 0);
+#ifdef REL_ALLOC
/* set_search_regs might call malloc, which could
cause ralloc.c relocate buffer text. We need to
update pointers into buffer text due to that. */
cursor_off = cursor - p2;
+#endif
set_search_regs (position, len_byte);
+#ifdef REL_ALLOC
p_limit = BYTE_POS_ADDR (limit);
p2 = BYTE_POS_ADDR (pos_byte);
cursor = p2 + cursor_off;
+#endif
if (NILP (Vinhibit_changing_match_data))
{