Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!agate!paris.Berkeley.EDU!mcgrath From: mcgrath@paris.Berkeley.EDU (Roland McGrath) Newsgroups: gnu.emacs Subject: Re: E-lisp programming Message-ID: Date: 7 May 89 22:24:25 GMT References: <8905071551.AA21768@AENEAS.MIT.EDU> Sender: usenet@agate.BERKELEY.EDU Distribution: gnu Organization: Hackers Anonymous International, Ltd., Inc. (Applications welcome) Lines: 28 In-reply-to: damerell@NSFNET-RELAY.AC.UK's message of 7 May 89 11:31:39 GMT In article <8905071551.AA21768@AENEAS.MIT.EDU> damerell@NSFNET-RELAY.AC.UK (Dr R M Damerell, RHBNC) writes: 1. The Manual says defvar defines a global variable intended to be advert- ised to users. What is the proper way to define ditto NOT to be advertised? Use `defvar'. If you want something to be a user configuration variable, begin its docstring with a `*': (defvar config-var nil "*Foo will happen if non-nil.") vs (defvar internal-var nil "Current state of the foobar.") 2. If 2 separate E-Lisp files define variables (etc) of same name, that sets up an interaction between them that will surely create all sorts of insidious bugs. Is there any program that searches a set of files for such multiple definitions? There is no way to detect this except grepping lisp/*.el for defvar. A good way to prevent problems is to prefix all the symbols in your package with something descriptive like `foo-pkg-'. Jesus is the saviour of the world. This seems highly unlikely. -- Roland McGrath Free Software Foundation, Inc. roland@wheaties.ai.mit.edu, mit-eddie!wheaties.ai.mit.edu!roland Copyright 1989 Roland McGrath, under the GNU General Public License, version 1.