home *** CD-ROM | disk | FTP | other *** search
- Path: uunet!husc6!spdcc!m2c!necntc!ncoast!allbery
- From: gmcgary@SUN.COM@kumquat.UUCP (Greg Mcgary - Sun ECD Software)
- Newsgroups: comp.sources.misc
- Subject: Gnumacs code for ID stuff
- Message-ID: <4865@ncoast.UUCP>
- Date: 14 Oct 87 00:20:39 GMT
- Sender: allbery@ncoast.UUCP
- Lines: 54
- Approved: allbery@ncoast.UUCP
- X-Archive: comp.sources.misc/8710/11
-
- This comes from Wolfgang Rupprecht, with whom I used to work at
- Lisp Machine Inc. in Cambridge.
-
- It's a gnuemacs command for perusing sources with the aid of the ID
- database. It takes advantage of the fact that
- `gid' produces lines in the same format as /lib/cpp error messages.
- The `gid' emacs command runs `gid' the program and lets you examine
- the results as you would ordinary compiler error messages. I haven't
- tested this personally, but I know that Wolfgang has been using it for
- quite some time now. (Almost a year)
-
- I would appreciate it if you could post this as an addendum to ID.
-
- Thank you!
-
- --Greg McGary--
-
- PS: Wolfgang says `Hi!'
-
- ----- Begin Forwarded Message -----
-
- Here is a present for your 'ids' package.
-
- -wolfgang
-
- ;;; put this in your GnuEmacs startup file '~/.emacs' .
- ;;; or autoload it from some other file. -wsr
- (global-set-key "\e/" 'gid) ; sort of Meta-.
-
- (defun gid (command)
- "Run gid, with user-specified args, and collect output in a buffer.
- While gid runs asynchronously, you can use the \\[next-error] command
- to find the text that gid hits refer to."
- (interactive (list (read-input "Run gid (with args): "
- (word-around-point))))
- (compile1 (concat "gid " command)
- "No more gid hits" "gid"))
-
- (defun word-around-point ()
- "return the word around the point as a string"
- (save-excursion
- (let (beg)
- (if (not (looking-at "\\<"))
- (forward-word -1))
- (setq beg (point))
- (forward-word 1)
- (buffer-substring beg (point)))))
-
- ---
- Wolfgang Rupprecht UUCP: mirror!mit-mgm!wolfgang
- <add us to your host table> ARPA: wolfgang@mgm.mit.edu (IP addr 18.82.0.114)
-
-
- ----- End Forwarded Message -----
-