Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 beta 3/9/83; site nbs-amrf.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!umcp-cs!nbs-amrf!hopp From: hopp@nbs-amrf.UUCP (Ted Hopp) Newsgroups: net.lang.lisp Subject: Re: Tags for lisp Message-ID: <451@nbs-amrf.UUCP> Date: Sat, 9-Mar-85 14:22:40 EST Article-I.D.: nbs-amrf.451 Posted: Sat Mar 9 14:22:40 1985 Date-Received: Tue, 12-Mar-85 08:19:02 EST References: <173@dcdwest.UUCP> Organization: National Bureau of Standards Lines: 23 > Is there a program similar to ctags for lisp? If someone has > such a program for Berkeley 4.2, I would appreciate receiving > a copy or some pointers to one. I use awk to scan for lines starting '(def...', ignoring case. Each line generates a tag for the second argument, which is usually the function being defined. Of course, there are all sorts of writing styles that can break this, and it also picks up things like '(defprop ...', which you may or may not want. The tags file tells vi to search backwards in a poor-man's attempt to find the last definition for things are multiply defined. This has worked well enough for me that I haven't felt the need for anything better, although it is really quick and dirty. #!/bin/csh # make a tags file for lisp source files. # usage: # lisptags file [ file ... ] # generate the file 'tags' # awk '/^\([dD][eE][fF]/ {print $2 " " FILENAME " ?^" $0 "$?"}' $* | sort > tags -- Ted Hopp {seismo,umcp-cs}!nbs-amrf!hopp