]> code.delx.au - gnu-emacs-elpa/commitdiff
global-company-mode: extract turn-on function
authorDmitry Gutov <dgutov@yandex.ru>
Sat, 23 Mar 2013 22:19:02 +0000 (02:19 +0400)
committerDmitry Gutov <dgutov@yandex.ru>
Sat, 23 Mar 2013 22:19:15 +0000 (02:19 +0400)
NEWS.md
company.el

diff --git a/NEWS.md b/NEWS.md
index a16a8df74bdd67f384e6cb688ff940c7d56557aa..e05f1097f01164d0507f60c83208e7de2d197351 100644 (file)
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,5 +1,9 @@
 # History of user-visible changes
 
+## 2013-03-24 (0.6.2)
+
+* `global-company-mode` is now autoloaded.
+
 ## 2013-03-23 (0.6.1)
 
 * Documented `init` and `post-completion` back-end commands.
index 0ddc9451b93ed2999e928a8e45776a9608b33157..e7e054032a3feb81ff177eb4de8820f7c5fddde0 100644 (file)
@@ -4,7 +4,7 @@
 
 ;; Author: Nikolaj Schumacher
 ;; Maintainer: Dmitry Gutov <dgutov@yandex.ru>
-;; Version: 0.6.1
+;; Version: 0.6.2
 ;; Keywords: abbrev, convenience, matching
 ;; URL: http://company-mode.github.com/
 ;; Compatibility: GNU Emacs 22.x, GNU Emacs 23.x, GNU Emacs 24.x
@@ -551,9 +551,11 @@ keymap during active completions (`company-active-map'):
     (kill-local-variable 'company-point)))
 
 ;;;###autoload
-(define-globalized-minor-mode global-company-mode company-mode
-  (lambda () (unless (or noninteractive (eq (aref (buffer-name) 0) ?\s))
-          (company-mode 1))))
+(define-globalized-minor-mode global-company-mode company-mode company-mode-on)
+
+(defun company-mode-on ()
+  (unless (or noninteractive (eq (aref (buffer-name) 0) ?\s))
+    (company-mode 1)))
 
 (defsubst company-assert-enabled ()
   (unless company-mode