From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs,gmane.emacs.pretest.bugs Subject: bug#1041: 23.0.60; Custom variable not turned on after autoload Date: Sun, 28 Sep 2008 19:19:24 -0400 Message-ID: References: <48DEDE28.90906@gmail.com> Reply-To: Stefan Monnier , 1041@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1222644613 10316 80.91.229.12 (28 Sep 2008 23:30:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 28 Sep 2008 23:30:13 +0000 (UTC) Cc: 1041@emacsbugs.donarmstrong.com, emacs-pretest-bug@gnu.org To: "Lennart Borgman \(gmail\)" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 29 01:31:11 2008 connect(): Connection refused Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Kk5jI-000804-Sr for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 Sep 2008 01:31:09 +0200 Original-Received: from localhost ([127.0.0.1]:38559 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kk5iG-0001Ya-5S for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 Sep 2008 19:30:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kk5iB-0001Wf-Um for bug-gnu-emacs@gnu.org; Sun, 28 Sep 2008 19:30:00 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kk5iB-0001WL-2Z for bug-gnu-emacs@gnu.org; Sun, 28 Sep 2008 19:29:59 -0400 Original-Received: from [199.232.76.173] (port=52729 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kk5iA-0001WB-Tg for bug-gnu-emacs@gnu.org; Sun, 28 Sep 2008 19:29:58 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:56776) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Kk5iA-0004Hu-As for bug-gnu-emacs@gnu.org; Sun, 28 Sep 2008 19:29:58 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8SNTtI9012865; Sun, 28 Sep 2008 16:29:55 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m8SNP3bi011721; Sun, 28 Sep 2008 16:25:03 -0700 X-Loop: don@donarmstrong.com Resent-From: Stefan Monnier Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sun, 28 Sep 2008 23:25:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1041 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.122264397110489 (code B ref -1); Sun, 28 Sep 2008 23:25:03 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 28 Sep 2008 23:19:31 +0000 Original-Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8SNJRTx010482 for ; Sun, 28 Sep 2008 16:19:29 -0700 Original-Received: from mx10.gnu.org ([199.232.76.166]:34387) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1Kk5Vs-00058P-MG for emacs-pretest-bug@gnu.org; Sun, 28 Sep 2008 19:17:16 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Kk5Xy-00036R-BI for emacs-pretest-bug@gnu.org; Sun, 28 Sep 2008 19:19:26 -0400 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]:31085 helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kk5Xy-00036J-3F for emacs-pretest-bug@gnu.org; Sun, 28 Sep 2008 19:19:26 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgUFAIet30jO+KDT/2dsb2JhbACBYrcpgWeBBA X-IronPort-AV: E=Sophos;i="4.33,327,1220241600"; d="scan'208";a="27688926" Original-Received: from 206-248-160-211.dsl.teksavvy.com (HELO ceviche.home) ([206.248.160.211]) by ironport2-out.teksavvy.com with ESMTP; 28 Sep 2008 19:19:25 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 7B3BEB47A6; Sun, 28 Sep 2008 19:19:24 -0400 (EDT) In-Reply-To: <48DEDE28.90906@gmail.com> (Lennart Borgman's message of "Sun, 28 Sep 2008 03:30:16 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Sun, 28 Sep 2008 19:29:59 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:20864 gmane.emacs.pretest.bugs:23108 Archived-At: > 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