Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site mit-eddie.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!mly@prep.ai.mit.edu From: mly@prep.ai.mit.edu Newsgroups: net.emacs Subject: autoload confusion Message-ID: <994@mit-eddie.UUCP> Date: Fri, 17-Jan-86 18:49:54 EST Article-I.D.: mit-eddi.994 Posted: Fri Jan 17 18:49:54 1986 Date-Received: Sun, 19-Jan-86 03:44:46 EST Sender: daemon@mit-eddi.UUCP Organization: MIT, Cambridge, MA Lines: 42 From: mly@prep.ai.mit.edu (Richard Mlynarik) From: uoregon!meyer@mit-eddie (meyer) Newsgroups: net.emacs Date: Fri, 10-Jan-86 11:07:00 EST This may not be a *real* bug, but I'm confused about the philosphy of "autoload". Specifically, I would like to load my own scheme-mode (lisp-mode, prolog-mode,...), but since scheme-mode (for example) is already defined, (i.e., !EQ (XSYMBOL (function)->function, Qunbound), where "function" is scheme-mode), one cannot define a new scheme-mode. That is, autoload returns nil and does nothing if the symbol (function name, e.g., 'scheme-mode) is already bound. Apparently, this will be true for any function name loaded out of loaddefs.el. For starters, the definition of "autoload" in Emacs17 (the current version) icontains the following fragment: /* If function is defined and not as an autoload, don't override */ if (!EQ (XSYMBOL (function)->function, Qunbound) && !(XTYPE (XSYMBOL (function)->function) == Lisp_Cons && EQ (XCONS (XSYMBOL (function)->function)->car, Qautoload))) return Qnil; so what you are trying to do would work if you were running a more up-to-date Emacs. Thanks for the [belated] bug report in any case... [..] Is there a way to get around this (e.g., unbind a symbol; I noticed there isn't much in the way of oblist handling functions), or should autoload always set up the autoload (like Gosling's)? There is a useful subset of the relevant common-lisp functions: makunbound, fmakunbound, boundp, fboundp, intern, intern-soft (ie find-symbol) The behaviour of -always- doing a redefinition when `autoload' is called is flawed in my opinion for a number of reasons, which I could go into if you're interested. I'd prefer to avoid making a religious discussion out of this.