GNU bug report logs - #1041
23.0.60; Custom variable not turned on after autoload

Previous Next

Package: emacs;

Reported by: "Lennart Borgman (gmail)" <lennart.borgman <at> gmail.com>

Date: Sun, 28 Sep 2008 01:40:04 UTC

Severity: normal

Tags: moreinfo

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 1041 in the body.
You can then email your comments to 1041 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1041; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to "Lennart Borgman (gmail)" <lennart.borgman <at> gmail.com>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Lennart Borgman (gmail)" <lennart.borgman <at> gmail.com>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.0.60; Custom variable not turned on after autoload
Date: 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 GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600)
 of 2008-09-27 on LENNART-69DE564
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --no-opt --cflags
-Ic:/g/include -fno-crossjumping'




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1041; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #10 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: "Lennart Borgman \(gmail\)" <lennart.borgman <at> gmail.com>
Cc: 1041 <at> debbugs.gnu.org, emacs-pretest-bug <at> gnu.org
Subject: Re: bug#1041: 23.0.60; Custom variable not turned on after autoload
Date: Sun, 28 Sep 2008 19:19:24 -0400
> 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




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1041; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Tags added: moreinfo Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Tue, 30 Sep 2008 07:15:03 GMT) Full text and rfc822 format available.

Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Sun, 10 Jul 2011 00:25:02 GMT) Full text and rfc822 format available.

Notification sent to "Lennart Borgman (gmail)" <lennart.borgman <at> gmail.com>:
bug acknowledged by developer. (Sun, 10 Jul 2011 00:25:02 GMT) Full text and rfc822 format available.

Message #22 received at 1041-done <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 1041-done <at> debbugs.gnu.org
Subject: Re: bug#1041: 23.0.60; Custom variable not turned on after autoload
Date: Sat, 09 Jul 2011 20:24:00 -0400
Closed due to lack of response.

Stefan Monnier wrote:

>  Also, please provide a test case (ideally even outside of nxhtml)
> that shows the problem you're describing.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 07 Aug 2011 11:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 321 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.