bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#23692: 25.1.50; Package.el gets confused if file has no autoloads (c


From: Stefan Monnier
Subject: bug#23692: 25.1.50; Package.el gets confused if file has no autoloads (could be a bug in update-directory-autoloads)
Date: Wed, 08 Jun 2016 21:47:04 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

>>> When the a single-package file has no autoloads, the call to
>>> update-directory-autoloads leaves the generated autoload files
>>> modified, but unsaved. This causes package.el to prompt the user
>>> about killing a modified file.

Does the patch below fix the problem for you?


        Stefan


diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el
index 6473e31..9cf96fd 100644
--- a/lisp/emacs-lisp/autoload.el
+++ b/lisp/emacs-lisp/autoload.el
@@ -1111,7 +1111,8 @@ write its autoloads into the specified file instead."
 
       ;; Don't modify the file if its content has not been changed, so `make'
       ;; dependencies don't trigger unnecessarily.
-      (when changed
+      (if (not changed)
+          (set-buffer-modified-p nil)
         (let ((version-control 'never))
           (save-buffer)))
 





reply via email to

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