]> code.delx.au - gnu-emacs-elpa/blobdiff - company-eclim.el
Bumped copyright years.
[gnu-emacs-elpa] / company-eclim.el
index 9f5c507434609155fc4fad4b0f9e217f431008a5..97487fc69f97525e696cc58cb1aef06612fe2744 100644 (file)
@@ -1,6 +1,6 @@
 ;;; company-eclim.el --- a company-mode completion back-end for eclim.
 ;;
-;; Copyright (C) 2009 Nikolaj Schumacher
+;; Copyright (C) 2009-2010 Nikolaj Schumacher
 ;;
 ;; This file is part of company 0.4.3.
 ;;
@@ -35,7 +35,7 @@
   :group 'company
   :type 'file)
 
-(defcustom company-eclim-auto-save nil
+(defcustom company-eclim-auto-save t
   "*Determines whether to save the buffer when retrieving completions.
 eclim can only complete correctly when the buffer has been saved."
   :group 'company
@@ -97,7 +97,8 @@ eclim can only complete correctly when the buffer has been saved."
                                           (company-eclim--project-dir)))
         (project-name (company-eclim--project-name)))
     (when company-eclim-auto-save
-      (save-buffer)
+      (when (buffer-modified-p)
+        (basic-save-buffer))
       ;; FIXME: Sometimes this isn't finished when we complete.
       (company-eclim--call-process "java_src_update"
                                   "-p" (company-eclim--project-name)