[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [External] : general "toggle" command? general "toggle" prefix?
From: |
Drew Adams |
Subject: |
RE: [External] : general "toggle" command? general "toggle" prefix? |
Date: |
Tue, 13 Sep 2022 14:52:24 +0000 |
> There are many kinds of settings in Emacs, and for quite a few
> we have implemented or considered commands to toggle
> between recent settings.
>
> Might it be useful to have a prefix for toggling a setting?
> Might it be possible to write a general command that can
> toggle various kinds of settings?
I have a command for toggling a variable value,
`icicle-toggle-option', which is bound to
`M-i M-i' during completion in Icicle minor mode.
Description:
Toggle option's value.
This makes sense for binary (toggle) options.
By default, completion candidates are limited to
user options that have `boolean' custom types.
However, there are many "binary" options
that allow other non-nil values than t.
You can use a prefix argument to change the set
of completion candidates, as follows:
- With a non-negative prefix arg, all user
options are candidates.
- With a negative prefix arg, all variables
are candidates.
(More generally, during completion prefix key
`M-i' is bound to `icicle-toggle-map', which
has lots of toggle keys.)