aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorErik Naggum1996-01-09 00:33:47 +0000
committerErik Naggum1996-01-09 00:33:47 +0000
commit5806161b4fe0040cd2f948d2bb4621be8c535ca2 (patch)
tree2d75d5d57c5e9da9a12d6eeb5f432b9a83bf3973 /src
parent4ee3e30977c37ab885f931bcd2006521cc0c4f65 (diff)
downloademacs-5806161b4fe0040cd2f948d2bb4621be8c535ca2.tar.gz
emacs-5806161b4fe0040cd2f948d2bb4621be8c535ca2.zip
(Fmatch_end, Fregexp_quote): Harmonize arguments with documentation.
Diffstat (limited to 'src')
-rw-r--r--src/search.c36
1 files changed, 20 insertions, 16 deletions
diff --git a/src/search.c b/src/search.c
index 81d2be58e9e..e77528311d4 100644
--- a/src/search.c
+++ b/src/search.c
@@ -1802,24 +1802,28 @@ match_limit (num, beginningp)
1802 1802
1803DEFUN ("match-beginning", Fmatch_beginning, Smatch_beginning, 1, 1, 0, 1803DEFUN ("match-beginning", Fmatch_beginning, Smatch_beginning, 1, 1, 0,
1804 "Return position of start of text matched by last search.\n\ 1804 "Return position of start of text matched by last search.\n\
1805NUM specifies which parenthesized expression in the last regexp.\n\ 1805SUBEXP, a number, specifies which parenthesized expression in the last\n\
1806 Value is nil if NUMth pair didn't match, or there were less than NUM pairs.\n\ 1806 regexp.\n\
1807Value is nil if SUBEXPth pair didn't match, or there were less than\n\
1808 SUBEXP pairs.\n\
1807Zero means the entire text matched by the whole regexp or whole string.") 1809Zero means the entire text matched by the whole regexp or whole string.")
1808 (num) 1810 (subexp)
1809 Lisp_Object num; 1811 Lisp_Object subexp;
1810{ 1812{
1811 return match_limit (num, 1); 1813 return match_limit (subexp, 1);
1812} 1814}
1813 1815
1814DEFUN ("match-end", Fmatch_end, Smatch_end, 1, 1, 0, 1816DEFUN ("match-end", Fmatch_end, Smatch_end, 1, 1, 0,
1815 "Return position of end of text matched by last search.\n\ 1817 "Return position of end of text matched by last search.\n\
1816ARG, a number, specifies which parenthesized expression in the last regexp.\n\ 1818SUBEXP, a number, specifies which parenthesized expression in the last\n\
1817 Value is nil if ARGth pair didn't match, or there were less than ARG pairs.\n\ 1819 regexp.\n\
1820Value is nil if SUBEXPth pair didn't match, or there were less than\n\
1821 SUBEXP pairs.\n\
1818Zero means the entire text matched by the whole regexp or whole string.") 1822Zero means the entire text matched by the whole regexp or whole string.")
1819 (num) 1823 (subexp)
1820 Lisp_Object num; 1824 Lisp_Object subexp;
1821{ 1825{
1822 return match_limit (num, 0); 1826 return match_limit (subexp, 0);
1823} 1827}
1824 1828
1825DEFUN ("match-data", Fmatch_data, Smatch_data, 0, 0, 0, 1829DEFUN ("match-data", Fmatch_data, Smatch_data, 0, 0, 0,
@@ -2001,20 +2005,20 @@ restore_match_data ()
2001 2005
2002DEFUN ("regexp-quote", Fregexp_quote, Sregexp_quote, 1, 1, 0, 2006DEFUN ("regexp-quote", Fregexp_quote, Sregexp_quote, 1, 1, 0,
2003 "Return a regexp string which matches exactly STRING and nothing else.") 2007 "Return a regexp string which matches exactly STRING and nothing else.")
2004 (str) 2008 (string)
2005 Lisp_Object str; 2009 Lisp_Object string;
2006{ 2010{
2007 register unsigned char *in, *out, *end; 2011 register unsigned char *in, *out, *end;
2008 register unsigned char *temp; 2012 register unsigned char *temp;
2009 2013
2010 CHECK_STRING (str, 0); 2014 CHECK_STRING (string, 0);
2011 2015
2012 temp = (unsigned char *) alloca (XSTRING (str)->size * 2); 2016 temp = (unsigned char *) alloca (XSTRING (string)->size * 2);
2013 2017
2014 /* Now copy the data into the new string, inserting escapes. */ 2018 /* Now copy the data into the new string, inserting escapes. */
2015 2019
2016 in = XSTRING (str)->data; 2020 in = XSTRING (string)->data;
2017 end = in + XSTRING (str)->size; 2021 end = in + XSTRING (string)->size;
2018 out = temp; 2022 out = temp;
2019 2023
2020 for (; in != end; in++) 2024 for (; in != end; in++)