diff options
| author | Richard M. Stallman | 2004-11-20 14:04:16 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2004-11-20 14:04:16 +0000 |
| commit | 41a3329543bb4a4b4bf36e713587a629bae8b655 (patch) | |
| tree | 2eaa72d9c26db64975160388ae592ffb1571654d /src | |
| parent | 9173d58546ed9b673077ff5a4b29234300c28953 (diff) | |
| download | emacs-41a3329543bb4a4b4bf36e713587a629bae8b655.tar.gz emacs-41a3329543bb4a4b4bf36e713587a629bae8b655.zip | |
(Vsearch_spaces_regexp):
Renamed from Vsearch_whitespace_regexp. All uses changed.
Diffstat (limited to 'src')
| -rw-r--r-- | src/search.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/search.c b/src/search.c index d3287ee4c02..56611ca7af8 100644 --- a/src/search.c +++ b/src/search.c | |||
| @@ -83,7 +83,7 @@ static Lisp_Object last_thing_searched; | |||
| 83 | 83 | ||
| 84 | Lisp_Object Qinvalid_regexp; | 84 | Lisp_Object Qinvalid_regexp; |
| 85 | 85 | ||
| 86 | Lisp_Object Vsearch_whitespace_regexp; | 86 | Lisp_Object Vsearch_spaces_regexp; |
| 87 | 87 | ||
| 88 | static void set_search_regs (); | 88 | static void set_search_regs (); |
| 89 | static void save_search_regs (); | 89 | static void save_search_regs (); |
| @@ -111,7 +111,7 @@ matcher_overflow () | |||
| 111 | PATTERN. 0 means all multibyte characters are recognized just as | 111 | PATTERN. 0 means all multibyte characters are recognized just as |
| 112 | sequences of binary data. | 112 | sequences of binary data. |
| 113 | 113 | ||
| 114 | The behavior also depends on Vsearch_whitespace_regexp. */ | 114 | The behavior also depends on Vsearch_spaces_regexp. */ |
| 115 | 115 | ||
| 116 | static void | 116 | static void |
| 117 | compile_pattern_1 (cp, pattern, translate, regp, posix, multibyte) | 117 | compile_pattern_1 (cp, pattern, translate, regp, posix, multibyte) |
| @@ -162,13 +162,13 @@ compile_pattern_1 (cp, pattern, translate, regp, posix, multibyte) | |||
| 162 | cp->buf.translate = (! NILP (translate) ? translate : make_number (0)); | 162 | cp->buf.translate = (! NILP (translate) ? translate : make_number (0)); |
| 163 | cp->posix = posix; | 163 | cp->posix = posix; |
| 164 | cp->buf.multibyte = multibyte; | 164 | cp->buf.multibyte = multibyte; |
| 165 | cp->whitespace_regexp = Vsearch_whitespace_regexp; | 165 | cp->whitespace_regexp = Vsearch_spaces_regexp; |
| 166 | BLOCK_INPUT; | 166 | BLOCK_INPUT; |
| 167 | old = re_set_syntax (RE_SYNTAX_EMACS | 167 | old = re_set_syntax (RE_SYNTAX_EMACS |
| 168 | | (posix ? 0 : RE_NO_POSIX_BACKTRACKING)); | 168 | | (posix ? 0 : RE_NO_POSIX_BACKTRACKING)); |
| 169 | 169 | ||
| 170 | re_set_whitespace_regexp (NILP (Vsearch_whitespace_regexp) ? NULL | 170 | re_set_whitespace_regexp (NILP (Vsearch_spaces_regexp) ? NULL |
| 171 | : SDATA (Vsearch_whitespace_regexp)); | 171 | : SDATA (Vsearch_spaces_regexp)); |
| 172 | 172 | ||
| 173 | val = (char *) re_compile_pattern ((char *)raw_pattern, | 173 | val = (char *) re_compile_pattern ((char *)raw_pattern, |
| 174 | raw_pattern_size, &cp->buf); | 174 | raw_pattern_size, &cp->buf); |
| @@ -236,7 +236,7 @@ compile_pattern (pattern, regp, translate, posix, multibyte) | |||
| 236 | && EQ (cp->buf.translate, (! NILP (translate) ? translate : make_number (0))) | 236 | && EQ (cp->buf.translate, (! NILP (translate) ? translate : make_number (0))) |
| 237 | && cp->posix == posix | 237 | && cp->posix == posix |
| 238 | && cp->buf.multibyte == multibyte | 238 | && cp->buf.multibyte == multibyte |
| 239 | && !NILP (Fequal (cp->whitespace_regexp, Vsearch_whitespace_regexp))) | 239 | && !NILP (Fequal (cp->whitespace_regexp, Vsearch_spaces_regexp))) |
| 240 | break; | 240 | break; |
| 241 | 241 | ||
| 242 | /* If we're at the end of the cache, compile into the nil cell | 242 | /* If we're at the end of the cache, compile into the nil cell |
| @@ -1064,7 +1064,7 @@ search_buffer (string, pos, pos_byte, lim, lim_byte, n, | |||
| 1064 | return pos; | 1064 | return pos; |
| 1065 | } | 1065 | } |
| 1066 | 1066 | ||
| 1067 | if (RE && !(trivial_regexp_p (string) && NILP (Vsearch_whitespace_regexp))) | 1067 | if (RE && !(trivial_regexp_p (string) && NILP (Vsearch_spaces_regexp))) |
| 1068 | { | 1068 | { |
| 1069 | unsigned char *p1, *p2; | 1069 | unsigned char *p1, *p2; |
| 1070 | int s1, s2; | 1070 | int s1, s2; |
| @@ -3012,13 +3012,13 @@ syms_of_search () | |||
| 3012 | saved_last_thing_searched = Qnil; | 3012 | saved_last_thing_searched = Qnil; |
| 3013 | staticpro (&saved_last_thing_searched); | 3013 | staticpro (&saved_last_thing_searched); |
| 3014 | 3014 | ||
| 3015 | DEFVAR_LISP ("search-whitespace-regexp", &Vsearch_whitespace_regexp, | 3015 | DEFVAR_LISP ("search-spaces-regexp", &Vsearch_spaces_regexp, |
| 3016 | /* doc: Regexp to substitute for bunches of spaces in regexp search. | 3016 | /* doc: Regexp to substitute for bunches of spaces in regexp search. |
| 3017 | Some commands use this for user-specified regexps. | 3017 | Some commands use this for user-specified regexps. |
| 3018 | Spaces that occur inside character classes or repetition operators | 3018 | Spaces that occur inside character classes or repetition operators |
| 3019 | or other such regexp constructs are not replaced with this. | 3019 | or other such regexp constructs are not replaced with this. |
| 3020 | A value of nil (which is the normal value) means treat spaces literally. */); | 3020 | A value of nil (which is the normal value) means treat spaces literally. */); |
| 3021 | Vsearch_whitespace_regexp = Qnil; | 3021 | Vsearch_spaces_regexp = Qnil; |
| 3022 | 3022 | ||
| 3023 | defsubr (&Slooking_at); | 3023 | defsubr (&Slooking_at); |
| 3024 | defsubr (&Sposix_looking_at); | 3024 | defsubr (&Sposix_looking_at); |