From: "David A. Capello" <dacap@users.sourceforge.net>
Subject: Lua support for etags
Date: Fri, 20 Feb 2004 23:40:29 -0300 [thread overview]
Message-ID: <20040221024029.GA5864@killerpc> (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);
}
}
reply other threads:[~2004-02-21 2:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040221024029.GA5864@killerpc \
--to=dacap@users.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).