# HG changeset patch # User jwe # Date 910889052 0 # Node ID 2c91af0db179df787f7b93215bfe245f81dcfc5b # Parent 8b0cb8f79fdc09909e68172b29e8638e9afd2ae3 [project @ 1998-11-12 16:44:12 by jwe] diff --git a/emacs/Makefile.in b/emacs/Makefile.in --- 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) diff --git a/emacs/otags b/emacs/otags 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 ' 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