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: Drew Adams
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, 3 Apr 2019 20:05:32 -0700 (PDT)

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'.


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).


In GNU Emacs 26.1 (build 1, x86_64-w64-mingw32)
 of 2018-05-30
Repository revision: 07f8f9bc5a51f5aa94eb099f3e15fbe0c20ea1ea
Windowing system distributor `Microsoft Corp.', version 10.0.17134
Configured using:
 `configure --without-dbus --host=x86_64-w64-mingw32
 --without-compress-install 'CFLAGS=-O2 -static -g3''





reply via email to

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