unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
Subject: add generic toggle, turn on, and turn off commands to Options menu
Date: Sat, 4 Mar 2006 13:24:18 -0800	[thread overview]
Message-ID: <MEEKKIABFKKDFJMPIOEBKEKMCPAA.drew.adams@oracle.com> (raw)

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	other threads:[~2006-03-04 21:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-04 21:24 Drew Adams [this message]
2006-04-21 16:33 ` add generic toggle, turn on, and turn off commands to Options menu Drew Adams
2006-04-23 21:58   ` Richard Stallman
2006-04-23 22:42     ` Drew Adams
2006-04-24 11:51       ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MEEKKIABFKKDFJMPIOEBKEKMCPAA.drew.adams@oracle.com \
    --to=drew.adams@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).