GNU bug report logs - #69079
[PATCH] Add 'customize-toggle-option' command

Previous Next

Package: emacs;

Reported by: Philip Kaludercic <philipk <at> posteo.net>

Date: Mon, 12 Feb 2024 17:34:01 UTC

Severity: normal

Tags: patch

Done: Philip Kaludercic <philipk <at> posteo.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Drew Adams <drew.adams <at> oracle.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Philip Kaludercic <philipk <at> posteo.net>
Cc: "69079 <at> debbugs.gnu.org" <69079 <at> debbugs.gnu.org>
Subject: bug#69079: [PATCH] Add 'customize-toggle-option' command
Date: Mon, 12 Feb 2024 18:41:39 +0000
FWIW, (since 2006) Icicles has this, which is bound
to `M-i M-i` during completion.

With a prefix arg you can toggle options and other
variables whose values are generalized Booleans:
`nil' or non-`nil' (not just `t').

This is for toggling an option's current value; it
does only this: (set SYMBOL (not (eval SYMBOL))).
But the completion predicate determines the proper
candidates (depending on prefix arg).

There are (rightfully) many options whose values
are `nil' for false and non-`nil' for true.  If the
command didn't let you toggle such options (with a
prefix arg) then it would be _far_ less useful.
___

Doc string:

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.




This bug report was last modified 1 year and 154 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.