summaryrefslogtreecommitdiff
path: root/src/search.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/search.c')
-rw-r--r--src/search.c60
1 files changed, 20 insertions, 40 deletions
diff --git a/src/search.c b/src/search.c
index a57136fc3fa..4f8b801c122 100644
--- a/src/search.c
+++ b/src/search.c
@@ -362,8 +362,7 @@ DEFUN ("looking-at", Flooking_at, Slooking_at, 1, 1, 0,
This function modifies the match data that `match-beginning',
`match-end' and `match-data' access; save and restore the match
data if you want to preserve them. */)
- (regexp)
- Lisp_Object regexp;
+ (Lisp_Object regexp)
{
return looking_at_1 (regexp, 0);
}
@@ -374,8 +373,7 @@ Find the longest match, in accord with Posix regular expression rules.
This function modifies the match data that `match-beginning',
`match-end' and `match-data' access; save and restore the match
data if you want to preserve them. */)
- (regexp)
- Lisp_Object regexp;
+ (Lisp_Object regexp)
{
return looking_at_1 (regexp, 1);
}
@@ -461,8 +459,7 @@ matched by parenthesis constructs in the pattern.
You can use the function `match-string' to extract the substrings
matched by the parenthesis constructions in REGEXP. */)
- (regexp, string, start)
- Lisp_Object regexp, string, start;
+ (Lisp_Object regexp, Lisp_Object string, Lisp_Object start)
{
return string_match_1 (regexp, string, start, 0);
}
@@ -475,8 +472,7 @@ If third arg START is non-nil, start search at that index in STRING.
For index of first char beyond the match, do (match-end 0).
`match-end' and `match-beginning' also give indices of substrings
matched by parenthesis constructs in the pattern. */)
- (regexp, string, start)
- Lisp_Object regexp, string, start;
+ (Lisp_Object regexp, Lisp_Object string, Lisp_Object start)
{
return string_match_1 (regexp, string, start, 1);
}
@@ -2216,8 +2212,7 @@ Search case-sensitivity is determined by the value of the variable
`case-fold-search', which see.
See also the functions `match-beginning', `match-end' and `replace-match'. */)
- (string, bound, noerror, count)
- Lisp_Object string, bound, noerror, count;
+ (Lisp_Object string, Lisp_Object bound, Lisp_Object noerror, Lisp_Object count)
{
return search_command (string, bound, noerror, count, -1, 0, 0);
}
@@ -2236,8 +2231,7 @@ Search case-sensitivity is determined by the value of the variable
`case-fold-search', which see.
See also the functions `match-beginning', `match-end' and `replace-match'. */)
- (string, bound, noerror, count)
- Lisp_Object string, bound, noerror, count;
+ (Lisp_Object string, Lisp_Object bound, Lisp_Object noerror, Lisp_Object count)
{
return search_command (string, bound, noerror, count, 1, 0, 0);
}
@@ -2251,8 +2245,7 @@ The match found must not extend before that position.
Optional third argument, if t, means if fail just return nil (no error).
If not nil and not t, move to limit of search and return nil.
Optional fourth argument is repeat count--search for successive occurrences. */)
- (string, bound, noerror, count)
- Lisp_Object string, bound, noerror, count;
+ (Lisp_Object string, Lisp_Object bound, Lisp_Object noerror, Lisp_Object count)
{
return search_command (wordify (string, 0), bound, noerror, count, -1, 1, 0);
}
@@ -2266,8 +2259,7 @@ The match found must not extend after that position.
Optional third argument, if t, means if fail just return nil (no error).
If not nil and not t, move to limit of search and return nil.
Optional fourth argument is repeat count--search for successive occurrences. */)
- (string, bound, noerror, count)
- Lisp_Object string, bound, noerror, count;
+ (Lisp_Object string, Lisp_Object bound, Lisp_Object noerror, Lisp_Object count)
{
return search_command (wordify (string, 0), bound, noerror, count, 1, 1, 0);
}
@@ -2285,8 +2277,7 @@ The match found must not extend before that position.
Optional third argument, if t, means if fail just return nil (no error).
If not nil and not t, move to limit of search and return nil.
Optional fourth argument is repeat count--search for successive occurrences. */)
- (string, bound, noerror, count)
- Lisp_Object string, bound, noerror, count;
+ (Lisp_Object string, Lisp_Object bound, Lisp_Object noerror, Lisp_Object count)
{
return search_command (wordify (string, 1), bound, noerror, count, -1, 1, 0);
}
@@ -2304,8 +2295,7 @@ The match found must not extend after that position.
Optional third argument, if t, means if fail just return nil (no error).
If not nil and not t, move to limit of search and return nil.
Optional fourth argument is repeat count--search for successive occurrences. */)
- (string, bound, noerror, count)
- Lisp_Object string, bound, noerror, count;
+ (Lisp_Object string, Lisp_Object bound, Lisp_Object noerror, Lisp_Object count)
{
return search_command (wordify (string, 1), bound, noerror, count, 1, 1, 0);
}
@@ -2323,8 +2313,7 @@ Optional third argument, if t, means if fail just return nil (no error).
Optional fourth argument is repeat count--search for successive occurrences.
See also the functions `match-beginning', `match-end', `match-string',
and `replace-match'. */)
- (regexp, bound, noerror, count)
- Lisp_Object regexp, bound, noerror, count;
+ (Lisp_Object regexp, Lisp_Object bound, Lisp_Object noerror, Lisp_Object count)
{
return search_command (regexp, bound, noerror, count, -1, 1, 0);
}
@@ -2340,8 +2329,7 @@ Optional third argument, if t, means if fail just return nil (no error).
Optional fourth argument is repeat count--search for successive occurrences.
See also the functions `match-beginning', `match-end', `match-string',
and `replace-match'. */)
- (regexp, bound, noerror, count)
- Lisp_Object regexp, bound, noerror, count;
+ (Lisp_Object regexp, Lisp_Object bound, Lisp_Object noerror, Lisp_Object count)
{
return search_command (regexp, bound, noerror, count, 1, 1, 0);
}
@@ -2360,8 +2348,7 @@ Optional third argument, if t, means if fail just return nil (no error).
Optional fourth argument is repeat count--search for successive occurrences.
See also the functions `match-beginning', `match-end', `match-string',
and `replace-match'. */)
- (regexp, bound, noerror, count)
- Lisp_Object regexp, bound, noerror, count;
+ (Lisp_Object regexp, Lisp_Object bound, Lisp_Object noerror, Lisp_Object count)
{
return search_command (regexp, bound, noerror, count, -1, 1, 1);
}
@@ -2378,8 +2365,7 @@ Optional third argument, if t, means if fail just return nil (no error).
Optional fourth argument is repeat count--search for successive occurrences.
See also the functions `match-beginning', `match-end', `match-string',
and `replace-match'. */)
- (regexp, bound, noerror, count)
- Lisp_Object regexp, bound, noerror, count;
+ (Lisp_Object regexp, Lisp_Object bound, Lisp_Object noerror, Lisp_Object count)
{
return search_command (regexp, bound, noerror, count, 1, 1, 1);
}
@@ -2420,8 +2406,7 @@ This is, in a vague sense, the inverse of using `\\N' in NEWTEXT;
NEWTEXT in place of subexp N.
This is useful only after a regular expression search or match,
since only regular expressions have distinguished subexpressions. */)
- (newtext, fixedcase, literal, string, subexp)
- Lisp_Object newtext, fixedcase, literal, string, subexp;
+ (Lisp_Object newtext, Lisp_Object fixedcase, Lisp_Object literal, Lisp_Object string, Lisp_Object subexp)
{
enum { nochange, all_caps, cap_initial } case_action;
register int pos, pos_byte;
@@ -2861,8 +2846,7 @@ SUBEXP, a number, specifies which parenthesized expression in the last
Value is nil if SUBEXPth pair didn't match, or there were less than
SUBEXP pairs.
Zero means the entire text matched by the whole regexp or whole string. */)
- (subexp)
- Lisp_Object subexp;
+ (Lisp_Object subexp)
{
return match_limit (subexp, 1);
}
@@ -2874,8 +2858,7 @@ SUBEXP, a number, specifies which parenthesized expression in the last
Value is nil if SUBEXPth pair didn't match, or there were less than
SUBEXP pairs.
Zero means the entire text matched by the whole regexp or whole string. */)
- (subexp)
- Lisp_Object subexp;
+ (Lisp_Object subexp)
{
return match_limit (subexp, 0);
}
@@ -2900,8 +2883,7 @@ If optional third arg RESEAT is non-nil, any previous markers on the
REUSE list will be modified to point to nowhere.
Return value is undefined if the last search failed. */)
- (integers, reuse, reseat)
- Lisp_Object integers, reuse, reseat;
+ (Lisp_Object integers, Lisp_Object reuse, Lisp_Object reseat)
{
Lisp_Object tail, prev;
Lisp_Object *data;
@@ -3001,8 +2983,7 @@ DEFUN ("set-match-data", Fset_match_data, Sset_match_data, 1, 2, 0,
LIST should have been created by calling `match-data' previously.
If optional arg RESEAT is non-nil, make markers on LIST point nowhere. */)
- (list, reseat)
- register Lisp_Object list, reseat;
+ (register Lisp_Object list, Lisp_Object reseat)
{
register int i;
register Lisp_Object marker;
@@ -3176,8 +3157,7 @@ record_unwind_save_match_data (void)
DEFUN ("regexp-quote", Fregexp_quote, Sregexp_quote, 1, 1, 0,
doc: /* Return a regexp string which matches exactly STRING and nothing else. */)
- (string)
- Lisp_Object string;
+ (Lisp_Object string)
{
register unsigned char *in, *out, *end;
register unsigned char *temp;