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

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

customize-group completions


From: Juri Linkov
Subject: customize-group completions
Date: Mon, 14 Nov 2005 22:44:45 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

Almost half of all completions available from the completion list of
`customize-group' are not group names, but option names.  This is due
to the completion predicate in `customize-group':

    (lambda (symbol)
      (or (get symbol 'custom-loads)
          (get symbol 'custom-group)))

It assumes that a group symbol has either `custom-loads' or `custom-group'
property.  Whereas `custom-group' is a reliable way to identify symbols
of customization groups, `custom-loads' is not, because non-groups symbols
have it too, since `custom-autoload' in loaddefs.el puts this property
on autoload options.  But `custom-autoload' also puts another property
`custom-autoload' on autoload options, and group symbols don't have
this property.  So how about filtering out symbols with
`custom-autoload' property?  This should leave only already loaded
groups and also groups with `custom-loads' property from cus-load.el:

    (lambda (symbol)
      (or (and (get symbol 'custom-loads)
               (not (get symbol 'custom-autoload)))
          (get symbol 'custom-group)))

However, it is possible that there is a group in cus-load.el with the
same name as autoload option in loaddefs.el.  In this case, this name
won't get into the completion list.  Maybe a better solution is to put
`custom-group' property explicitly on every group symbol in cus-load.el?

-- 
Juri Linkov
http://www.jurta.org/emacs/





reply via email to

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