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

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

Re: Is it necessary to reset or clear the global variables ?


From: Tim X
Subject: Re: Is it necessary to reset or clear the global variables ?
Date: Sun, 28 Nov 2010 10:12:35 +1100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Fren Zeee <frenzeee@gmail.com> writes:

> Friends,
>
> I am trying to modify or improve an existing lisp function written by
> myself a few years ago. I have observed that when I run it on the test
> data after some modification, it appears to run because the global
> variables have old value and some regular expression or result did not
> produce a nil or did produce a nil which resulted in the failure of
> the function to die or crash during execution.
>
> A standard method is to reset all global variables.
>
> As a newbie, I ask you to provide me with advice on what is a good
> practice.
>
> Franz Xe
>
> P.S. Is the word persistence an accurate term to describe this
> disease ?

This is way to little information to provide much real advice. However,
I wonder if your using global defvar type variables where you should be
using a locally defined variable inside your function with 'let'?

Tim

-- 
tcross (at) rapttech dot com dot au


reply via email to

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