home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: gnu.emacs.help
- Path: sparky!uunet!caen!hellgate.utah.edu!eeide
- From: eeide%asylum.cs.utah.edu@cs.utah.edu (Eric Eide)
- Subject: Re: How do I subvert a function?
- Message-ID: <EEIDE.92Sep4175544@asylum.cs.utah.edu>
- In-reply-to: kevin@edscom.demon.co.uk's message of Fri, 4 Sep 1992 10:01:46 GMT
- Organization: University of Utah Department of Computer Science
- References: <KEVIN.92Sep4100146@runningbear.edscom.demon.co.uk>
- Distribution: gnu
- Date: 4 Sep 92 17:55:44
- Lines: 18
-
- Kevin Broadey writes:
-
- >I'd like to be able to replace an elisp function with one I've written myself
- >while keeping hold of the original. [...] I tried doing this:-
- >
- >(fset 'old-original 'original)
- >
- >(defun original ()
- > (old-original)
- > ;; modify behaviour here
- > ...)
-
- Close. Try (fset 'old-original (symbol-function 'original)) instead. Eric.
-
- --
- -------------------------------------------------------------------------------
- Eric Eide | University of Utah Department of Computer Science
- eeide@cs.utah.edu | Buddhist to hot dog vendor: "Make me one with everything."
-