Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!mit-eddie!CS.ROCHESTER.EDU!quiroz From: quiroz@CS.ROCHESTER.EDU Newsgroups: comp.emacs Subject: Re: hooks in Gnumacs Message-ID: <8709190514.AA07697@procyon.cs.rochester.edu> Date: Sat, 19-Sep-87 01:17:19 EDT Article-I.D.: procyon.8709190514.AA07697 Posted: Sat Sep 19 01:17:19 1987 Date-Received: Sun, 20-Sep-87 13:23:23 EDT Sender: daemon@eddie.MIT.EDU Reply-To: quiroz@ROCHESTER.UUCP (Cesar Quiroz) Organization: U of Rochester, CS Dept, Rochester, NY Lines: 29 Summary: Please don't define c[ad]+r as macros. In a recent article, <280@hrc63.co.uk>, Ciaran Byrne contributes some functions to add hooks to code that originally didn't have them. That posting contained some definitions of the classic c[ad]+r functions, only as macros. I want to make a plea so other Emacs contributors consider for a moment that those macros make it hard to implement the standardly accepted meanings of those functions. (Byrne's code is by no means unique in this respect, by the way, just the most recent one to provide c[ad]+r as macros.) As to why it could be good to approximate standardly accepted Lisp behavior, you could see the notes that accompany cl.el in recent releases of GNU Emacs (I understand it was in 18.47, cannot confirm right now). As to why redefining them as macros causes trouble, imagine an implementation of defstruct that uses list structure to represent a struct and apply-ies c[ad]+r to instances in order to retrieve the slot values. (The one in cl.el uses vectors, so it doesn't have this problem, but others might easily occur.) It can be argued that the language should have included these functions as primitives. However, it is so easy to define them "correctly", that it should be done the right way. (Notice that in 18.47 and later, if cl.el is available, just (require 'cl) should be enough.) By the way, if someone wants to discuss language extensions for Emacs Lisp or implementation/design questions, that could be a nice thing to do in this group. Ideas anyone?