* Lua support for etags
@ 2004-02-21 2:40 David A. Capello
0 siblings, 0 replies; only message in thread
From: David A. Capello @ 2004-02-21 2:40 UTC (permalink / raw)
This patch add support for Lua scripting language (http://www.lua.org)
in etags.
Index: etags.c
===================================================================
RCS file: /cvsroot/emacs/emacs/lib-src/etags.c,v
retrieving revision 3.37
diff -u -r3.37 etags.c
--- etags.c 3 Sep 2003 14:20:49 -0000 3.37
+++ etags.c 21 Feb 2004 02:29:12 -0000
@@ -335,6 +335,7 @@
static void Fortran_functions __P((FILE *));
static void HTML_labels __P((FILE *));
static void Lisp_functions __P((FILE *));
+static void Lua_functions __P((FILE *));
static void Makefile_targets __P((FILE *));
static void Pascal_functions __P((FILE *));
static void Perl_functions __P((FILE *));
@@ -639,6 +640,11 @@
argument of any expression that starts with `(def' in column zero\n\
is a tag.";
+static char *Lua_suffixes [] =
+ { "lua", "LUA", NULL };
+static char Lua_help [] =
+"In Lua scripts, any function.";
+
static char *Makefile_filenames [] =
{ "Makefile", "makefile", "GNUMakefile", "Makefile.in", "Makefile.am", NULL};
static char Makefile_help [] =
@@ -765,6 +771,7 @@
{ "html", HTML_help, HTML_labels, HTML_suffixes },
{ "java", Cjava_help, Cjava_entries, Cjava_suffixes },
{ "lisp", Lisp_help, Lisp_functions, Lisp_suffixes },
+ { "lua", Lua_help, Lua_functions, Lua_suffixes },
{ "makefile", Makefile_help,Makefile_targets,NULL,Makefile_filenames},
{ "objc", Objc_help, plain_C_entries, Objc_suffixes },
{ "pascal", Pascal_help, Pascal_functions, Pascal_suffixes },
@@ -4893,6 +4900,30 @@
}
}
}
+ }
+}
+
+\f
+/*
+ * Lua tag functions
+ * look for function, local function.
+ */
+
+static void
+Lua_functions (inf)
+ FILE *inf;
+{
+ register char *bp;
+
+ LOOP_ON_INPUT_LINES (inf, lb, bp)
+ {
+ if (bp[0] != 'f' && bp[0] != 'l')
+ continue;
+
+ LOOKING_AT (bp, "local");
+
+ if (LOOKING_AT (bp, "function"))
+ get_tag (bp, NULL);
}
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-02-21 2:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-21 2:40 Lua support for etags David A. Capello
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).