On Thu, Feb 26, 2009 at 10:38:21PM -0800, Sean wrote:
>
> Hi,
>
> All global variables can be found through g: which is a hash table
> itself. It might be good to hide those variable from outside and
> limit its use only to the plugin itself.
>
> I found a way to do it:
>
> "
On 2009-02-27 06:02 (-0800), Tom wrote:
> I suppose you're referring to the standard let form in lisp? Something
> like:
>
> (let ((foo 1))
> (+ foo 2))
>
> The point is though that emacs with its dynamic scoping embraces the
> possibility that users adapt libraries to their likings and
> there is also "let" form to bind local variables.
I suppose you're referring to the standard let form in lisp? Something
like:
(let ((foo 1))
(+ foo 2))
The point is though that emacs with its dynamic scoping embraces the
possibility that users adapt libraries to their likings and n
On 2009-02-27 01:19 (-0800), Tom wrote:
> In emacs, all variables are global and users are supposed to tinker
> with "plugins" and to amend it in whichever way they want to. In
> smalltalk, IIRC everything is globally accessible either and they do
> well.
Variables may have also buffer-local, wi
> All global variables can be found through g: which is a hash table
> itself. It might be good to hide those variable from outside and
> limit its use only to the plugin itself.
Users wouldn't be able then to change the value of that variable
without restarting vim.
I personally don't fully un
On 27 фев, 09:38, Sean wrote:
> (2) no global variables can be accessed outside the plugin
I have multiple files in my plugin, should I "for variable in G" in
all of them?
BTW, why do you want to hide global vars that you let user to define?
I would hide only those globals that user shouldn't acc
Hi,
All global variables can be found through g: which is a hash table
itself. It might be good to hide those variable from outside and
limit its use only to the plugin itself.
I found a way to do it:
"
let G = []
call add(G, "g:vimim_datafile")