emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: update-directory-autoloads: multiple calls override file?


From: Stefan Monnier
Subject: Re: update-directory-autoloads: multiple calls override file?
Date: Tue, 10 Jul 2007 10:13:26 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

> The behavior of  update-directory-autoloads seems to have changed after
> the CL cited at the end of this message.

> Until now, I could call that function on a list of directories one at
> a time, and have all the generated autoloads collected into a single file.

> But now, only the autoloads from the last of the directories
> appears to survive.

Hmm.... oh I think I know it's this change:

>       (update-directory-autoloads): Remove duplicate entries.

I believe the fix below (which I just installed) should fix it,
please confirm.


        Stefan


--- autoload.el 08 jui 2007 14:44:28 -0400      1.127
+++ autoload.el 10 jui 2007 10:08:45 -0400      
@@ -559,6 +559,7 @@
                                 (directory-files (expand-file-name dir)
                                                  t files-re))
                               dirs)))
+         (done ())
         (this-time (current-time))
          ;; Files with no autoload cookies or whose autoloads go to other
          ;; files because of file-local autoload-generated-file settings.
@@ -592,9 +593,9 @@
                           (push file no-autoloads)
                           (setq files (delete file files)))))))
                  ((not (stringp file)))
-                 ((not (and (file-exists-p file)
+                 ((or (not (file-exists-p file))
                              ;; Remove duplicates as well, just in case.
-                             (member file files)))
+                       (member file done))
                   ;; Remove the obsolete section.
                   (autoload-remove-section (match-beginning 0)))
                  ((not (time-less-p (nth 4 form)
@@ -606,6 +607,7 @@
                    (if (autoload-generate-file-autoloads
                         file (current-buffer) buffer-file-name)
                        (push file no-autoloads))))
+            (push file done)
            (setq files (delete file files)))))
       ;; Elements remaining in FILES have no existing autoload sections yet.
       (dolist (file files)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]