Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Stop package.el from leaving open autoload files lying around.

  • Loading branch information...
commit 3048cd4ca309ac09f932d91ba042f3d6724e04a3 1 parent d035d87
Steve Purcell authored
Showing with 11 additions and 0 deletions.
  1. +11 −0 init-elpa.el
11 init-elpa.el
View
@@ -13,6 +13,17 @@
;;------------------------------------------------------------------------------
+;; Patch up annoying package.el quirks
+;;------------------------------------------------------------------------------
+
+(defadvice package-generate-autoloads (after close-autoloads (name pkg-dir) activate)
+ "Stop package.el from leaving open autoload files lying around."
+ (let ((path (expand-file-name (concat name "-autoloads.el") pkg-dir)))
+ (with-current-buffer (find-file-existing path)
+ (kill-buffer nil))))
+
+
+;;------------------------------------------------------------------------------
;; Add support to package.el for pre-filtering available packages
;;------------------------------------------------------------------------------
Please sign in to comment.
Something went wrong with that request. Please try again.