unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Semantics of autoload cookies on defcustoms
Date: Sat, 08 Jul 2006 16:57:14 -0400	[thread overview]
Message-ID: <E1FzJrW-0001jm-Fh@fencepost.gnu.org> (raw)
In-Reply-To: <jwvbqs092p1.fsf-monnier+emacs@gnu.org> (message from Stefan Monnier on Fri, 07 Jul 2006 23:53:42 -0400)

    > That may be true, but Custom has to load the defcustom in order to see
    > what it does or does not have.

    But autoload does know whether there is a :setter, so it can decide whether
    to put a custom-autoload, thus informing Custom opf whether or not the
    package needs to be eagerly loaded.

That is true.  In the absence of a :set function and (perhaps) certain
other specific options, there is no need to load the file in order
to set the variable.

But it IS necessary to set the variable immediately, and not wait till
the file that defines it is loaded, in case the variable is used
elsewhere.  (This is not in fact the case for diary-file, but it could
be the case for other autoloaded defcustoms.)  This is what I proposed
as behavior #3.

Perhaps a good way to implement that is to write another argument into
the custom-autoload call.  That optional argument, if non-nil, would
specify this new combination of behaviors that I called #3.
The decision could be based on the presence of :set.

    > No, what I said does not go that far.  If it did not have an autoload
    > cookie, that would be better in this one way.  But there may be some
    > good reasons for it to have an autoload cookie.  I don't know.

    What good reason could there be?

1. To cause the variable to be visible for help commands
even if the file has not been loaded.

2. If other files use the variable.

  reply	other threads:[~2006-07-08 20:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-05  4:01 Semantics of autoload cookies on defcustoms Stefan Monnier
2006-07-07  4:15 ` Richard Stallman
2006-07-07 13:33   ` T. V. Raman
2006-07-07 14:10     ` Stefan Monnier
2006-07-08  1:13     ` Richard Stallman
2006-07-07 14:08   ` Stefan Monnier
2006-07-08  1:13     ` Richard Stallman
2006-07-08  3:53       ` Stefan Monnier
2006-07-08 20:57         ` Richard Stallman [this message]
2006-07-09  5:32           ` Stefan Monnier
2006-07-09 19:04             ` Richard Stallman
2006-07-10 16:12               ` Stefan Monnier
2006-07-11  5:51                 ` Richard Stallman
2006-07-13 21:13             ` Stefan Monnier
2006-07-16  6:26               ` Richard Stallman
2006-07-23  3:43                 ` Stefan Monnier

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=E1FzJrW-0001jm-Fh@fencepost.gnu.org \
    --to=rms@gnu.org \
    --cc=emacs-devel@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).