all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Luc Teirlinck <teirllm@dms.auburn.edu>
Cc: rms@gnu.org, emacs-devel@gnu.org, monnier@iro.umontreal.ca,
	drew.adams@oracle.com, abraham@dina.kvl.dk
Subject: Re: Eliminating "changed in Emacs outside of Customize"
Date: Tue, 1 Feb 2005 19:03:30 -0600 (CST)	[thread overview]
Message-ID: <200502020103.j1213U805651@raven.dms.auburn.edu> (raw)
In-Reply-To: <00ea01c508ae$34589740$0200a8c0@sedrcw11488> (lennart.borgman.073@student.lu.se)

Lennart Borgman wrote:

   Could you please take this a little bit more precise? I vaugely remember the
   discussion, but not the details. It looks to me that there is a mixing of
   things. Why should :initialize execute :set if it only is for the purpose of
   initializing something, but not actually setting the symbol value? Should
   not that code then be in :initialize?

If I remember correctly, it is for the sake of autoloaded defcustoms.
For those, loaddefs.el sets the value, but does not execute the :set
function, because it does not know the :set function.  When the file
is later loaded, `custom-initialize-reset' assures that the :set
function gets executed.  This usually leads to the correct behavior
for people who customized the value using Custom, but can easily lead
to very wrong results for people who set it outside Custom.

So how do you get around the above problem if you can not use the
default :initialize function, because you do not want to force people
to use Custom to set your variable?

The problem that `custom-initialize-reset' tries to address only
occurs when the _"standard"_ (or "Stock" or ...) value requires a :set
function to be properly initialized.  I personally try to avoid such a
situation in the defcustoms I write.

The problem also does not occur if you do not autoload the defcustom.
That will become more difficult.  Indeed, `custom-set-variables' used
to (actually still does, I believe) keep track of :require's using
stuff like:

'(global-font-lock-mode t nil (font-core))

where (font-core) says to load the file "font-core".

If I understood correctly, this feature is scheduled for elimination,
because it creates incompatibility between different Emacs versions.
Instead, it is planned to autoload the defcustoms in question to
record the :require's that way.  The person implementing this will
have to very carefully grep for :initialize in addition to :require
keywords to make sure that this does not break anything.  Of course,
one could eliminate the :initialize problem completely by making
loaddefs _execute_ the :require (maybe it already does), but, unless I
misunderstand something, in that case one could just as well preload
the file and then there is no need for an autoload and there is no
problem whatsoever.

Sincerely,

Luc.

  reply	other threads:[~2005-02-02  1:03 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-26  0:03 Eliminating "changed in Emacs outside of Customize" Richard Stallman
2005-01-31 10:33 ` Per Abrahamsen
2005-02-01 13:30   ` Richard Stallman
2005-02-01 14:32     ` Per Abrahamsen
2005-02-01 18:58       ` Drew Adams
2005-02-01 20:04         ` Stefan Monnier
2005-02-01 20:38           ` Drew Adams
2005-02-01 20:44           ` David Kastrup
2005-02-01 21:05             ` Drew Adams
2005-02-01 23:52               ` Robert J. Chassell
2005-02-01 21:19             ` Lennart Borgman
2005-02-01 21:35               ` David Kastrup
2005-02-01 22:11                 ` Luc Teirlinck
2005-02-01 22:26                   ` Lennart Borgman
2005-02-02  1:03                     ` Luc Teirlinck [this message]
2005-02-02  1:34                       ` Drew Adams
2005-02-02  2:11                         ` Luc Teirlinck
2005-02-02  2:51                         ` Luc Teirlinck
2005-02-03  6:40                       ` Richard Stallman
2005-02-01 22:28                   ` David Kastrup
2005-02-01 22:40                   ` Drew Adams
2005-02-03  6:39                     ` Richard Stallman
2005-02-03  7:29                       ` Lennart Borgman
2005-02-05  5:27                         ` Richard Stallman
2005-02-03 16:54                       ` Drew Adams
2005-02-01 22:40                 ` Drew Adams
2005-02-01 21:25           ` Lennart Borgman
2005-02-03  6:39             ` Richard Stallman
2005-02-02  7:57           ` Per Abrahamsen
2005-02-02 18:33             ` Drew Adams
2005-02-02 21:04               ` Lennart Borgman
2005-02-02 22:11                 ` Drew Adams
2005-02-02 22:55                   ` Stefan Monnier
2005-02-02 22:45                 ` Luc Teirlinck
2005-02-03 15:49                   ` Lennart Borgman
2005-02-03 16:12                     ` Luc Teirlinck
2005-02-03 15:51                   ` Lennart Borgman
2005-02-03 16:01                     ` Lennart Borgman
2005-02-03 19:14                 ` Richard Stallman
2005-02-04  7:27                   ` Lennart Borgman
2005-02-03 19:12             ` Richard Stallman
2005-02-03 19:45               ` Stefan Monnier
2005-02-03 19:59                 ` Lennart Borgman
2005-02-03 20:34                   ` Stefan Monnier
2005-02-05  5:31                 ` Richard Stallman
2005-02-03 20:53               ` Drew Adams
2005-02-03 22:08                 ` Luc Teirlinck
2005-02-03 22:13                 ` Luc Teirlinck
2005-02-04  1:04                 ` Luc Teirlinck
2005-02-04  1:31                 ` Luc Teirlinck
2005-02-04  3:16                   ` Luc Teirlinck
2005-02-03 21:10               ` Robert J. Chassell
2005-02-03  6:39           ` Richard Stallman
2005-02-03  6:41       ` Richard Stallman
2005-02-03 14:42         ` Stefan Monnier
2005-02-03 15:23           ` Luc Teirlinck
2005-02-03 15:48           ` Luc Teirlinck
2005-02-01 15:41   ` Lennart Borgman
2005-02-02  7:40     ` Per Abrahamsen

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200502020103.j1213U805651@raven.dms.auburn.edu \
    --to=teirllm@dms.auburn.edu \
    --cc=abraham@dina.kvl.dk \
    --cc=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=rms@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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.