all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#1041: 23.0.60; Custom variable not turned on after autoload
@ 2008-09-28  1:30 Lennart Borgman (gmail)
  2008-09-28 23:19 ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Lennart Borgman (gmail) @ 2008-09-28  1:30 UTC (permalink / raw)
  To: emacs-pretest-bug

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'






^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#1041: 23.0.60; Custom variable not turned on after autoload
  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
  2011-07-10  0:24   ` Glenn Morris
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2008-09-28 23:19 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: 1041, emacs-pretest-bug

> 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






^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#1041: 23.0.60; Custom variable not turned on after autoload
  2008-09-28 23:19 ` Stefan Monnier
@ 2011-07-10  0:24   ` Glenn Morris
  0 siblings, 0 replies; 3+ messages in thread
From: Glenn Morris @ 2011-07-10  0:24 UTC (permalink / raw)
  To: 1041-done


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.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-07-10  0:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2011-07-10  0:24   ` Glenn Morris

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.