I would like to be able to define a variable in Emacs-Lisp that
is local to a function, but does not lose it's value when the functions
exits. I know I can create a local variable via let, but any local
variables within let are disposed upon exit of let.
Any suggestions are welcome,
-Tom
------------------------------------------------------------------
Thomas E Enebo (CIS, User Services) en...@staff.tc.umn.edu
--
------------------------------------------------------------------
Thomas E Enebo (CIS, User Services) en...@staff.tc.umn.edu
$|=1;for("!","E","M","O","T"){print $l=$_.$l,"\015";sleep 1;}
You can't do this in Emacs Lisp, it doesn't have local static variables or
lexical closures. You have to use a global variable.
--
Barry Margolin
System Manager, Thinking Machines Corp.
bar...@think.com {uunet,harvard}!think!barmar
If getting object oriented is a viable alternative, try the Eoops
package.
--
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
Life is what you make of the random chances. [@@]####=
"I will not raise taxes on the middle class." -- Anonymous \/ H H
`'`'`'`'`'`'`'`'`'`'`'`'`'`'`'`'`'`'`'`'`'`'`'`'`'`'`'`'`'`'`'`'`'`'`'`'`'`'