From c58998e8e4ebf93434c77b5b7b2691213a3533c8 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Sun, 24 Mar 2013 02:19:02 +0400 Subject: [PATCH] global-company-mode: extract turn-on function --- NEWS.md | 4 ++++ company.el | 10 ++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/NEWS.md b/NEWS.md index a16a8df74..e05f1097f 100644 --- 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. diff --git a/company.el b/company.el index 0ddc9451b..e7e054032 100644 --- a/company.el +++ b/company.el @@ -4,7 +4,7 @@ ;; Author: Nikolaj Schumacher ;; Maintainer: Dmitry Gutov -;; 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 -- 2.39.2