unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#7851: `customize's presentation of :type (repeat plist) declarations
@ 2011-01-16 21:43 MON KEY
  2019-09-24 21:22 ` Mauro Aranda
  0 siblings, 1 reply; 3+ messages in thread
From: MON KEY @ 2011-01-16 21:43 UTC (permalink / raw)
  To: 7851

`customize's presentation of variables defined with a type speciifer:

 :type '(repeat plist :value-type (repeat symbol))

do not present a sensibly in customize buffers.

For example:

(defcustom *tt--ugly-plist-custom*
  '((:KEY-PL0-0 (sym0-0a sym0-0b sym0-0c)
     :KEY-PL0-1 (sym0-1a sym0-1b sym0-1c))
    (:KEY-PL1-0 (sym1-0a sym1-0b sym1-0c)
     :KEY-PL1-1 (sym1-1a sym1-1b sym1-1c)))
  "This variable will have an ugly customize presentation.
Evaluating the following form:\n
 \(customize-variable '*tt--ugly-plist-custom*\)\n
presents a buffer named \"*Customize *Tt  Ugly Plist Custom*\".\n
Notice that for each plist the first pair of nested buttons [INS]
\[DEL] is indented deeper than subsequent pairs within the same plist
element. IOW, Instead of prsenting:\n
\[INS] [DEL] Plist:
             [INS] [DEL] Key: :KEY-PL0-0
                            Value: \(sym0-0a sym0-0b sym0-0c\)
             [INS] [DEL] Key: :KEY-PL0-1
                            Value: \(sym0-1a sym0-1b sym0-1c\)
             [INS]\n
\[INS] [DEL] Plist:
             [INS] [DEL] Key: :KEY-PL1-0
                            Value: \(sym1-0a sym1-0b sym1-0c\)
             [INS] [DEL] Key: :KEY-PL1-1
                            Value: \(sym1-1a sym1-1b sym1-1c\)
             [INS]\n\n
We instead get a customize presentation like this:\n
\[INS] [DEL] Plist:
                            [INS] [DEL] Key: :KEY-PL0-0
                            Value: \(sym0-0a sym0-0b sym0-0c\)
             [INS] [DEL] Key: :KEY-PL0-1
                            Value: \(sym0-1a sym0-1b sym0-1c\)
             [INS]\n
\[INS] [DEL] Plist:
                            [INS] [DEL] Key: :KEY-PL1-0
                            Value: \(sym1-0a sym1-0b sym1-0c\)
             [INS] [DEL] Key: :KEY-PL1-1
                            Value: \(sym1-1a sym1-1b sym1-1c\)
             [INS]\n\n
This indentation style \"plist\" custom types is confusing.\n"
  :type '(repeat plist :value-type (repeat symbol))
  :group 'emacs)

(customize-variable '*tt--ugly-plist-custom*)

emacs-version => 23.2.1

--
/s_P\





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-09-25 12:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-16 21:43 bug#7851: `customize's presentation of :type (repeat plist) declarations MON KEY
2019-09-24 21:22 ` Mauro Aranda
2019-09-25 12:52   ` Lars Ingebrigtsen

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