all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: "Lennart Borgman \(gmail\)" <lennart.borgman@gmail.com>
Cc: 1041@emacsbugs.donarmstrong.com, emacs-pretest-bug@gnu.org
Subject: bug#1041: 23.0.60; Custom variable not turned on after autoload
Date: Sun, 28 Sep 2008 19:19:24 -0400	[thread overview]
Message-ID: <jwv7i8v2732.fsf-monnier+emacsbugreports@gnu.org> (raw)
In-Reply-To: <48DEDE28.90906@gmail.com> (Lennart Borgman's message of "Sun, 28 Sep 2008 03:30:16 +0200")

> I just changed som (require ...) to autoloads and noticed that some
> things stopped working. It looks like custom variables are not turned on
> correctly after autoload. The loading is done after
> custom-set-variables. Here is how I handle one such case now:


> ;;;###autoload
> (define-globalized-minor-mode nxhtml-global-minor-mode
>   nxhtml-minor-mode
>   nxhtml-maybe-turn-on-minor-mode
>   :require 'nxhtml-menu
>   :group 'nxhtml)
> (custom-reevaluate-setting 'nxhtml-global-minor-mode)
> (when nxhtml-global-minor-mode (nxhtml-global-minor-mode 1))


> I am not sure about the details and I do not have time to look into it
> right now, but it looks like the saved values are not used after the
> autoload. This is what I use `custom-reevaluate-setting' above for.

> The line below is for a problem when loading the library with a minor
> mode after custom-set-variables have been called. I have reported this
> problem long ago and have a patch for it. (I am not sure if this bug is
> still there since I distribute most of my libraries with something like
> the last line above. I get no bug reports about it.)

In theory, both the custom-reevaluate-setting and the `when' line should
not be needed (and are undesirable).  Also, please provide a test case
(ideally even outside of nxhtml) that shows the problem you're
describing.


        Stefan






  reply	other threads:[~2008-09-28 23:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-28  1:30 bug#1041: 23.0.60; Custom variable not turned on after autoload Lennart Borgman (gmail)
2008-09-28 23:19 ` Stefan Monnier [this message]
2011-07-10  0:24   ` Glenn Morris

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=jwv7i8v2732.fsf-monnier+emacsbugreports@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=1041@emacsbugs.donarmstrong.com \
    --cc=emacs-pretest-bug@gnu.org \
    --cc=lennart.borgman@gmail.com \
    /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.