vile
[Top][All Lists]
Advanced

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

Re: [vile] toggle boolean settings


From: Wayne Cuddy
Subject: Re: [vile] toggle boolean settings
Date: Thu, 16 Aug 2012 18:44:35 -0400
User-agent: Mutt/1.4.2.3i

Tom,

I've been using this macro you wrote for me quite some time ago and just
noticed that when 'setv' applies the setting it seems to be applied
globally, not locally to the buffer. (set vs setl)

If I load 2 buffers. Call "ToggleList li" and then switch the window's
view to another buffer, listing is still applied (and turned off if I call
the macro again). This is not the behavior if I enable listing using
"setl".

Is there a way to make it operate locally?

Thanks,
Wayne

On Wed, Mar 07, 2012 at 08:49:29PM -0500, Thomas Dickey wrote:
> On Tue, Mar 06, 2012 at 08:48:29PM -0500, Thomas Dickey wrote:
> > On Wed, Feb 29, 2012 at 05:15:36PM -0500, Thomas Dickey wrote:
> > > On Wed, Feb 29, 2012 at 01:51:46PM -0500, address@hidden wrote:
> > > > Is there a way to simply negate boolean settings? If not it would be
> > > > nice to have a feature like this:
> > > > 
> > > > setl !list
> > > > or
> > > > setl notlist
> > > > 
> > > > If listing is enabled it would be disabled, else enabled.
> ...
> 
> here's a complete macro (still not the suggested syntax...)
> 
> ; generalized from ToggleList, for any boolean mode
> store-procedure ToggleMode mode='Mode'
>       ~local %mode
>       setv %mode &cat '$' $1
>       ~if &or \
>               &seq "TRUE" &indirect %mode \
>               &seq "FALSE" &indirect %mode
>               setv &indirect $1 &not &indirect %mode
>       ~else
>               write-message "Not a boolean mode"
>       ~endif
> ~endm
> 
> -- 
> Thomas E. Dickey <address@hidden>
> http://invisible-island.net
> ftp://invisible-island.net



> _______________________________________________
> vile mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/vile




reply via email to

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