Skip to content

Commit

Permalink
Merge changes from the GNU ELPA repository
Browse files Browse the repository at this point in the history
* Add company-capf: adapter for `completion-at-point-functions'.
* Lots of header and docstring tweaks.
* Copy README to README.md, adjust formatting.
  • Loading branch information
dgutov committed Mar 13, 2013
1 parent ec04274 commit cb0a586
Show file tree
Hide file tree
Showing 22 changed files with 519 additions and 318 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Company is an Emacs extension for performing text completion.
Completion candidates are retrieved from a variety of modular
back-ends, such as Semantic.

Once installed, enable company-mode with <kbd>M-x company-mode</kbd>.
For further information, see the docstring for `company-mode`.
36 changes: 22 additions & 14 deletions company-abbrev.el
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
;;; company-abbrev.el --- a company-mode completion back-end for abbrev
;;
;; Copyright (C) 2009 Nikolaj Schumacher
;;
;; This file is part of company 0.5.
;;
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License
;; as published by the Free Software Foundation; either version 2
;; of the License, or (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;;; company-abbrev.el --- A company-mode completion back-end for abbrev

;; Copyright (C) 2009-2011 Free Software Foundation, Inc.

;; Author: Nikolaj Schumacher

;; This file is part of GNU Emacs.

;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.

;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;

;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.


;;; Commentary:
;;

;;; Code:

(require 'company)
(eval-when-compile (require 'cl))
Expand Down
38 changes: 23 additions & 15 deletions company-clang.el
Original file line number Diff line number Diff line change
@@ -1,28 +1,36 @@
;;; company-clang.el --- a company-mode completion back-end for clang
;;
;; Copyright (C) 2010 Nikolaj Schumacher
;;
;; This file is part of company 0.5.
;;
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License
;; as published by the Free Software Foundation; either version 2
;; of the License, or (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;;; company-clang.el --- A company-mode completion back-end for clang

;; Copyright (C) 2009, 2011 Free Software Foundation, Inc.

;; Author: Nikolaj Schumacher

;; This file is part of GNU Emacs.

;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.

;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;

;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.


;;; Commentary:
;;

;;; Code:

(require 'company)
(eval-when-compile (require 'cl))

(defcustom company-clang-executable
(executable-find "clang")
"*Location of clang executable"
"*Location of clang executable."
:group 'company-clang
:type 'file)

Expand Down
40 changes: 23 additions & 17 deletions company-css.el
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
;;; company-css.el --- a company-mode completion back-end for css-mode
;;
;; Copyright (C) 2009 Nikolaj Schumacher
;;
;; This file is part of company 0.5.
;;
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License
;; as published by the Free Software Foundation; either version 2
;; of the License, or (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;;; company-css.el --- A company-mode completion back-end for css-mode

;; Copyright (C) 2009, 2011 Free Software Foundation, Inc.

;; Author: Nikolaj Schumacher

;; This file is part of GNU Emacs.

;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.

;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;

;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.

;;; Commentary:

;;; Code:

(require 'company)
(eval-when-compile (require 'cl))
Expand Down Expand Up @@ -241,7 +247,7 @@
"\\)*"
"\\(\\(?:#\\|\\_<[[:alpha:]]\\)\\(?:[[:alnum:]-#]*\\_>\\)?\\_>\\|\\)"
"\\=")
"A regular expression matching CSS tags")
"A regular expression matching CSS tags.")

;;; pseudo id
(defconst company-css-pseudo-regexp
Expand All @@ -255,7 +261,7 @@
"\\)*"
"\\(?:\\(?:\\#\\|\\_<[[:alpha:]]\\)[[:alnum:]-#]*\\):"
"\\([[:alpha:]-]+\\_>\\|\\)\\_>\\=")
"A regular expression matching CSS pseudo classes")
"A regular expression matching CSS pseudo classes.")

;;; properties

Expand All @@ -268,7 +274,7 @@ Returns \"\" if no property found, but feasible at this position."
;;; values
(defconst company-css-property-value-regexp
"\\_<\\([[:alpha:]-]+\\):\\(?:[^};]*[[:space:]]+\\)?\\([^};]*\\_>\\|\\)\\="
"A regular expression matching CSS tags")
"A regular expression matching CSS tags.")

;;;###autoload
(defun company-css (command &optional arg &rest ignored)
Expand Down
40 changes: 24 additions & 16 deletions company-dabbrev-code.el
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
;;; company-dabbrev-code.el --- a dabbrev-like company-mode back-end for code
;;
;; Copyright (C) 2009 Nikolaj Schumacher
;;
;; This file is part of company 0.5.
;;
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License
;; as published by the Free Software Foundation; either version 2
;; of the License, or (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;;; company-dabbrev-code.el --- A dabbrev-like company-mode back-end for code

;; Copyright (C) 2009, 2011 Free Software Foundation, Inc.

;; Author: Nikolaj Schumacher

;; This file is part of GNU Emacs.

;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.

;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;

;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.


;;; Commentary:
;;

;;; Code:

(require 'company)
(require 'company-dabbrev)
Expand All @@ -38,8 +46,8 @@ Value t means complete in all modes."

(defcustom company-dabbrev-code-other-buffers t
"*Determines whether `company-dabbrev-code' should search other buffers.
If 'all, search all other buffers. If t, search buffers with the same
major-mode.
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)
Expand Down
40 changes: 24 additions & 16 deletions company-dabbrev.el
Original file line number Diff line number Diff line change
@@ -1,29 +1,37 @@
;;; company-dabbrev.el --- a dabbrev-like company-mode completion back-end
;;
;; Copyright (C) 2009 Nikolaj Schumacher
;;
;; This file is part of company 0.5.
;;
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License
;; as published by the Free Software Foundation; either version 2
;; of the License, or (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;;; company-dabbrev.el --- A dabbrev-like company-mode completion back-end

;; Copyright (C) 2009, 2011 Free Software Foundation, Inc.

;; Author: Nikolaj Schumacher

;; This file is part of GNU Emacs.

;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.

;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;

;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.


;;; Commentary:
;;

;;; Code:

(require 'company)
(eval-when-compile (require 'cl))

(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.
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)
Expand Down
38 changes: 23 additions & 15 deletions company-eclim.el
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
;;; company-eclim.el --- a company-mode completion back-end for eclim.
;;
;; Copyright (C) 2009-2010 Nikolaj Schumacher
;;
;; This file is part of company 0.5.
;;
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License
;; as published by the Free Software Foundation; either version 2
;; of the License, or (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;;; company-eclim.el --- A company-mode completion back-end for eclim.

;; Copyright (C) 2009, 2011 Free Software Foundation, Inc.

;; Author: Nikolaj Schumacher

;; This file is part of GNU Emacs.

;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.

;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;

;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.


;;; Commentary:
;;

;;; Code:

(require 'company)
(eval-when-compile (require 'cl))
Expand All @@ -31,7 +39,7 @@

(defcustom company-eclim-executable
(or (executable-find "eclim") (company-eclim-executable-find))
"*Location of eclim executable"
"*Location of eclim executable."
:group 'company
:type 'file)

Expand Down
38 changes: 23 additions & 15 deletions company-elisp.el
Original file line number Diff line number Diff line change
@@ -1,28 +1,36 @@
;;; company-elisp.el --- a company-mode completion back-end for emacs-lisp-mode
;;
;; Copyright (C) 2009 Nikolaj Schumacher
;;
;; This file is part of company 0.5.
;;
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License
;; as published by the Free Software Foundation; either version 2
;; of the License, or (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;;; company-elisp.el --- A company-mode completion back-end for emacs-lisp-mode

;; Copyright (C) 2009, 2011 Free Software Foundation, Inc.

;; Author: Nikolaj Schumacher

;; This file is part of GNU Emacs.

;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.

;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;

;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.


;;; Commentary:
;;

;;; Code:

(require 'company)
(eval-when-compile (require 'cl))
(require 'help-mode)

(defcustom company-elisp-detect-function-context t
"*If enabled, offer lisp functions only in appropriate contexts.
"*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)
Expand Down
Loading

0 comments on commit cb0a586

Please sign in to comment.