unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stephen Berman <stephen.berman@gmx.net>
To: 9660@debbugs.gnu.org
Subject: bug#9660: 24.0.90; completion-category-overrides defcustom
Date: Mon, 03 Oct 2011 13:22:35 +0200	[thread overview]
Message-ID: <878vp2z5dw.fsf@escher.home> (raw)

In GNU Emacs 24.0.90.2 (i686-suse-linux-gnu, GTK+ Version 2.22.1) of
 2011-10-03 on escher
Windowing system distributor `The X.Org Foundation', version 11.0.10903000
configured using `configure  '--without-toolkit-scroll-bars' 'CFLAGS=-g''

1. emacs -Q
2. M-x customize-option RET completion-category-overrides RET
=> The state says: "STANDARD. (mismatch)".  In addition, the only widget
is an editable field, containing the default value as a Lisp sexp; but
according to the defcustom code there should be an alist widget
containing various other widgets to support customization.

These problems are due to a typo and an oversight, corrected in the
patches below.

Aside from the bugs, I think the Customize interface here can be
improved from the point of view of a user ignorant of Lisp by using
helpful tags instead of the default widget labels "Set", "Cons-cell" and
so on.  The second patch below is an attempt to do this.  (This patch
also incorporates the fixes of the first patch, so if you like the tags,
only this patch should be applied, and if you don't, only the first
patch.)

Here's the straight bugfix:

*** /data/steve/bzr/emacs/trunk/lisp/minibuffer.el	2011-09-30 20:41:50.000000000 +0200
--- /data/steve/bzr/emacs/quickfixes/lisp/minibuffer.el	2011-10-03 12:38:27.000000000 +0200
***************
*** 503,511 ****
                                    symbol)
            :value-type
            (set
!            (cons (const style)
!                  (repeat ,@(mapcar (lambda (x) (list 'const (car x)))
!                                    completion-styles-alist)))
             (cons (const cycle)
                   (choice (const :tag "No cycling" nil)
                           (const :tag "Always cycle" t)
--- 503,511 ----
                                    symbol)
            :value-type
            (set
!            (cons (const styles)
!                  (repeat (choice ,@(mapcar (lambda (x) (list 'const (car x)))
! 					   completion-styles-alist))))
             (cons (const cycle)
                   (choice (const :tag "No cycling" nil)
                           (const :tag "Always cycle" t)

And here's the alternative patch with bugfixes + tags:

*** /data/steve/bzr/emacs/trunk/lisp/minibuffer.el	2011-09-30 20:41:50.000000000 +0200
--- /data/steve/bzr/emacs/quickfixes/lisp/minibuffer.el	2011-10-03 12:46:59.000000000 +0200
***************
*** 498,512 ****
  an association list that can specify properties such as:
  - `styles': the list of `completion-styles' to use for that category.
  - `cycle': the `completion-cycle-threshold' to use for that category."
!   :type `(alist :key-type (choice (const buffer)
                                    (const file)
                                    symbol)
            :value-type
!           (set
!            (cons (const style)
!                  (repeat ,@(mapcar (lambda (x) (list 'const (car x)))
!                                    completion-styles-alist)))
!            (cons (const cycle)
                   (choice (const :tag "No cycling" nil)
                           (const :tag "Always cycle" t)
                           (integer :tag "Threshold"))))))
--- 498,516 ----
  an association list that can specify properties such as:
  - `styles': the list of `completion-styles' to use for that category.
  - `cycle': the `completion-cycle-threshold' to use for that category."
!   :type `(alist :key-type (choice :tag "Category"
! 				  (const buffer)
                                    (const file)
                                    symbol)
            :value-type
!           (set :tag "Properties to override"
! 	   (cons :tag "Completion Styles"
! 		 (const :tag "Select a style from the menu;" styles)
! 		 (repeat :tag "insert a new menu to add more styles"
! 			 (choice ,@(mapcar (lambda (x) (list 'const (car x)))
! 					   completion-styles-alist))))
!            (cons :tag "Completion Cycling"
! 		 (const :tag "Select one value from the menu." cycle)
                   (choice (const :tag "No cycling" nil)
                           (const :tag "Always cycle" t)
                           (integer :tag "Threshold"))))))





             reply	other threads:[~2011-10-03 11:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-03 11:22 Stephen Berman [this message]
2011-10-03 14:50 ` bug#9660: 24.0.90; completion-category-overrides defcustom Stefan Monnier
2011-10-04  7:32   ` Stephen Berman

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=878vp2z5dw.fsf@escher.home \
    --to=stephen.berman@gmx.net \
    --cc=9660@debbugs.gnu.org \
    /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).