aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefan Monnier2013-05-21 17:48:52 -0400
committerStefan Monnier2013-05-21 17:48:52 -0400
commitfc30d803f4325ebf67eee72a5a98100f01f6b182 (patch)
tree9c0d1e02511a25874c6979babb918a90fe30d063 /src
parentc2d41179e1121ad6f6e61962a06c31229f7b8af7 (diff)
downloademacs-fc30d803f4325ebf67eee72a5a98100f01f6b182.tar.gz
emacs-fc30d803f4325ebf67eee72a5a98100f01f6b182.zip
* src/search.c (looking_at_1): Only set last_thing_searched if the match
changed the match-data. Fixes: debbugs:14281
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog13
-rw-r--r--src/search.c12
2 files changed, 15 insertions, 10 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index f9925abb9ef..919f94d0fbb 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12013-05-21 Barry OReilly <gundaetiapo@gmail.com>
2
3 * search.c (looking_at_1): Only set last_thing_searched if the match
4 changed the match-data (bug#14281).
5
12013-05-21 Dmitry Antipov <dmantipov@yandex.ru> 62013-05-21 Dmitry Antipov <dmantipov@yandex.ru>
2 7
3 * xdisp.c (reseat_at_previous_visible_line_start): 8 * xdisp.c (reseat_at_previous_visible_line_start):
@@ -8,8 +13,8 @@
8 13
9 * xfns.c (check_x_display_info): Don't use XINT for terminal object. 14 * xfns.c (check_x_display_info): Don't use XINT for terminal object.
10 (Fx_display_pixel_width, Fx_display_pixel_height) 15 (Fx_display_pixel_width, Fx_display_pixel_height)
11 (Fx_display_mm_width, Fx_display_mm_height): Mention 16 (Fx_display_mm_width, Fx_display_mm_height):
12 `display-monitor-attributes-list' in docstrings. 17 Mention `display-monitor-attributes-list' in docstrings.
13 18
14 * nsfns.m (ns_get_screen): Remove function. All uses removed. 19 * nsfns.m (ns_get_screen): Remove function. All uses removed.
15 (check_ns_display_info): Sync with check_x_display_info in xfns.c. 20 (check_ns_display_info): Sync with check_x_display_info in xfns.c.
@@ -25,8 +30,8 @@
25 (Fx_display_pixel_width, Fx_display_pixel_width): Return width or 30 (Fx_display_pixel_width, Fx_display_pixel_width): Return width or
26 height for all physical monitors as in X11. 31 height for all physical monitors as in X11.
27 32
28 * nsterm.m (x_display_pixel_width, x_display_pixel_height): Return 33 * nsterm.m (x_display_pixel_width, x_display_pixel_height):
29 pixel width or height for all physical monitors as in X11. 34 Return pixel width or height for all physical monitors as in X11.
30 35
312013-05-18 Paul Eggert <eggert@cs.ucla.edu> 362013-05-18 Paul Eggert <eggert@cs.ucla.edu>
32 37
diff --git a/src/search.c b/src/search.c
index ea36133deb7..8b4d39c7811 100644
--- a/src/search.c
+++ b/src/search.c
@@ -328,18 +328,18 @@ looking_at_1 (Lisp_Object string, bool posix)
328 328
329 val = (i >= 0 ? Qt : Qnil); 329 val = (i >= 0 ? Qt : Qnil);
330 if (NILP (Vinhibit_changing_match_data) && i >= 0) 330 if (NILP (Vinhibit_changing_match_data) && i >= 0)
331 {
331 for (i = 0; i < search_regs.num_regs; i++) 332 for (i = 0; i < search_regs.num_regs; i++)
332 if (search_regs.start[i] >= 0) 333 if (search_regs.start[i] >= 0)
333 { 334 {
334 search_regs.start[i] 335 search_regs.start[i]
335 = BYTE_TO_CHAR (search_regs.start[i] + BEGV_BYTE); 336 = BYTE_TO_CHAR (search_regs.start[i] + BEGV_BYTE);
336 search_regs.end[i] 337 search_regs.end[i]
337 = BYTE_TO_CHAR (search_regs.end[i] + BEGV_BYTE); 338 = BYTE_TO_CHAR (search_regs.end[i] + BEGV_BYTE);
338 } 339 }
339 340 /* Set last_thing_searched only when match data is changed. */
340 /* Set last_thing_searched only when match data is changed. */
341 if (NILP (Vinhibit_changing_match_data))
342 XSETBUFFER (last_thing_searched, current_buffer); 341 XSETBUFFER (last_thing_searched, current_buffer);
342 }
343 343
344 return val; 344 return val;
345} 345}