help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What does "lacks a prefix" mean?


From: Barry Margolin
Subject: Re: What does "lacks a prefix" mean?
Date: Wed, 08 Jul 2015 12:45:20 -0400
User-agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X)

In article <1e0ad02f-ca3e-495c-bb85-61f77090d31d@googlegroups.com>,
 BobD <daycandle@gmail.com> wrote:

> My elisp:
> 
> (defun blabba ()
>   (defvar n 0)
> )
> 
> byte-compile-file yields this:
> 
>   In blabba:
>   test.el:1:8:Warning: global/dynamic var `n' lacks a prefix
> 
> What does my elisp lack?
> Other than asking here, where can I learn what "lacks a prefix" means?

The convention in Emacs Lisp is that global variables should have names 
of the form packagename-variable. Giving a global variable a name 
without a package prefix is a good way to have collisions between 
different packages.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


reply via email to

[Prev in Thread] Current Thread [Next in Thread]