branch: elpa/annotate commit 32e7d85fa2168cbb081e12a93a0cd179837f9e1a Author: Bastian Bechtold <ba...@bastibe.de> Commit: Bastian Bechtold <ba...@bastibe.de>
don't save files with no annotations --- annotate.el | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/annotate.el b/annotate.el index b58aa374a8..e6d18db435 100644 --- a/annotate.el +++ b/annotate.el @@ -5,7 +5,7 @@ ;; Maintainer: Bastian Bechtold ;; URL: https://github.com/bastibe/annotate.el ;; Created: 2015-06-10 -;; Version: 0.3.2 +;; Version: 0.3.3 ;; This file is NOT part of GNU Emacs. @@ -50,7 +50,7 @@ ;;;###autoload (defgroup annotate nil "Annotate files without changing them." - :version "0.3.2" + :version "0.3.3" :group 'text) ;;;###autoload @@ -180,7 +180,11 @@ (setq all-annotations (push (cons (buffer-file-name) file-annotations) all-annotations))) - (annotate-dump-annotation-data all-annotations) + ;; skip files with no annotations + (annotate-dump-annotation-data (cl-remove-if + (lambda (entry) + (eq nil (cdr entry))) + all-annotations)) (if annotate-use-messages (message "Annotations saved."))))