]> code.delx.au - gnu-emacs-elpa/commitdiff
Define groups for back-ends; remove explicit :group declarations
authorDmitry Gutov <dgutov@yandex.ru>
Tue, 9 Apr 2013 20:48:12 +0000 (00:48 +0400)
committerDmitry Gutov <dgutov@yandex.ru>
Tue, 9 Apr 2013 20:48:12 +0000 (00:48 +0400)
defcustom defaults to the group last defined in the file.

Refs #8

12 files changed:
company-clang.el
company-dabbrev-code.el
company-dabbrev.el
company-eclim.el
company-elisp.el
company-etags.el
company-gtags.el
company-ispell.el
company-ropemacs.el
company-semantic.el
company-xcode.el
company.el

index e014bd6539f73454e1858f7c41a48638513a2618..178170fcda6b510f9808c4db6720ca394071a079 100644 (file)
@@ -1,4 +1,4 @@
-;;; 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)))
 
@@ -47,12 +49,10 @@ clang can only complete correctly when the buffer has been saved."
 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)
index 030e3be896f02f48fd3ad807ca627b6da14b1eef..2b132370e31ab9f4ea401e0058a0f98550321869 100644 (file)
 (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
@@ -40,7 +44,6 @@ In all these modes `company-dabbrev-code' will complete only symbols, not text
 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)))
 
@@ -49,14 +52,12 @@ Value t means complete in all modes."
 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")))
 
index 6d43ee47d8be467ff2666ec40bf28524157841d6..1be9792f08ca0539cbe6a1274caa9de817094339 100644 (file)
 (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)
index ab6329efc58e008d8adbdf3f1f3524f494fcfcdb..eb95187096da12553a15e7dfc086dcd1a341fc01 100644 (file)
@@ -1,4 +1,4 @@
-;;; 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)))
 
index 2046f6a4e6da82bdf4773a82b983dad7138cb912..41069cd1640a3f98fe7c6c9b56a70ed0dce0bc5f 100644 (file)
 (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)))
 
index 2bfca801f3f59f5925b8220baf9100005e802fd4..956e294afd1682323f2350d704553f052ba45982 100644 (file)
 (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)))
 
index 91c3929d16bfb012b6b5d5619d667ced8be33507..6b4e399420618407c57d2f0eb05ec1981f75fe14 100644 (file)
 (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
index eee5c0cbac3adf184334b8fc302257e599c3b617..9647f8580dbefabd4dec2de19803b48c6ac7bc4c 100644 (file)
@@ -1,4 +1,4 @@
-;;; 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)))
 
@@ -51,7 +54,7 @@ If nil, use `ispell-complete-word-dict'."
 
 ;;;###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))
index 6cffbf11d32f091d5de80a13ab672f21bd4955a0..17a660aebd7354520a7736609b91ba876fa7c930 100644 (file)
@@ -1,4 +1,4 @@
-;;; 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.
 
index 66a23b308a83d889773029a6dbfb1a5b93730e61..92cd178e3985861244e6d99147f67579e6263513 100644 (file)
@@ -1,4 +1,4 @@
-;;; 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))
index 5903131a66a8b741b8aca28fb7491a682fcb470e..ac8d133454e8626ae49ac3cecaf560df2a583fb1 100644 (file)
 (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)
@@ -50,7 +53,6 @@ valid in most contexts."
   :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")
index 86aff7462d80c985bbe1f71942e8ae33696972e3..fa0b86483b0a7332b212c0dc66ce806c5988f9ea 100644 (file)
@@ -91,8 +91,7 @@
      (: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
@@ -197,7 +187,6 @@ The visualized data is stored in `company-prefix', `company-candidates',
 `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)
@@ -214,13 +203,11 @@ The visualized data is stored in `company-prefix', `company-candidates',
 
 (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
@@ -343,7 +330,6 @@ e.g. to expand a snippet.
 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"
@@ -363,14 +349,12 @@ does not know about.  It should also be callable interactively and use
   "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
@@ -379,12 +363,10 @@ The hook is called with the selected candidate as an argument.
 
 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
@@ -393,7 +375,6 @@ This can be a function do determine if a match is required.
 
 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"
@@ -404,7 +385,6 @@ This can be overridden by the back-end, if it returns t or 'never to
   "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"
@@ -421,7 +401,6 @@ This can also be a function, which is called with the new input and should
 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" ?\ )
@@ -444,7 +423,6 @@ A character that is part of a valid candidate never triggers auto-completion."
   "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")))
@@ -455,14 +433,12 @@ If this is t, it will complete after any command.  See `company-idle-delay'.
 
 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)))