defcustom defaults to the group last defined in the file.
Refs #8
-;;; company-clang.el --- company-mode completion back-end for clang
+;;; company-clang.el --- company-mode completion back-end for Clang
;; Copyright (C) 2009, 2011, 2013 Free Software Foundation, Inc.
(require 'company-template)
(eval-when-compile (require 'cl))
+(defgroup company-clang nil
+ "Completion back-end for Clang."
+ :group 'company)
+
(defcustom company-clang-executable
(executable-find "clang")
"Location of clang executable."
- :group 'company-clang
:type 'file)
(defcustom company-clang-auto-save t
"Determines whether to save the buffer when retrieving completions.
clang can only complete correctly when the buffer has been saved."
- :group 'company-clang
:type '(choice (const :tag "Off" nil)
(const :tag "On" t)))
Prefix files (-include ...) can be selected with
`company-clang-set-prefix' or automatically through a custom
`company-clang-prefix-guesser'."
- :group 'company-clang
:type '(repeat (string :tag "Argument" nil)))
(defcustom company-clang-prefix-guesser 'company-clang-guess-prefix
"A function to determine the prefix file for the current buffer."
- :group 'company-clang
:type '(function :tag "Guesser function" nil))
(defvar company-clang-modes '(c-mode objc-mode)
(require 'company-dabbrev)
(eval-when-compile (require 'cl))
+(defgroup company-dabbrev-code nil
+ "dabbrev-like completion back-end for code."
+ :group 'company)
+
(defcustom company-dabbrev-code-modes
'(asm-mode batch-file-mode c++-mode c-mode cperl-mode csharp-mode css-mode
emacs-lisp-mode erlang-mode espresso-mode f90-mode fortran-mode
in comments or strings. In other modes `company-dabbrev-code' will pass control
to other back-ends \(e.g. `company-dabbrev'\).
Value t means complete in all modes."
- :group 'company
:type '(choice (repeat (symbol :tag "Major mode"))
(const tag "All modes" t)))
If `all', search all other buffers. If t, search buffers with the same
major mode.
See also `company-dabbrev-code-time-limit'."
- :group 'company
:type '(choice (const :tag "Off" nil)
(const :tag "Same major mode" t)
(const :tag "All" all)))
(defcustom company-dabbrev-code-time-limit .5
"Determines how long `company-dabbrev-code' should look for matches."
- :group 'company
:type '(choice (const :tag "Off" nil)
(number :tag "Seconds")))
(require 'company)
(eval-when-compile (require 'cl))
+(defgroup company-dabbrev nil
+ "dabbrev-like completion back-end."
+ :group 'company)
+
(defcustom company-dabbrev-other-buffers 'all
"Determines whether `company-dabbrev' should search other buffers.
If `all', search all other buffers. If t, search buffers with the same
major mode.
See also `company-dabbrev-time-limit'."
- :group 'company
:type '(choice (const :tag "Off" nil)
(const :tag "Same major mode" t)
(const :tag "All" all)))
(defcustom company-dabbrev-time-limit .5
"Determines how many seconds `company-dabbrev' should look for matches."
- :group 'company
:type '(choice (const :tag "Off" nil)
(number :tag "Seconds")))
(defcustom company-dabbrev-char-regexp "\\sw"
"A regular expression matching the characters `company-dabbrev' looks for."
- :group 'company
:type 'regexp)
(defmacro company-dabrev--time-limit-while (test start limit &rest body)
-;;; company-eclim.el --- company-mode completion back-end for eclim.
+;;; company-eclim.el --- company-mode completion back-end for Eclim
;; Copyright (C) 2009, 2011, 2013 Free Software Foundation, Inc.
(require 'company-template)
(eval-when-compile (require 'cl))
+(defgroup company-eclim nil
+ "Completion back-end for Eclim."
+ :group 'company)
+
(defun company-eclim-executable-find ()
(let (file)
(dolist (eclipse-root '("/Applications/eclipse" "/usr/lib/eclipse"
(defcustom company-eclim-executable
(or (executable-find "eclim") (company-eclim-executable-find))
"Location of eclim executable."
- :group 'company
:type 'file)
(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
:type '(choice (const :tag "Off" nil)
(const :tag "On" t)))
(require 'help-mode)
(require 'find-func)
+(defgroup company-elisp nil
+ "Completion back-end for emacs-lisp-mode."
+ :group 'company)
+
(defcustom company-elisp-detect-function-context t
"If enabled, offer Lisp functions only in appropriate contexts.
Functions are offered for completion only after ' and \(."
- :group 'company
:type '(choice (const :tag "Off" nil)
(const :tag "On" t)))
(defcustom company-elisp-show-locals-first t
"If enabled, locally bound variables and functions are displayed
first in the candidates list."
- :group 'company
:type '(choice (const :tag "Off" nil)
(const :tag "On" t)))
(require 'company)
(require 'etags)
+(defgroup company-etags nil
+ "Completion back-end for etags."
+ :group 'company)
+
(defcustom company-etags-use-main-table-list t
"Always search `tags-table-list' if set.
If this is disabled, `company-etags' will try to find the one table for each
buffer automatically."
- :group 'company-mode
:type '(choice (const :tag "off" nil)
(const :tag "on" t)))
(require 'company)
(eval-when-compile (require 'cl))
+(defgroup company-gtags nil
+ "Completion back-end for GNU Global."
+ :group 'company)
+
(defcustom company-gtags-executable
(executable-find "global")
"Location of GNU global executable."
- :type 'string
- :group 'company)
+ :type 'string)
(define-obsolete-variable-alias
'company-gtags-gnu-global-program-name
-;;; company-ispell.el --- company-mode completion back-end using ispell
+;;; company-ispell.el --- company-mode completion back-end using Ispell
;; Copyright (C) 2009-2011 Free Software Foundation, Inc.
(require 'ispell)
(eval-when-compile (require 'cl))
+(defgroup company-ispell nil
+ "Completion back-end using Ispell."
+ :group 'company)
+
(defcustom company-ispell-dictionary nil
"Dictionary to use for `company-ispell'.
If nil, use `ispell-complete-word-dict'."
- :group 'company
:type '(choice (const :tag "default (nil)" nil)
(file :tag "dictionary" t)))
;;;###autoload
(defun company-ispell (command &optional arg &rest ignored)
- "`company-mode' completion back-end using ispell."
+ "`company-mode' completion back-end using Ispell."
(interactive (list 'interactive))
(case command
(interactive (company-begin-backend 'company-ispell))
-;;; company-ropemacs.el --- company-mode completion back-end for pysmell.el
+;;; company-ropemacs.el --- company-mode completion back-end for ropemacs
;; Copyright (C) 2009-2011, 2013 Free Software Foundation, Inc.
-;;; company-semantic.el --- company-mode back-end using CEDET Semantic
+;;; company-semantic.el --- company-mode completion back-end using Semantic
;; Copyright (C) 2009-2011, 2013 Free Software Foundation, Inc.
(declare-function semantic-tag-buffer "semantic/tag")
(declare-function semantic-active-p "semantic")
+(defgroup company-semantic nil
+ "Completion back-end using Semantic."
+ :group 'company)
+
(defcustom company-semantic-metadata-function 'company-semantic-summary-and-doc
"The function turning a semantic tag into doc information."
- :group 'company
:type 'function)
(defvar company-semantic-modes '(c-mode c++-mode jde-mode java-mode))
(require 'company)
(eval-when-compile (require 'cl))
+(defgroup company-xcode nil
+ "Completion back-end for Xcode projects."
+ :group 'company)
+
(defcustom company-xcode-xcodeindex-executable (executable-find "xcodeindex")
"Location of xcodeindex executable."
- :group 'company-xcode
:type 'file)
(defvar company-xcode-tags nil)
:set (lambda (variable value)
(set variable value)
(company-xcode-reset))
- :group 'company-xcode
:type '(set (const "Category") (const "Class") (const "Class Method")
(const "Class Variable") (const "Constant") (const "Enum")
(const "Field") (const "Instance Method")
(:background "cornsilk"))
(((class color) (min-colors 88) (background dark))
(:background "yellow")))
- "Face used for the tool tip."
- :group 'company)
+ "Face used for the tool tip.")
(defface company-tooltip-selection
'((default :inherit company-tooltip)
(((class color) (min-colors 88) (background dark))
(:background "orange1"))
(t (:background "green")))
- "Face used for the selection in the tool tip."
- :group 'company)
+ "Face used for the selection in the tool tip.")
(defface company-tooltip-mouse
'((default :inherit highlight))
- "Face used for the tool tip item under the mouse."
- :group 'company)
+ "Face used for the tool tip item under the mouse.")
(defface company-tooltip-common
'((default :inherit company-tooltip)
:foreground "darkred")
(((background dark))
:foreground "red"))
- "Face used for the common completion in the tool tip."
- :group 'company)
+ "Face used for the common completion in the tool tip.")
(defface company-tooltip-common-selection
'((default :inherit company-tooltip-selection)
:foreground "darkred")
(((background dark))
:foreground "red"))
- "Face used for the selected common completion in the tool tip."
- :group 'company)
+ "Face used for the selected common completion in the tool tip.")
(defface company-preview
'((t :background "blue4"
:foreground "wheat"))
- "Face used for the completion preview."
- :group 'company)
+ "Face used for the completion preview.")
(defface company-preview-common
'((t :inherit company-preview
:foreground "red"))
- "Face used for the common part of the completion preview."
- :group 'company)
+ "Face used for the common part of the completion preview.")
(defface company-preview-search
'((t :inherit company-preview
:background "blue1"))
- "Face used for the search string in the completion preview."
- :group 'company)
+ "Face used for the search string in the completion preview.")
(defface company-echo nil
- "Face used for completions in the echo area."
- :group 'company)
+ "Face used for completions in the echo area.")
(defface company-echo-common
'((((background dark)) (:foreground "firebrick1"))
(((background light)) (:background "firebrick4")))
- "Face used for the common part of completions in the echo area."
- :group 'company)
+ "Face used for the common part of completions in the echo area.")
(defun company-frontends-set (variable value)
;; uniquify
`company-common', `company-selection', `company-point' and
`company-search-string'."
:set 'company-frontends-set
- :group 'company
:type '(repeat (choice (const :tag "echo" company-echo-frontend)
(const :tag "echo, strip common"
company-echo-strip-common-frontend)
(defcustom company-tooltip-limit 10
"The maximum number of candidates in the tool tip"
- :group 'company
:type 'integer)
(defcustom company-tooltip-minimum 6
"The minimum height of the tool tip.
If this many lines are not available, prefer to display the tooltip above."
- :group 'company
:type 'integer)
(defvar company-safe-backends
The back-end should return nil for all commands it does not support or
does not know about. It should also be callable interactively and use
`company-begin-backend' to start itself in that case."
- :group 'company
:type `(repeat
(choice
:tag "Back-end"
"Hook run when company starts completing.
The hook is called with one argument that is non-nil if the completion was
started manually."
- :group 'company
:type 'hook)
(defcustom company-completion-cancelled-hook nil
"Hook run when company cancels completing.
The hook is called with one argument that is non-nil if the completion was
aborted manually."
- :group 'company
:type 'hook)
(defcustom company-completion-finished-hook nil
If you indend to use it to post-process candidates from a specific back-end,
consider using the `post-completion' command instead."
- :group 'company
:type 'hook)
(defcustom company-minimum-prefix-length 3
"The minimum prefix length for automatic completion."
- :group 'company
:type '(integer :tag "prefix length"))
(defcustom company-require-match 'company-explicit-action-p
This can be overridden by the back-end, if it returns t or 'never to
'require-match. `company-auto-complete' also takes precedence over this."
- :group 'company
:type '(choice (const :tag "Off" nil)
(function :tag "Predicate function")
(const :tag "On, if user interaction took place"
"Determines when to auto-complete.
If this is enabled, all characters from `company-auto-complete-chars' complete
the selected completion. This can also be a function."
- :group 'company
:type '(choice (const :tag "Off" nil)
(function :tag "Predicate function")
(const :tag "On, if user interaction took place"
return non-nil if company should auto-complete.
A character that is part of a valid candidate never triggers auto-completion."
- :group 'company
:type '(choice (string :tag "Characters")
(set :tag "Syntax"
(const :tag "Whitespace" ?\ )
"The idle delay in seconds until automatic completions starts.
A value of nil means never complete automatically, t means complete
immediately when a prefix of `company-minimum-prefix-length' is reached."
- :group 'company
:type '(choice (const :tag "never (nil)" nil)
(const :tag "immediate (t)" t)
(number :tag "seconds")))
Alternatively any command with a non-nil 'company-begin property is treated as
if it was on this list."
- :group 'company
:type '(choice (const :tag "Any command" t)
(const :tag "Self insert command" '(self-insert-command))
(repeat :tag "Commands" function)))
(defcustom company-show-numbers nil
"If enabled, show quick-access numbers for the first ten candidates."
- :group 'company
:type '(choice (const :tag "off" nil)
(const :tag "on" t)))