1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-30 17:10:51 -08:00
Commit graph

136 commits

Author SHA1 Message Date
Kenichi Handa
1312cff577 (skip_chars): If enable-multibyte-characters is nil,
don't handle multibyte characters.
1997-02-27 06:50:46 +00:00
Karl Heuer
f73d78a2f4 Fix previous change. 1997-02-23 22:49:18 +00:00
Karl Heuer
5679531d6c Include category.h and charset.h.
(compile_pattern_1): Handle new argument `multibyte'.
(compile_pattern): Handle the flag `enable-multibyte-characters'.
(Vascii_downcase_table): Declare external.
(fast_string_match_ignore_case): New function.
(skip_chars): Handle multibyte characters.
(trivial_regexp_p): Handle regular expression "\\Cc" and "\\CC"
for category.
1997-02-20 07:26:24 +00:00
Richard M. Stallman
5caa45d38a (skip_chars): Optimize by not calling SET_PT in the loop. 1997-01-19 01:28:07 +00:00
Richard M. Stallman
8ca821e9f8 (Fmatch_data): Doc fix. 1996-12-19 08:11:56 +00:00
Richard M. Stallman
56256c2a0c (Fmatch_data): New args INTEGERS and REUSE. 1996-12-18 23:35:48 +00:00
Richard M. Stallman
1d288aefee (REGEXP_CACHE_SIZE): Increase to 20.
(compile_pattern): Check for size match before calling Fstring_equal.
1996-09-22 04:38:10 +00:00
Richard M. Stallman
45b248b417 (search_buffer): Use EMACS_UINT. 1996-09-10 19:50:56 +00:00
Karl Heuer
6ec8bbd20d Change all references from point to PT. 1996-09-01 19:15:05 +00:00
Karl Heuer
c36bcf1b4a (Fmatch_data): If no matching done yet, return Qnil. 1996-07-14 00:06:09 +00:00
Erik Naggum
3b7ad313e0 Update FSF's address in the preamble. 1996-01-15 09:18:04 +00:00
Erik Naggum
5806161b4f (Fmatch_end, Fregexp_quote): Harmonize arguments with documentation. 1996-01-09 00:33:47 +00:00
Karl Heuer
8e6208c5d2 Comment fixes. 1996-01-05 10:03:17 +00:00
Richard M. Stallman
24b704fa6e (string_match_1): Pass the POSIX arg to compile_pattern. 1995-10-25 19:33:48 +00:00
Richard M. Stallman
b1428bd860 (compile_pattern_1, compile_pattern, search_buffer):
Case tables are char-tables now.
1995-10-18 23:30:32 +00:00
Richard M. Stallman
d7a5ad5f87 (Freplace_match): New arg SUBEXP. 1995-08-08 21:20:07 +00:00
Karl Heuer
7c938215cd Update GPL to version 2. 1995-06-15 20:42:24 +00:00
Karl Heuer
1e79ec2421 (Freplace_match): Do the right thing with backslash. 1995-06-09 01:10:11 +00:00
Karl Heuer
ad10348f71 (Freplace_match): Fix check for valid reg in string replace. 1995-06-09 01:07:18 +00:00
Karl Heuer
2b2eead989 (Freplace_match): Calls to upcase_initials and upcase_initials_region changed
to Fupcase_initials and Fupcase_initials_region for consistency.
1995-06-06 01:48:53 +00:00
Karl Heuer
866f60fd75 (trivial_regexp_p): = is special after \. 1995-06-05 12:32:41 +00:00
Richard M. Stallman
9fa17f9304 (search_buffer): Cast p_limit to EMACS_INT not int. 1995-05-04 16:17:44 +00:00
Richard M. Stallman
8d50503997 (search_buffer): Avoid casting trt to int.
Use EMACS_INT for comparing pointers.
1995-04-07 18:46:21 +00:00
Richard M. Stallman
94f9497203 (Flooking_at, Fposix_looking_at): Change arg name. 1995-04-06 05:18:35 +00:00
Richard M. Stallman
2d4a771aad (set_search_regs): Really set search_regs.start and .end.
(save_search_regs): Set them to 0 here.
1994-12-25 21:15:07 +00:00
Richard M. Stallman
6639708c3d (compile_pattern): Call re_set_registers here.
And no need to BLOCK_INPUT for that.
(compile_pattern_1): Instead of here.
1994-12-11 08:26:27 +00:00
Richard M. Stallman
75ebf74b48 (search_regs_saved): Delete initializer. 1994-12-07 13:03:48 +00:00
Richard M. Stallman
044f81f10f (save_search_regs): Add declaration. 1994-11-22 23:33:01 +00:00
Francesco Potortì
7074fde664 Added code for automatically saving and restoring the match data
when a filter or sentinel tries to modify it.
1994-11-21 12:50:27 +00:00
Richard M. Stallman
b819a39025 (struct regexp_cache): New field `posix'.
(compile_pattern_1): New arg `posix'.  Controls the syntax spec
for parsing; also record it in the cache.
(compile_pattern): New arg `posix'.
(looking_at_1, string_match_1, fast_string_match): Pass 0 for new arg.
(search_buffer): New arg `posix'.  Now static.
(search_command): New arg `posix'.  All callers changed.
(Fposix_search_forward, Fposix_search_backward): New functions.
(string_match_1, looking_at_1): New subroutines broken out.
(Fstring_match, Flooking_at): Use them.
(Fposix_string_match, Fposix_looking_at): New functions.
(syms_of_search): defsubr new functions.
1994-11-19 10:00:14 +00:00
Karl Heuer
487282dc64 (searchbufs): New variable, replaces searchbuf and last_regexp and
search_fastmap.
(syms_of_search): Initialize it.
(searchbuf_head): New variable.
(compile_pattern_1): Renamed from compile_pattern and made static.
Copy the regexp string in case the caller modifies it in place later.
(compile_pattern): New code, uses a cached entry if one is available.
The pattern buffer is now a return value instead of an arg.
(set_search_regs): Set num_regs directly, since there's no active
pattern buffer to pass to re_set_registers.
(Fstore_match_data): Likewise.
(Flooking_at): Use the new calling convention for compile_pattern.
(Fstring_match, fast_string_match, search_buffer): Likewise.
1994-10-19 04:51:45 +00:00
Jim Blandy
cbe0db0d89 (scan_buffer): After temporarily turning immediate_quit off, turn it
back on by setting it to allow_quit, never 1.

(find_before_next_newline): Declare the arguments' types explicitly;
don't let them default to int.
1994-10-11 19:44:27 +00:00
Jim Blandy
9169c321e5 * search.c: #include "region-cache.h".
(max, min): Make these functions, not macros; we'd like to pass
them arguments that would be bad to evaluate more than once.
(newline_cache_on_off): New function.
(scan_buffer): New argument END.  Call newline_cache_on_off.  If
this buffer's newline cache is enabled, consult it to see if we
need to scan a region for newlines, and store information in the
cache after doing so.
(find_next_newline): Pass new arg to scan_buffer.
(find_before_next_newline): New function.
1994-10-08 22:15:15 +00:00
Karl Heuer
c235cce703 (skip_chars, Fmatch_data, Fstore_match_data): Don't use XFASTINT as an lvalue. 1994-10-04 16:12:32 +00:00
Karl Heuer
a3668d9258 (Flooking_at, skip_chars, search_buffer, set_search_regs, Fstore_match_data):
Use new accessor macros instead of calling XSET directly.
1994-10-04 12:22:12 +00:00
Karl Heuer
0ed62dc799 (Fmatch_data, Fstore_match_data): Use type test macros. 1994-09-27 01:24:44 +00:00
Richard M. Stallman
080c45fd0b (Freplace_match): New 4th arg OBJECT can specify string to replace in. 1994-09-23 22:18:59 +00:00
Karl Heuer
b6d6a51cfb (trivial_regexp_p): New function.
(search_buffer): Don't depend on internal format of re_pattern_buffer.
1994-09-20 05:40:52 +00:00
Karl Heuer
26faf9f443 (Fstring_match): Fix sign error. 1994-08-23 00:33:29 +00:00
Richard M. Stallman
208767c32d (Freplace_match): Treat caseless initial like a lowercase initial. 1994-08-11 22:57:20 +00:00
Richard M. Stallman
63fa018d4c (find_next_newline_no_quit): New function. 1994-06-14 21:54:45 +00:00
Richard M. Stallman
784450462f (Freplace_match): Be sure not to treat non-digit like digit. 1994-06-11 21:53:09 +00:00
Karl Heuer
73dc877110 (Freplace_match): Improve capitalization heuristics. 1994-05-25 03:59:06 +00:00
Richard M. Stallman
026e833080 (Freplace_match): Don't capitalize unless all matched words are capitalized. 1994-05-25 03:53:30 +00:00
Karl Heuer
3a22ee3595 Update copyright. 1994-05-04 02:41:09 +00:00
Karl Heuer
c4d460ce6b (Freplace_match): Don't capitalize unless all matched words are capitalized. 1994-04-05 04:51:58 +00:00
Richard M. Stallman
5b9cf4b2e0 (Freplace_match): Doc fix. 1994-03-27 07:51:45 +00:00
Karl Heuer
b2c71fb43c (search_buffer): Avoid boolean/integer mixing that confuses some compilers. 1994-03-14 21:44:12 +00:00
Karl Heuer
19c0a7309d (Fre_search_forward, Fre_search_backward): Doc fix. 1994-03-10 22:55:04 +00:00
Richard M. Stallman
9239c6c1ee (skip_chars): Treat `-' as alias for space, if syntaxp. 1994-03-04 04:42:04 +00:00