emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] 12/14: company-continue-commands: change the default value


From: Dmitry Gutov
Subject: [elpa] 12/14: company-continue-commands: change the default value
Date: Tue, 18 Feb 2014 05:51:03 +0000

dgutov pushed a commit to branch master
in repository elpa.

commit 1cf532d0f879be58dfefb0fab64011b732b67b4a
Author: Dmitry Gutov <address@hidden>
Date:   Tue Feb 18 07:37:17 2014 +0200

    company-continue-commands: change the default value
---
 NEWS.md    |    3 ++-
 company.el |    7 ++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/NEWS.md b/NEWS.md
index 6dd9005..23c1411 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -3,7 +3,8 @@
 ## Next
 
 * New back-end command, `match`, for non-prefix completion.
-* New user option `company-continue-commands`.
+* New user option `company-continue-commands`. The default value aborts
+  completion on buffer saving commands.
 * New back-end command, `annotation`, for text displayed inline in the popup
   that's not a part of completion candidate.
 * `company-capf`, `company-clang` and `company-eclim` use `annotation`.
diff --git a/company.el b/company.el
index 6275dea..fb1547a 100644
--- a/company.el
+++ b/company.el
@@ -495,7 +495,9 @@ treated as if it was on this list."
                  (const :tag "Self insert command" '(self-insert-command))
                  (repeat :tag "Commands" function)))
 
-(defcustom company-continue-commands t
+(defcustom company-continue-commands '(not save-buffer save-some-buffers
+                                           save-buffers-kill-terminal
+                                           save-buffers-kill-emacs)
   "A list of commands that are allowed during completion.
 If this is t, or if `company-begin-commands' is t, any command is allowed.
 Otherwise, the value must be a list of symbols.  If it starts with `not',
@@ -503,6 +505,9 @@ the cdr is the list of commands that abort completion.  
Otherwise, all
 commands except those in that list, or in `company-begin-commands', or
 commands in the `company-' namespace, abort completion."
   :type '(choice (const :tag "Any command" t)
+                 (cons  :tag "Any except"
+                        (const not)
+                        (repeat :tag "Commands" function))
                  (repeat :tag "Commands" function)))
 
 (defcustom company-show-numbers nil



reply via email to

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