changeset 3218:2c91af0db179

[project @ 1998-11-12 16:44:12 by jwe]
author jwe
date Thu, 12 Nov 1998 16:44:12 +0000
parents 8b0cb8f79fdc
children 30770ba4457a
files emacs/Makefile.in emacs/otags
diffstat 2 files changed, 34 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/emacs/Makefile.in
+++ b/emacs/Makefile.in
@@ -16,24 +16,31 @@
 
 INSTALL = @INSTALL@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_DATA = @INSTALL_DATA@
 
 EL_FILES = octave-hlp.el octave-inf.el octave-mod.el
 
 ELC_FILES = octave-hlp.elc octave-inf.elc octave-mod.elc
 
-SOURCES = $(EL_FILES)
+SOURCES = $(EL_FILES) otags
 
-DISTFILES = Makefile.in $(EL_FILES) $(ELC_FILES) NEWS TODO
+DISTFILES = Makefile.in $(EL_FILES) $(ELC_FILES) otags NEWS TODO
 
-BINDISTFILES = $(addprefix $(srcdir)/, $(EL_FILES) $(ELC_FILES) NEWS TODO)
+BINDISTFILES = \
+	$(addprefix $(srcdir)/, $(EL_FILES) $(ELC_FILES) otags NEWS TODO)
 
 all:
 .PHONY: all
 
 install install-strip:
+	$(INSTALL_SCRIPT) otags $(bindir)/otags
 .PHONY: install install-strip
 
+uninstall:
+	rm -f $(bindir)/otags
+.PHONY: uninstall
+
 tags:
 	ctags $(SOURCES)
 
new file mode 100644
--- /dev/null
+++ b/emacs/otags
@@ -0,0 +1,24 @@
+#! /bin/sh
+
+# Generate a TAGS file from a set of Octave .m files for use with Emacs.
+#
+# Run as '$ otags' in the given Octave directory to generate a
+# TAGS file.  If you want to include another directory, add a line
+# prior to the "*.m" line containing something like
+#  `--include=/path/to/other/directory/TAGS" \'.
+
+# Tags are generated for function names and for global variables. For
+# global variables it doesn't work for more than one line global
+# variables.  :-(
+
+# Tags are also created for lines of the form '###key foobar' so that
+# you can jump to this specific place just by typing `M-. foobar'.
+# Note that tags are not generated for scripts so that you have to add
+# a line by yourself of the form `###key <script-name>' if you want to
+# jump to it.  :-(
+
+etags --lang=none \
+      --regex='/[ \t]*function.*=[ \t]*\([^ \t]*\)[ \t]*(/\1/' \
+      --regex='/###key \(.*\)/\1/' \
+      --regex='/[ \t]*global[ \t].*/' \
+      *.m