diff options
Diffstat (limited to 'src/search.c')
| -rw-r--r-- | src/search.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/search.c b/src/search.c index e597c33a0fb..9d2c8cb04fd 100644 --- a/src/search.c +++ b/src/search.c | |||
| @@ -40,7 +40,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 40 | struct regexp_cache | 40 | struct regexp_cache |
| 41 | { | 41 | { |
| 42 | struct regexp_cache *next; | 42 | struct regexp_cache *next; |
| 43 | Lisp_Object regexp, whitespace_regexp; | 43 | Lisp_Object regexp, f_whitespace_regexp; |
| 44 | /* Syntax table for which the regexp applies. We need this because | 44 | /* Syntax table for which the regexp applies. We need this because |
| 45 | of character classes. If this is t, then the compiled pattern is valid | 45 | of character classes. If this is t, then the compiled pattern is valid |
| 46 | for any syntax-table. */ | 46 | for any syntax-table. */ |
| @@ -75,12 +75,12 @@ static struct regexp_cache *searchbuf_head; | |||
| 75 | to call re_set_registers after compiling a new pattern or after | 75 | to call re_set_registers after compiling a new pattern or after |
| 76 | setting the match registers, so that the regex functions will be | 76 | setting the match registers, so that the regex functions will be |
| 77 | able to free or re-allocate it properly. */ | 77 | able to free or re-allocate it properly. */ |
| 78 | static struct re_registers search_regs; | 78 | /* static struct re_registers search_regs; */ |
| 79 | 79 | ||
| 80 | /* The buffer in which the last search was performed, or | 80 | /* The buffer in which the last search was performed, or |
| 81 | Qt if the last search was done in a string; | 81 | Qt if the last search was done in a string; |
| 82 | Qnil if no searching has been done yet. */ | 82 | Qnil if no searching has been done yet. */ |
| 83 | static Lisp_Object last_thing_searched; | 83 | /* static Lisp_Object last_thing_searched; */ |
| 84 | 84 | ||
| 85 | static void set_search_regs (ptrdiff_t, ptrdiff_t); | 85 | static void set_search_regs (ptrdiff_t, ptrdiff_t); |
| 86 | static void save_search_regs (void); | 86 | static void save_search_regs (void); |
| @@ -122,9 +122,9 @@ compile_pattern_1 (struct regexp_cache *cp, Lisp_Object pattern, | |||
| 122 | cp->buf.multibyte = STRING_MULTIBYTE (pattern); | 122 | cp->buf.multibyte = STRING_MULTIBYTE (pattern); |
| 123 | cp->buf.charset_unibyte = charset_unibyte; | 123 | cp->buf.charset_unibyte = charset_unibyte; |
| 124 | if (STRINGP (Vsearch_spaces_regexp)) | 124 | if (STRINGP (Vsearch_spaces_regexp)) |
| 125 | cp->whitespace_regexp = Vsearch_spaces_regexp; | 125 | cp->f_whitespace_regexp = Vsearch_spaces_regexp; |
| 126 | else | 126 | else |
| 127 | cp->whitespace_regexp = Qnil; | 127 | cp->f_whitespace_regexp = Qnil; |
| 128 | 128 | ||
| 129 | /* rms: I think BLOCK_INPUT is not needed here any more, | 129 | /* rms: I think BLOCK_INPUT is not needed here any more, |
| 130 | because regex.c defines malloc to call xmalloc. | 130 | because regex.c defines malloc to call xmalloc. |
| @@ -217,7 +217,7 @@ compile_pattern (Lisp_Object pattern, struct re_registers *regp, | |||
| 217 | && cp->posix == posix | 217 | && cp->posix == posix |
| 218 | && (EQ (cp->syntax_table, Qt) | 218 | && (EQ (cp->syntax_table, Qt) |
| 219 | || EQ (cp->syntax_table, BVAR (current_buffer, syntax_table))) | 219 | || EQ (cp->syntax_table, BVAR (current_buffer, syntax_table))) |
| 220 | && !NILP (Fequal (cp->whitespace_regexp, Vsearch_spaces_regexp)) | 220 | && !NILP (Fequal (cp->f_whitespace_regexp, Vsearch_spaces_regexp)) |
| 221 | && cp->buf.charset_unibyte == charset_unibyte) | 221 | && cp->buf.charset_unibyte == charset_unibyte) |
| 222 | break; | 222 | break; |
| 223 | 223 | ||
| @@ -3089,9 +3089,9 @@ If optional arg RESEAT is non-nil, make markers on LIST point nowhere. */) | |||
| 3089 | 3089 | ||
| 3090 | /* If true the match data have been saved in saved_search_regs | 3090 | /* If true the match data have been saved in saved_search_regs |
| 3091 | during the execution of a sentinel or filter. */ | 3091 | during the execution of a sentinel or filter. */ |
| 3092 | static bool search_regs_saved; | 3092 | /* static bool search_regs_saved; */ |
| 3093 | static struct re_registers saved_search_regs; | 3093 | /* static struct re_registers saved_search_regs; */ |
| 3094 | static Lisp_Object saved_last_thing_searched; | 3094 | /* static Lisp_Object saved_last_thing_searched; */ |
| 3095 | 3095 | ||
| 3096 | /* Called from Flooking_at, Fstring_match, search_buffer, Fstore_match_data | 3096 | /* Called from Flooking_at, Fstring_match, search_buffer, Fstore_match_data |
| 3097 | if asynchronous code (filter or sentinel) is running. */ | 3097 | if asynchronous code (filter or sentinel) is running. */ |
| @@ -3401,10 +3401,10 @@ syms_of_search (void) | |||
| 3401 | searchbufs[i].buf.buffer = xmalloc (100); | 3401 | searchbufs[i].buf.buffer = xmalloc (100); |
| 3402 | searchbufs[i].buf.fastmap = searchbufs[i].fastmap; | 3402 | searchbufs[i].buf.fastmap = searchbufs[i].fastmap; |
| 3403 | searchbufs[i].regexp = Qnil; | 3403 | searchbufs[i].regexp = Qnil; |
| 3404 | searchbufs[i].whitespace_regexp = Qnil; | 3404 | searchbufs[i].f_whitespace_regexp = Qnil; |
| 3405 | searchbufs[i].syntax_table = Qnil; | 3405 | searchbufs[i].syntax_table = Qnil; |
| 3406 | staticpro (&searchbufs[i].regexp); | 3406 | staticpro (&searchbufs[i].regexp); |
| 3407 | staticpro (&searchbufs[i].whitespace_regexp); | 3407 | staticpro (&searchbufs[i].f_whitespace_regexp); |
| 3408 | staticpro (&searchbufs[i].syntax_table); | 3408 | staticpro (&searchbufs[i].syntax_table); |
| 3409 | searchbufs[i].next = (i == REGEXP_CACHE_SIZE-1 ? 0 : &searchbufs[i+1]); | 3409 | searchbufs[i].next = (i == REGEXP_CACHE_SIZE-1 ? 0 : &searchbufs[i+1]); |
| 3410 | } | 3410 | } |