From a8e1496d750ab0f571b3412ff61aaa4da640a036 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 17 Nov 2011 16:34:16 -0500 Subject: [PATCH] autoload.el fix for bug#10049 * lisp/emacs-lisp/autoload.el (autoload-generate-file-autoloads): Ignore buffer-local generated-autoload-file if it is the same as the global value. --- lisp/ChangeLog | 6 ++++++ lisp/emacs-lisp/autoload.el | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 38efb16bd80..45a115ec566 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2011-11-17 Glenn Morris + + * emacs-lisp/autoload.el (autoload-generate-file-autoloads): + Ignore buffer-local generated-autoload-file if it is the same + as the global value. (Bug#10049) + 2011-11-17 Juanma Barranquero * textmodes/reftex-toc.el (reftex-toc-return-marker, reftex-toc-help) diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index 6d5067151d3..b3ac23b2b76 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -514,6 +514,13 @@ Return non-nil if and only if FILE adds no autoloads to OUTFILE (let ((secondary-autoloads-file-buf (if (local-variable-p 'generated-autoload-file) (current-buffer)))) + ;; Ignore a buffer-local setting if it points to the + ;; global value. Otherwise we end up writing a mix of md5s + ;; and time-stamps to the global file. (Bug#10049) + (and secondary-autoloads-file-buf + outfile + (not otherbuf) + (setq secondary-autoloads-file-buf nil)) (with-current-buffer (marker-buffer output-start) (save-excursion ;; Insert the section-header line which lists the file name -- 2.39.2