From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#5162: 23.1.90; display-time broken in non-X build Date: Thu, 10 Dec 2009 02:58:36 -0500 Message-ID: References: <87y6lclc3q.fsf@turtle.gmx.de> <84d42nbmzg.fsf@fencepost.gnu.org> Reply-To: Stefan Monnier , 5162@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 1260432476 23494 80.91.229.12 (10 Dec 2009 08:07:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 10 Dec 2009 08:07:56 +0000 (UTC) Cc: 5162@emacsbugs.donarmstrong.com, Sven Joachim To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Dec 10 09:07:48 2009 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 1NIe3q-0004SJ-RH for geb-bug-gnu-emacs@m.gmane.org; Thu, 10 Dec 2009 09:07:43 +0100 Original-Received: from localhost ([127.0.0.1]:35889 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NIe3q-0000O6-O2 for geb-bug-gnu-emacs@m.gmane.org; Thu, 10 Dec 2009 03:07:42 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NIe3i-0000LO-V6 for bug-gnu-emacs@gnu.org; Thu, 10 Dec 2009 03:07:35 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NIe3d-0000Ic-VS for bug-gnu-emacs@gnu.org; Thu, 10 Dec 2009 03:07:34 -0500 Original-Received: from [199.232.76.173] (port=52032 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NIe3d-0000IS-SI for bug-gnu-emacs@gnu.org; Thu, 10 Dec 2009 03:07:29 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:52297) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NIe3d-0005X8-6Y for bug-gnu-emacs@gnu.org; Thu, 10 Dec 2009 03:07:29 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nBA87Q76030968; Thu, 10 Dec 2009 00:07:26 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id nBA8544e030134; Thu, 10 Dec 2009 00:05:04 -0800 Resent-Date: Thu, 10 Dec 2009 00:05:04 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Stefan Monnier Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Thu, 10 Dec 2009 08:05:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 5162 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 5162-submit@emacsbugs.donarmstrong.com id=B5162.126043192429218 (code B ref 5162); Thu, 10 Dec 2009 08:05:04 +0000 Original-Received: (at 5162) by emacsbugs.donarmstrong.com; 10 Dec 2009 07:58:44 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from ironport2-out.pppoe.ca (ironport2-out.teksavvy.com [206.248.154.183]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nBA7wgbg029210 for <5162@emacsbugs.donarmstrong.com>; Wed, 9 Dec 2009 23:58:44 -0800 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvYEABI5IEtMCpT8/2dsb2JhbACBS9NUhCwEihw X-IronPort-AV: E=Sophos;i="4.47,374,1257138000"; d="scan'208";a="51306117" Original-Received: from 76-10-148-252.dsl.teksavvy.com (HELO pastel.home) ([76.10.148.252]) by ironport2-out.pppoe.ca with ESMTP; 10 Dec 2009 02:58:36 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id AC5118065; Thu, 10 Dec 2009 02:58:36 -0500 (EST) In-Reply-To: (Glenn Morris's message of "Thu, 10 Dec 2009 00:03:34 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Thu, 10 Dec 2009 03:07:34 -0500 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:33454 Archived-At: >>> The with and without-x loaddefs.el files are no longer identical. >> Then we need to detect this situation somehow and cause loaddefs.el to >> be updated correspondingly. > The only idea I had was to regenerate loaddefs from scratch whenever > src/config.h changes. I think the way to make it work is to let autoload.el store the autoload-excludes in the loaddefs.el file (as a special comment, similar to the special comment listing the files that had no autoload cookies). Then autoload can compare the old list with the new one and force scan any new unexcluded file, even if it's older than the timestamp. Tho, maybe just not storing the auto-excludes in the "no-autoloads" section might be enough to do the trick. E.g. the patch below seems to do the trick for me, Stefan === modified file 'lisp/emacs-lisp/autoload.el' --- lisp/emacs-lisp/autoload.el 2009-11-07 01:55:16 +0000 +++ lisp/emacs-lisp/autoload.el 2009-12-10 07:52:26 +0000 @@ -457,8 +457,6 @@ relfile ;; nil until we found a cookie. output-start) - (if (member absfile autoload-excludes) - (message "Generating autoloads for %s...skipped" file) (with-current-buffer (or visited ;; It is faster to avoid visiting the file. (autoload-find-file file)) @@ -572,7 +570,7 @@ (message "Generating autoloads for %s...done" file)) (or visited ;; We created this buffer, so we should kill it. - (kill-buffer (current-buffer))))) + (kill-buffer (current-buffer)))) ;; If the entries were added to some other buffer, then the file ;; doesn't add entries to OUTFILE. (or (not output-start) otherbuf)))) @@ -729,8 +727,11 @@ ((not (stringp file))) ((or (not (file-exists-p file)) ;; Remove duplicates as well, just in case. - (member file done)) + (member file done) + ;; If the file is actually excluded. + (member (expand-file-name file) autoload-excludes)) ;; Remove the obsolete section. + (setq changed t) (autoload-remove-section (match-beginning 0))) ((not (time-less-p (nth 4 form) (nth 5 (file-attributes file)))) @@ -746,9 +747,11 @@ (setq files (delete file files))))) ;; Elements remaining in FILES have no existing autoload sections yet. (dolist (file files) - (if (autoload-generate-file-autoloads file nil buffer-file-name) - (push file no-autoloads) - (setq changed t))) + (cond + ((member (expand-file-name file) autoload-excludes) nil) + ((autoload-generate-file-autoloads file nil buffer-file-name) + (push file no-autoloads)) + (t (setq changed t)))) (when no-autoloads ;; Sort them for better readability.