Dribble save cleanup
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Thu, 1 Aug 2013 14:22:35 +0000 (16:22 +0200)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Thu, 1 Aug 2013 14:22:35 +0000 (16:22 +0200)
* gnus-start.el (gnus-dribble-save): Only save the dribble file if it's
not empty.

lisp/ChangeLog
lisp/gnus-start.el

index 5ef2034..35dd9a8 100644 (file)
@@ -1,5 +1,8 @@
 2013-08-01  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * gnus-start.el (gnus-dribble-save): Only save the dribble file if it's
+       not empty.
+
        * nnrss.el (nnrss-discover-feed): Indent.
 
 2013-08-01  Katsumi Yamaoka  <yamaoka@jpl.org>
index e27fb52..9f3f469 100644 (file)
@@ -944,7 +944,8 @@ If REGEXP is given, lines that match it will be deleted."
   (when (and gnus-dribble-buffer
             (buffer-name gnus-dribble-buffer))
     (with-current-buffer gnus-dribble-buffer
-      (save-buffer))))
+      (when (> (buffer-size) 0)
+       (save-buffer)))))
 
 (defun gnus-dribble-clear ()
   (when (gnus-buffer-exists-p gnus-dribble-buffer)