home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / gnu / emacs / help / 3549 < prev    next >
Encoding:
Text File  |  1992-07-29  |  1.6 KB  |  39 lines

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