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

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

defvar and "assignment to free variable" (was: Re: on specifying the C s


From: Emanuel Berg
Subject: defvar and "assignment to free variable" (was: Re: on specifying the C source code directory)
Date: Wed, 03 Feb 2016 00:04:40 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Marcin Borkowski <mbork@mbork.pl> writes:

> As the docstring says, in Unix this is so.
> I don't know about other systems.

Me neither :)

>> (defvar find-function-C-source-directory)
>> (setq find-function-C-source-directory "~/.emacs.d/emacs-24.1/src")
>
> Out of curiosity: why defvar?

Without it, when I compile, it says:

    In toplevel form:
    help-new.el:11:7:Warning: assignment to free variable
        `find-function-C-source-directory'

`defvar' here is just used to communicate that you
will use the variable. Because that's exactly what
happens next, this isn't a hack. Really!

-- 
underground experts united
http://user.it.uu.se/~embe8573




reply via email to

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