bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#35133: 26.1; 1) `:tag' for `restricted-sexp' (not in a choice, set,


From: Lars Ingebrigtsen
Subject: bug#35133: 26.1; 1) `:tag' for `restricted-sexp' (not in a choice, set, etc.), 2) Remove `Value Menu' if a no-op
Date: Wed, 09 Dec 2020 15:51:50 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Drew Adams <drew.adams@oracle.com> writes:

> 1. Use `M-x customize-option' for each of these:
>
> (defcustom foo 42
>   "Foo..."
>   :type '(restricted-sexp
>           :tag "Positive integer"
>           :match-alternatives ((lambda (x) (and (natnump x)  (not (zerop 
> x)))))
>           :value ignore))
>
> (defcustom bar 42
>   "Bar..."
>   :type '(choice (restricted-sexp
>                   :tag "Positive integer"
>                   :match-alternatives ((lambda (x) (and (natnump x)  (not 
> (zerop x)))))
>                   :value ignore)))
>
> The `:tag' has no effect for `foo' - there is no label.  I think that
> according to the doc it should have the same effect as for `bar'.

I can confirm that this behaviour is still present in Emacs 28.  Mauro,
if you have time, could you take a look at this?

> 2. In addition, a reasonable and helpful enhancement for `choice' would
> be to not show `Value Menu' at all if there is only one choice
> available (i.e., when that button/menu is a no-op).

Makes sense.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

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