home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: gnu.emacs.help
- Path: sparky!uunet!cis.ohio-state.edu!athena.mit.edu!acevedo
- From: acevedo@athena.mit.edu
- Subject: Emacs Lisp: interactive calling of C subroutines
- Message-ID: <9207291328.AA19184@the-beav.MIT.EDU>
- Sender: daemon@cis.ohio-state.edu
- Organization: Gatewayed from the GNU Project mailing list help-gnu-emacs@prep.ai.mit.edu
- References: <9207282039.AA19376@mole.gnu.ai.mit.edu>
- Date: Wed, 29 Jul 1992 05:28:55 GMT
- Lines: 27
-
- Thanks for your response...
-
- All this came up because I wrote an "advise" package in elisp. This
- allows you to say
-
- (advise 'foo 'bar)
-
- and when `foo' is called, `bar' is actually called first (as the
- "advice" to `foo'), and then `foo' is called. It is quite simple and
- works by modifying the function cell of `foo'.
-
- The first use of `advise' was for a user with Carpal Tunnel Syndrome who
- wanted to keep track of which keys were used most often; those would be
- bound to function keys. (The keys being tested were advised to count
- how many times they were invoked interactively.) The second use, which
- brought about the above problem, was [yet another] hack to get Emacs to
- display the current line number; actually this time the column number,
- for a Fortran programmer. I would like to post `advise.el' and
- `track-funs.el' sometime soon because I think many people would find
- them useful.
-
- The "current line number" hack comes up quite often, and tracking
- function usage is not unreasonable. I don't like redefining standard
- functions, but in these cases there seems to be no other way. (Even
- this way it is not completely reliable.)
-
- Raul
-