Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!rutgers!mcnc!unc!steele From: steele@unc.cs.unc.edu (Oliver Steele) Newsgroups: comp.sys.mac Subject: Re: Possible LSC improvements Message-ID: <2081@unc.cs.unc.edu> Date: Tue, 17-Nov-87 17:40:59 EST Article-I.D.: unc.2081 Posted: Tue Nov 17 17:40:59 1987 Date-Received: Fri, 20-Nov-87 00:10:46 EST References: <6523@prls.UUCP> <9370001@hpfclp.HP.COM> <750@orstcs.CS.ORST.EDU> <328@moncsbruce.oz> <3112@husc6.UUCP> <971@cpocd2.UUCP> Reply-To: steele@unc.UUCP (Oliver Steele) Organization: University of North Carolina, Chapel Hill Lines: 44 In article <328@moncsbruce.oz> conybear@moncsbruce.oz (Roland Conybeare) writes: >I would like something more sophisticated that looks up the definition >of the selected function name or global variable, a la vi's tag command. In article <3112@husc6.UUCP> singer@endor.UUCP (Richard Siegel) writes: > Try option-double-click on a symbol. If it's declared somewhere, >the file will be opened and the symbol declaration will be displayed. >(This doesn't work for macros, of course...) howard@cpocd2.UUCP (Howard A. Landman) writes: >Why "of course"? UNIX ctags works for both procedure names *and* macros, >so it's clearly possible to handle macros correctly. Perhaps you just haven't >thought about it enough yet. And maybe he has. UNIX ctags runs as a text-processing program separate from cpp, pcc, lint, and anything else that looks at PSGs. (Try running it on a strangely indented program to see how this can mess it up.) Since it's going to make a separate pass from the compiler through all the source files, there's no penalty for having it check for macros as well as function headers, as long as they're both defined as greps. LSC does any symbol lookup on the basis of information it has gathered in the compilation phase and stored in the project file. If it were to let you option-double-click on macros, it would need to compile a list of what macros were defined in what headers/files at compile-time, which is inner-loop in the LSC environment. It would also need to update this table in the project menu after each recompilation, and manage separate copies for each source file, since macro definitions are not global. (imagine having to wait for ctags after each recompilation). Updating the project file already takes a lot of time. Now, how about making opt-2-click look for the first occurrence of a word in the CURRENT file when the word isn't in the link information? This at least solves the problem for statics, and for macros that aren't in headers. Also, a cmd-D that widens the selection range to include surrounding text if the selection is just an insertion point would be convenient. ------------------------------------------------------------------------------ Oliver Steele ...!{decvax,ihnp4}!mcnc!unc!steele steele%unc@mcnc.org "When you believe in a loving God, life appears to be very funny." -- Garrison Keillor