Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!rutgers!rochester!quiroz From: quiroz@cs.rochester.edu (Cesar Quiroz) Newsgroups: comp.emacs Subject: Re: hooks in Gnumacs Message-ID: <2445@sol.ARPA> Date: Sun, 20-Sep-87 17:48:38 EDT Article-I.D.: sol.2445 Posted: Sun Sep 20 17:48:38 1987 Date-Received: Sun, 20-Sep-87 23:36:14 EDT References: <280@hrc63.co.uk> <28500017@ccvaxa> Reply-To: quiroz@ROCHESTER.UUCP (Cesar Quiroz) Organization: U of Rochester, CS Dept, Rochester, NY Lines: 26 Keywords: advice flavors hooks O-O Summary: Generalized user-defined hooks = advise facilities | O-O methods Expires: Sender: Followup-To: From article <28500017@ccvaxa> (aglew@ccvaxa.UUCP): : ... instead of every package using a slightly different name for :its pre and post hooks, have no hooks at all, but let the user be :able to add them dynamically, in a standard way. Looks like a useful idea. Other Lisps (Interlisp, for one) have well evolved `advising' facilities, that permit not only pre- and post- customized activity, but also around- activity. The user retains ultimate control and can do useful things not thought of by the original writer. For instance, take the old newline-and-reindent (or whatever it was called). It could have been just an around-advice of indent-line, that called the internal function twice. (Details might be a little out of synch with reality, please just get the big picture.) Byrne's code could be used as a starting point. (Getting the advice to the right place is a simple macro, controlling how different pieces of advice interact takes a bit more effort, storing and retrieving the advice might be harder... Hmm, going beyond the simple seems to require something like flavor composition.) -- Cesar Augusto Quiroz Gonzalez Department of Computer Science {allegra|seismo}!rochester!quiroz University of Rochester or Rochester, NY 14627 quiroz@cs.rochester.edu