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

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

Re: How to avoid introducing global symbols by setq in function?


From: Marcin Borkowski
Subject: Re: How to avoid introducing global symbols by setq in function?
Date: Fri, 18 Nov 2016 09:33:30 +0100
User-agent: mu4e 0.9.17; emacs 26.0.50.3

On 2016-11-18, at 02:10, zhanghj <netjunegg@gmail.com> wrote:

> As in the following code:
>
> (let ((var1 100))  ;; default value
>   (when some_condition
>     ;; new value
>     (setq varl 200))
>   (message "value: %d" varl))
>
> Should use "var1", but write "varl" by typo.
> If some_condition is non-nil, there will be no error and no warnning.
>
> How to check these mistakes?

Have you tried to byte-compile that code?

Best,

-- 
Marcin Borkowski



reply via email to

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