[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [vile] toggle boolean settings
From: |
Thomas Dickey |
Subject: |
Re: [vile] toggle boolean settings |
Date: |
Wed, 07 Mar 2012 20:49:29 -0500 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
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 ¬ &indirect %mode
~else
write-message "Not a boolean mode"
~endif
~endm
--
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net
signature.asc
Description: Digital signature