unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Glenn Morris <rgm@gnu.org>
Cc: 5162@emacsbugs.donarmstrong.com, Sven Joachim <svenjoac@gmx.de>
Subject: bug#5162: 23.1.90; display-time broken in non-X build
Date: Thu, 10 Dec 2009 02:58:36 -0500	[thread overview]
Message-ID: <jwvljhb8et3.fsf-monnier+emacsbugreports@gnu.org> (raw)
In-Reply-To: <r5bpi7xvx5.fsf@fencepost.gnu.org> (Glenn Morris's message of "Thu, 10 Dec 2009 00:03:34 -0500")

>>> 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.






  reply	other threads:[~2009-12-10  7:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-09  9:40 bug#5162: 23.1.90; display-time broken in non-X build Sven Joachim
2009-12-10  2:07 ` Glenn Morris
2009-12-10  4:07   ` Stefan Monnier
2009-12-10  5:03     ` Glenn Morris
2009-12-10  7:58       ` Stefan Monnier [this message]
2009-12-10 10:27         ` Sven Joachim
2009-12-10 19:09           ` Stefan Monnier
2009-12-10 22:22             ` Sven Joachim
2009-12-22  3:38               ` Glenn Morris
2009-12-10  9:22   ` Andreas Schwab
2009-12-10 17:09     ` Stefan Monnier
2009-12-10 17:17       ` Andreas Schwab
2009-12-10 18:51     ` Eli Zaretskii
2009-12-10 18:59       ` Glenn Morris
2009-12-10 19:09         ` Eli Zaretskii
2010-04-01 17:06 ` Chong Yidong

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvljhb8et3.fsf-monnier+emacsbugreports@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=5162@emacsbugs.donarmstrong.com \
    --cc=rgm@gnu.org \
    --cc=svenjoac@gmx.de \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).