[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
set-variable could use some of defcustom's typing to provide completion
From: |
Drew Adams |
Subject: |
set-variable could use some of defcustom's typing to provide completion |
Date: |
Mon, 20 Feb 2006 01:36:21 -0800 |
I don't propose we try to take this too far, but in the case of some simple
defcustom :type specs, `set-variable' could use the type info to provide
completion.
For instance, if a `choice' of `const' values is used, the string
representations of those values could be made available as completions for
input to `set-variable'.
E.g. (choice (const :tag "Yes" 'some-long-option-meaning-yes)
(const :tag "No" 'some-long-option-meaning-ask)
(const :tag "Ask" 'some-long-option-meaning-ask))
You would be able to complete your input to the only valid inputs.
Completion could be lax or strict, depending on the type. In the case of a
choice of (only) `const's, it could be strict. For some other types, it
would be completely lax, letting you input anything you like.
Yes, I realize that the primary recommended UI for setting options is
Customize, but `set-variable' exists and is quite handy. With completion, it
would be even handier.
- set-variable could use some of defcustom's typing to provide completion,
Drew Adams <=