summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancesco Potortì <pot@gnu.org>2002-03-12 11:17:02 +0000
committerFrancesco Potortì <pot@gnu.org>2002-03-12 11:17:02 +0000
commita372c611a89aef9f99738cceae15374c4b654d45 (patch)
tree35acc2c727db3cc5f5082225934f627296dc7f3f
parente8725fe0ec69afb330e4af2b14c6f126d4de8fdd (diff)
downloademacs-a372c611a89aef9f99738cceae15374c4b654d45.tar.gz
(Python_functions): Skip spaces at beginning of lines.
-rw-r--r--lib-src/etags.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib-src/etags.c b/lib-src/etags.c
index f0c613f232b..8227cfb07cb 100644
--- a/lib-src/etags.c
+++ b/lib-src/etags.c
@@ -4028,8 +4028,9 @@ Perl_functions (inf)
/*
* Python support
- * Look for /^def[ \t\n]+[^ \t\n(:]+/ or /^class[ \t\n]+[^ \t\n(:]+/
+ * Look for /^[\t]*def[ \t\n]+[^ \t\n(:]+/ or /^class[ \t\n]+[^ \t\n(:]+/
* Eric S. Raymond <esr@thyrsus.com> (1997)
+ * More ideas by seb bacon <seb@jamkit.com> (2002)
*/
static void
Python_functions (inf)
@@ -4039,6 +4040,7 @@ Python_functions (inf)
LOOP_ON_INPUT_LINES (inf, lb, cp)
{
+ cp = skip_spaces (cp);
if (*cp++ == 'd'
&& *cp++ == 'e'
&& *cp++ == 'f' && iswhite (*cp++))
@@ -4050,7 +4052,7 @@ Python_functions (inf)
lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
}
- cp = lb.buffer;
+ cp = skip_spaces (lb.buffer);
if (*cp++ == 'c'
&& *cp++ == 'l'
&& *cp++ == 'a'