[Top][All Lists]

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

add generic toggle, turn on, and turn off commands to Options menu

From: Drew Adams
Subject: add generic toggle, turn on, and turn off commands to Options menu
Date: Sat, 4 Mar 2006 13:24:18 -0800

For after the Release or Godot, whichever comes first -

The question has occasionally been debated here whether such and such an
option merits a place on the Options menu, and, if so, where to put it
(submenu? order?). There are potentially lots and lots of boolean options
that could be added to the menu, but it also makes sense to keep the menu a
reasonable size.

Here's a suggestion that might mitigate the effect of leaving some options
out: As a fallback, add a generic menu item that reads the name of a binary
option and toggles its value. In fact, add three generic menu items, to 1)
toggle, 2) turn on, and 3) turn off any boolean option.

In my own code I use such commands, which are also in the Options menu. And
because many options are only "quasi-binary", you can use a prefix arg to
control how strict the interpretation of "binary" is, for purposes of
defining the set of completion candidates. Here's the doc string of the
toggle-option command:

 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.

Would this be useful?

reply via email to

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