From: Lennart Borgman <lennart.borgman@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Emacs-Devel devel <emacs-devel@gnu.org>
Subject: Re: Defcustoms, how do users find them?
Date: Tue, 17 Nov 2009 15:22:12 +0100 [thread overview]
Message-ID: <e01d8a50911170622j33d7257n8dfd0155138c2184@mail.gmail.com> (raw)
In-Reply-To: <e01d8a50911161941q3b981951u85ab5ae9527d7729@mail.gmail.com>
On Tue, Nov 17, 2009 at 4:41 AM, Lennart Borgman
<lennart.borgman@gmail.com> wrote:
> On Tue, Nov 17, 2009 at 4:38 AM, Stefan Monnier
> <monnier@iro.umontreal.ca> 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"))
)))
next prev parent reply other threads:[~2009-11-17 14:22 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-16 21:11 Defcustoms, how do users find them? Lennart Borgman
2009-11-16 23:05 ` Stefan Monnier
2009-11-16 23:49 ` Lennart Borgman
2009-11-17 2:52 ` Stefan Monnier
2009-11-17 3:17 ` Lennart Borgman
2009-11-17 3:38 ` Stefan Monnier
2009-11-17 3:41 ` Lennart Borgman
2009-11-17 14:22 ` Lennart Borgman [this message]
2009-11-17 14:45 ` Lennart Borgman
2009-11-17 23:13 ` Lennart Borgman
2009-11-18 3:26 ` Stefan Monnier
2009-11-18 3:31 ` Lennart Borgman
2009-11-18 14:34 ` Stefan Monnier
2009-11-26 12:51 ` Lennart Borgman
2009-11-26 16:42 ` Lennart Borgman
2009-11-26 17:30 ` Stefan Monnier
2009-11-26 17:36 ` Lennart Borgman
2009-11-27 2:09 ` Stefan Monnier
2009-11-27 2:22 ` Lennart Borgman
2009-11-26 16:45 ` Stefan Monnier
2009-11-17 10:03 ` Juri Linkov
2009-11-17 17:24 ` Glenn Morris
2009-11-18 9:57 ` Juri Linkov
2009-11-18 14:37 ` Stefan Monnier
2009-11-17 17:49 ` Drew Adams
2009-11-17 17:56 ` Lennart Borgman
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=e01d8a50911170622j33d7257n8dfd0155138c2184@mail.gmail.com \
--to=lennart.borgman@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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).