[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Defcustoms, how do users find them?
From: |
Lennart Borgman |
Subject: |
Re: Defcustoms, how do users find them? |
Date: |
Tue, 17 Nov 2009 15:22:12 +0100 |
On Tue, Nov 17, 2009 at 4:41 AM, Lennart Borgman
<address@hidden> wrote:
> On Tue, Nov 17, 2009 at 4:38 AM, Stefan Monnier
> <address@hidden> wrote:
>>> If it is really annoying to autoload defcustoms then maybe autoloading
>>> just defgroups would be a possibility? (Or are they already autoloaded
>>> in some way?)
>>
>> Yes, groups are autoloaded, thanks to cus-load.el.
>> We could make customize-variable's completion complete to all
>> defcustoms, using a similar scheme (and have customize-variable
>> automatically load the var's package if it's not yet loaded).
>> But autoloading the defcustoms is out of the question.
>
> I think that would solve the problem - if help/apropos functions also
> loaded the var's package.
As I understand it we then first have to modify
custom-make-dependencies so that it also collects defcustoms. Changing
the part where it write 'custom-loads to cus-dep.el should is enough
for this I guess, see below. Is this the way to do it? (And then add
the corresponding pieces to custom-variable-prompt etc.)
*** In custom-make-dependencies change to this ****
(mapatoms (lambda (symbol)
(let ((members (get symbol 'custom-group))
where found
(option (get symbol 'standard-value))
option-where option-found
)
(when members
(dolist (member
;; So x and no-x builds won't differ.
(sort (mapcar 'car members) 'string<))
(setq where (get member 'custom-where))
(unless (or (null where)
(member where found))
(push where found)))
(when found
(insert "(put '" (symbol-name symbol)
" 'custom-loads '")
(prin1 (nreverse found) (current-buffer))
(insert ")\n")))
(when option
(setq option-where (get option 'custom-where))
(push option-where option-found)
(insert "(put '" (symbol-name symbol)
" 'custom-option-loads '")
(prin1 (nreverse found) (current-buffer))
(insert ")\n"))
)))
- Defcustoms, how do users find them?, Lennart Borgman, 2009/11/16
- Re: Defcustoms, how do users find them?, Stefan Monnier, 2009/11/16
- Re: Defcustoms, how do users find them?, Lennart Borgman, 2009/11/16
- Re: Defcustoms, how do users find them?, Stefan Monnier, 2009/11/16
- Re: Defcustoms, how do users find them?, Lennart Borgman, 2009/11/16
- Re: Defcustoms, how do users find them?, Stefan Monnier, 2009/11/16
- Re: Defcustoms, how do users find them?, Lennart Borgman, 2009/11/16
- Re: Defcustoms, how do users find them?,
Lennart Borgman <=
- Re: Defcustoms, how do users find them?, Lennart Borgman, 2009/11/17
- Re: Defcustoms, how do users find them?, Lennart Borgman, 2009/11/17
- Re: Defcustoms, how do users find them?, Stefan Monnier, 2009/11/17
- Re: Defcustoms, how do users find them?, Lennart Borgman, 2009/11/17
- Re: Defcustoms, how do users find them?, Stefan Monnier, 2009/11/18
- Re: Defcustoms, how do users find them?, Lennart Borgman, 2009/11/26
- Re: Defcustoms, how do users find them?, Lennart Borgman, 2009/11/26
- Re: Defcustoms, how do users find them?, Stefan Monnier, 2009/11/26
- Re: Defcustoms, how do users find them?, Lennart Borgman, 2009/11/26
- Re: Defcustoms, how do users find them?, Stefan Monnier, 2009/11/26