Initial version
commit
ef4409f2a2
@ -0,0 +1,5 @@
|
||||
*~
|
||||
/session*
|
||||
/tramp
|
||||
*.elc
|
||||
/elpa/archives/
|
@ -0,0 +1,15 @@
|
||||
[submodule "nyan-mode"]
|
||||
path = nyan-mode
|
||||
url = git://github.com/TeMPOraL/nyan-mode.git
|
||||
[submodule "helm"]
|
||||
path = helm
|
||||
url = git://github.com/emacs-helm/helm.git
|
||||
[submodule "emacs-async"]
|
||||
path = emacs-async
|
||||
url = git://github.com/jwiegley/emacs-async.git
|
||||
[submodule "gobgen"]
|
||||
path = gobgen
|
||||
url = git://github.com/gergelypolonkai/gobgen.el.git
|
||||
[submodule "emacs-helm-gtags"]
|
||||
path = emacs-helm-gtags
|
||||
url = git://github.com/syohex/emacs-helm-gtags.git
|
@ -0,0 +1 @@
|
||||
(define-package "ag" "0.42" "A front-end for ag ('the silver searcher'), the C ack replacement." (quote nil))
|
@ -0,0 +1,484 @@
|
||||
;;; ag.el --- A front-end for ag ('the silver searcher'), the C ack replacement.
|
||||
|
||||
;; Copyright (C) 2013-2014 Wilfred Hughes <me@wilfred.me.uk>
|
||||
;;
|
||||
;; Author: Wilfred Hughes <me@wilfred.me.uk>
|
||||
;; Created: 11 January 2013
|
||||
;; Version: 0.42
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Please see README.md for documentation, or read it online at
|
||||
;; https://github.com/Wilfred/ag.el/#agel
|
||||
|
||||
;;; License:
|
||||
|
||||
;; This file is not part of GNU Emacs.
|
||||
;; However, it is distributed under the same license.
|
||||
|
||||
;; 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, 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 GNU Emacs; see the file COPYING. If not, write to the
|
||||
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
;; Boston, MA 02110-1301, USA.
|
||||
|
||||
;;; Code:
|
||||
(eval-when-compile (require 'cl)) ;; dolist, defun*, flet
|
||||
(require 'dired) ;; dired-sort-inhibit
|
||||
|
||||
(defcustom ag-executable
|
||||
"ag"
|
||||
"Name of the ag executable to use."
|
||||
:type 'string
|
||||
:group 'ag)
|
||||
|
||||
(defcustom ag-arguments
|
||||
(list "--smart-case" "--nogroup" "--column" "--")
|
||||
"Default arguments passed to ag."
|
||||
:type '(repeat (string))
|
||||
:group 'ag)
|
||||
|
||||
(defcustom ag-highlight-search nil
|
||||
"Non-nil means we highlight the current search term in results.
|
||||
|
||||
This requires the ag command to support --color-match, which is only in v0.14+"
|
||||
:type 'boolean
|
||||
:group 'ag)
|
||||
|
||||
(defcustom ag-reuse-buffers nil
|
||||
"Non-nil means we reuse the existing search results buffer or
|
||||
dired results buffer, rather than creating one buffer per unique
|
||||
search."
|
||||
:type 'boolean
|
||||
:group 'ag)
|
||||
|
||||
(defcustom ag-reuse-window nil
|
||||
"Non-nil means we open search results in the same window,
|
||||
hiding the results buffer."
|
||||
:type 'boolean
|
||||
:group 'ag)
|
||||
|
||||
(defcustom ag-project-root-function nil
|
||||
"A function to determine the project root for `ag-project'.
|
||||
|
||||
If set to a function, call this function with the name of the
|
||||
file or directory for which to determine the project root
|
||||
directory.
|
||||
|
||||
If set to nil, fall back to finding VCS root directories."
|
||||
:type '(choice (const :tag "Default (VCS root)" nil)
|
||||
(function :tag "Function"))
|
||||
:group 'ag)
|
||||
|
||||
(require 'compile)
|
||||
|
||||
;; Although ag results aren't exactly errors, we treat them as errors
|
||||
;; so `next-error' and `previous-error' work. However, we ensure our
|
||||
;; face inherits from `compilation-info-face' so the results are
|
||||
;; styled appropriately.
|
||||
(defface ag-hit-face '((t :inherit compilation-info))
|
||||
"Face name to use for ag matches."
|
||||
:group 'ag)
|
||||
|
||||
(defface ag-match-face '((t :inherit match))
|
||||
"Face name to use for ag matches."
|
||||
:group 'ag)
|
||||
|
||||
(defun ag/next-error-function (n &optional reset)
|
||||
"Open the search result at point in the current window or a
|
||||
different window, according to `ag-open-in-other-window'."
|
||||
(if ag-reuse-window
|
||||
;; prevent changing the window
|
||||
(flet ((pop-to-buffer (buffer &rest args)
|
||||
(switch-to-buffer buffer)))
|
||||
(compilation-next-error-function n reset))
|
||||
;; just navigate to the results as normal
|
||||
(compilation-next-error-function n reset)))
|
||||
|
||||
(define-compilation-mode ag-mode "Ag"
|
||||
"Ag results compilation mode"
|
||||
(let ((smbl 'compilation-ag-nogroup)
|
||||
;; Note that we want to use as tight a regexp as we can to try and
|
||||
;; handle weird file names (with colons in them) as well as possible.
|
||||
;; E.g. we use [1-9][0-9]* rather than [0-9]+ so as to accept ":034:"
|
||||
;; in file names.
|
||||
(pttrn '("^\\([^:\n]+?\\):\\([1-9][0-9]*\\):\\([1-9][0-9]*\\):" 1 2 3)))
|
||||
(set (make-local-variable 'compilation-error-regexp-alist) (list smbl))
|
||||
(set (make-local-variable 'compilation-error-regexp-alist-alist) (list (cons smbl pttrn))))
|
||||
(set (make-local-variable 'compilation-error-face) 'ag-hit-face)
|
||||
(set (make-local-variable 'next-error-function) 'ag/next-error-function)
|
||||
(add-hook 'compilation-filter-hook 'ag-filter nil t))
|
||||
|
||||
(define-key ag-mode-map (kbd "p") 'compilation-previous-error)
|
||||
(define-key ag-mode-map (kbd "n") 'compilation-next-error)
|
||||
|
||||
(defun ag/buffer-name (search-string directory regexp)
|
||||
(cond
|
||||
(ag-reuse-buffers "*ag search*")
|
||||
(regexp (format "*ag search regexp:%s dir:%s*" search-string directory))
|
||||
(:else (format "*ag search text:%s dir:%s*" search-string directory))))
|
||||
|
||||
(defun* ag/search (string directory
|
||||
&key (regexp nil) (file-regex nil))
|
||||
"Run ag searching for the STRING given in DIRECTORY.
|
||||
If REGEXP is non-nil, treat STRING as a regular expression."
|
||||
(let ((default-directory (file-name-as-directory directory))
|
||||
(arguments ag-arguments)
|
||||
(shell-command-switch "-c"))
|
||||
(unless regexp
|
||||
(setq arguments (cons "--literal" arguments)))
|
||||
(if ag-highlight-search
|
||||
(setq arguments (append '("--color" "--color-match" "30;43") arguments))
|
||||
(setq arguments (append '("--nocolor") arguments)))
|
||||
(when (char-or-string-p file-regex)
|
||||
(setq arguments (append `("--file-search-regex" ,file-regex) arguments)))
|
||||
(unless (file-exists-p default-directory)
|
||||
(error "No such directory %s" default-directory))
|
||||
(let ((command-string
|
||||
(mapconcat 'shell-quote-argument
|
||||
(append (list ag-executable) arguments (list string "."))
|
||||
" ")))
|
||||
(when current-prefix-arg
|
||||
(setq command-string (read-from-minibuffer "ag command: " command-string)))
|
||||
(compilation-start
|
||||
command-string
|
||||
'ag-mode
|
||||
`(lambda (mode-name) ,(ag/buffer-name string directory regexp))))))
|
||||
|
||||
(defun ag/dwim-at-point ()
|
||||
"If there's an active selection, return that.
|
||||
Otherwise, get the symbol at point, as a string."
|
||||
(cond ((use-region-p)
|
||||
(buffer-substring-no-properties (region-beginning) (region-end)))
|
||||
((symbol-at-point)
|
||||
(substring-no-properties
|
||||
(symbol-name (symbol-at-point))))))
|
||||
|
||||
(defun ag/buffer-extension-regex ()
|
||||
"If the current buffer has an extension, return
|
||||
a PCRE pattern that matches files with that extension.
|
||||
Returns an empty string otherwise."
|
||||
(let ((file-name (buffer-file-name)))
|
||||
(if (stringp file-name)
|
||||
(format "\\.%s" (file-name-extension file-name))
|
||||
"")))
|
||||
|
||||
(defun ag/longest-string (&rest strings)
|
||||
"Given a list of strings and nils, return the longest string."
|
||||
(let ((longest-string nil))
|
||||
(dolist (string strings)
|
||||
(cond ((null longest-string)
|
||||
(setq longest-string string))
|
||||
((stringp string)
|
||||
(when (< (length longest-string)
|
||||
(length string))
|
||||
(setq longest-string string)))))
|
||||
longest-string))
|
||||
|
||||
(autoload 'vc-git-root "vc-git")
|
||||
|
||||
(require 'vc-svn)
|
||||
;; Emacs 23.4 doesn't provide vc-svn-root.
|
||||
(unless (functionp 'vc-svn-root)
|
||||
(defun vc-svn-root (file)
|
||||
(vc-find-root file vc-svn-admin-directory)))
|
||||
|
||||
(autoload 'vc-hg-root "vc-hg")
|
||||
|
||||
(defun ag/project-root (file-path)
|
||||
"Guess the project root of the given FILE-PATH.
|
||||
|
||||
Use `ag-project-root-function' if set, or fall back to VCS
|
||||
roots."
|
||||
(if ag-project-root-function
|
||||
(funcall ag-project-root-function file-path)
|
||||
(or (ag/longest-string
|
||||
(vc-git-root file-path)
|
||||
(vc-svn-root file-path)
|
||||
(vc-hg-root file-path))
|
||||
file-path)))
|
||||
|
||||
(defun ag/dired-filter (proc string)
|
||||
"Filter the output of ag to make it suitable for `dired-mode'."
|
||||
(let ((buf (process-buffer proc))
|
||||
(inhibit-read-only t))
|
||||
(if (buffer-name buf)
|
||||
(with-current-buffer buf
|
||||
(save-excursion
|
||||
(save-restriction
|
||||
(widen)
|
||||
(let ((beg (point-max)))
|
||||
(goto-char beg)
|
||||
(insert string)
|
||||
(goto-char beg)
|
||||
(or (looking-at "^")
|
||||
(forward-line 1))
|
||||
(while (looking-at "^")
|
||||
(insert " ")
|
||||
(forward-line 1))
|
||||
(goto-char beg)
|
||||
(beginning-of-line)
|
||||
|
||||
;; Remove occurrences of default-directory.
|
||||
(while (search-forward default-directory nil t)
|
||||
(replace-match "" nil t))
|
||||
|
||||
(goto-char (point-max))
|
||||
(if (search-backward "\n" (process-mark proc) t)
|
||||
(progn
|
||||
(dired-insert-set-properties (process-mark proc)
|
||||
(1+ (point)))
|
||||
(move-marker (process-mark proc) (1+ (point)))))))))
|
||||
(delete-process proc))))
|
||||
|
||||
(defun ag/dired-sentinel (proc state)
|
||||
"Update the status/modeline after the process finishes."
|
||||
(let ((buf (process-buffer proc))
|
||||
(inhibit-read-only t))
|
||||
(if (buffer-name buf)
|
||||
(with-current-buffer buf
|
||||
(let ((buffer-read-only nil))
|
||||
(save-excursion
|
||||
(goto-char (point-max))
|
||||
(insert "\n ag " state)
|
||||
(forward-char -1) ;Back up before \n at end of STATE.
|
||||
(insert " at " (substring (current-time-string) 0 19))
|
||||
(forward-char 1)
|
||||
(setq mode-line-process
|
||||
(concat ":" (symbol-name (process-status proc))))
|
||||
;; Since the buffer and mode line will show that the
|
||||
;; process is dead, we can delete it now. Otherwise it
|
||||
;; will stay around until M-x list-processes.
|
||||
(delete-process proc)
|
||||
(force-mode-line-update)))
|
||||
(message "%s finished." (current-buffer))))))
|
||||
|
||||
(defun ag/kill-process ()
|
||||
"Kill the `ag' process running in the current buffer."
|
||||
(interactive)
|
||||
(let ((ag (get-buffer-process (current-buffer))))
|
||||
(and ag (eq (process-status ag) 'run)
|
||||
(eq (process-filter ag) (function find-dired-filter))
|
||||
(condition-case nil
|
||||
(delete-process ag)
|
||||
(error nil)))))
|
||||
|
||||
(defun ag/escape-pcre (regexp)
|
||||
"Escape the PCRE-special characters in REGEXP so that it is
|
||||
matched literally."
|
||||
(let ((alphanum "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"))
|
||||
(apply 'concat
|
||||
(mapcar
|
||||
(lambda (c)
|
||||
(cond
|
||||
((not (string-match-p (regexp-quote c) alphanum))
|
||||
(concat "\\" c))
|
||||
(t c)))
|
||||
(mapcar 'char-to-string (string-to-list regexp))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun ag (string directory)
|
||||
"Search using ag in a given DIRECTORY for a given search STRING,
|
||||
with STRING defaulting to the symbol under point.
|
||||
|
||||
If called with a prefix, prompts for flags to pass to ag."
|
||||
(interactive (list (read-from-minibuffer "Search string: " (ag/dwim-at-point))
|
||||
(read-directory-name "Directory: ")))
|
||||
(ag/search string directory))
|
||||
|
||||
;;;###autoload
|
||||
(defun ag-files (string file-regex directory)
|
||||
"Search using ag in a given DIRECTORY and file type regex FILE-REGEX
|
||||
for a given search STRING, with STRING defaulting to the symbol under point.
|
||||
|
||||
If called with a prefix, prompts for flags to pass to ag."
|
||||
(interactive (list (read-from-minibuffer "Search string: " (ag/dwim-at-point))
|
||||
(read-from-minibuffer "In filenames matching PCRE: " (ag/buffer-extension-regex))
|
||||
(read-directory-name "Directory: ")))
|
||||
(ag/search string directory :file-regex file-regex))
|
||||
|
||||
;;;###autoload
|
||||
(defun ag-regexp (string directory)
|
||||
"Search using ag in a given directory for a given regexp.
|
||||
The regexp should be in PCRE syntax, not Emacs regexp syntax.
|
||||
|
||||
If called with a prefix, prompts for flags to pass to ag."
|
||||
(interactive "sSearch regexp: \nDDirectory: ")
|
||||
(ag/search string directory :regexp t))
|
||||
|
||||
;;;###autoload
|
||||
(defun ag-project (string)
|
||||
"Guess the root of the current project and search it with ag
|
||||
for the given string.
|
||||
|
||||
If called with a prefix, prompts for flags to pass to ag."
|
||||
(interactive (list (read-from-minibuffer "Search string: " (ag/dwim-at-point))))
|
||||
(ag/search string (ag/project-root default-directory)))
|
||||
|
||||
;;;###autoload
|
||||
(defun ag-project-files (string file-regex)
|
||||
"Search using ag in a given DIRECTORY and file type regex FILE-REGEX
|
||||
for a given search STRING, with STRING defaulting to the symbol under point.
|
||||
|
||||
If called with a prefix, prompts for flags to pass to ag."
|
||||
(interactive (list (read-from-minibuffer "Search string: " (ag/dwim-at-point))
|
||||
(read-from-minibuffer "In filenames matching PCRE: " (ag/buffer-extension-regex))))
|
||||
(ag/search string (ag/project-root default-directory) :file-regex file-regex))
|
||||
|
||||
;;;###autoload
|
||||
(defun ag-project-regexp (regexp)
|
||||
"Guess the root of the current project and search it with ag
|
||||
for the given regexp. The regexp should be in PCRE syntax, not
|
||||
Emacs regexp syntax.
|
||||
|
||||
If called with a prefix, prompts for flags to pass to ag."
|
||||
(interactive (list (read-from-minibuffer "Search regexp: "
|
||||
(ag/escape-pcre (ag/dwim-at-point)))))
|
||||
(ag/search regexp (ag/project-root default-directory) :regexp t))
|
||||
|
||||
(autoload 'symbol-at-point "thingatpt")
|
||||
|
||||
;;;###autoload
|
||||
(defalias 'ag-project-at-point 'ag-project)
|
||||
(make-obsolete 'ag-project-at-point 'ag-project "0.19")
|
||||
|
||||
;;;###autoload
|
||||
(defalias 'ag-regexp-project-at-point 'ag-project-regexp) ; TODO: mark as obsolete
|
||||
|
||||
;;;###autoload
|
||||
(defun ag-dired (dir pattern)
|
||||
"Recursively find files in DIR matching PATTERN.
|
||||
|
||||
The PATTERN is matched against the full path to the file, not
|
||||
only against the file name.
|
||||
|
||||
The results are presented as a `dired-mode' buffer with
|
||||
`default-directory' being DIR.
|
||||
|
||||
See also `ag-dired-regexp'."
|
||||
(interactive "DDirectory: \nsFile pattern: ")
|
||||
(ag-dired-regexp dir (ag/escape-pcre pattern)))
|
||||
|
||||
;;;###autoload
|
||||
(defun ag-dired-regexp (dir regexp)
|
||||
"Recursively find files in DIR matching REGEXP.
|
||||
REGEXP should be in PCRE syntax, not Emacs regexp syntax.
|
||||
|
||||
The REGEXP is matched against the full path to the file, not
|
||||
only against the file name.
|
||||
|
||||
Results are presented as a `dired-mode' buffer with
|
||||
`default-directory' being DIR.
|
||||
|
||||
See also `find-dired'."
|
||||
(interactive "DDirectory: \nsFile regexp: ")
|
||||
(let* ((dired-buffers dired-buffers) ;; do not mess with regular dired buffers
|
||||
(orig-dir dir)
|
||||
(dir (file-name-as-directory (expand-file-name dir)))
|
||||
(buffer-name (if ag-reuse-buffers
|
||||
"*ag dired*"
|
||||
(format "*ag dired pattern:%s dir:%s*" regexp dir)))
|
||||
(cmd (concat "ag --nocolor -g '" regexp "' " dir " | grep -v '^$' | xargs -I {} ls " dired-listing-switches " {} &")))
|
||||
(with-current-buffer (get-buffer-create buffer-name)
|
||||
(switch-to-buffer (current-buffer))
|
||||
(widen)
|
||||
(kill-all-local-variables)
|
||||
(if (fboundp 'read-only-mode)
|
||||
(read-only-mode -1)
|
||||
(setq buffer-read-only nil))
|
||||
(let ((inhibit-read-only t)) (erase-buffer))
|
||||
(setq default-directory dir)
|
||||
(shell-command cmd (current-buffer))
|
||||
(insert " " dir ":\n")
|
||||
(insert " " cmd "\n")
|
||||
(dired-mode dir)
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(set-keymap-parent map (current-local-map))
|
||||
(define-key map "\C-c\C-k" 'ag/kill-process)
|
||||
(use-local-map map))
|
||||
(set (make-local-variable 'dired-sort-inhibit) t)
|
||||
(set (make-local-variable 'revert-buffer-function)
|
||||
`(lambda (ignore-auto noconfirm)
|
||||
(ag-dired ,orig-dir ,regexp)))
|
||||
(if (fboundp 'dired-simple-subdir-alist)
|
||||
(dired-simple-subdir-alist)
|
||||
(set (make-local-variable 'dired-subdir-alist)
|
||||
(list (cons default-directory (point-min-marker)))))
|
||||
(let ((proc (get-buffer-process (current-buffer))))
|
||||
(set-process-filter proc #'ag/dired-filter)
|
||||
(set-process-sentinel proc #'ag/dired-sentinel)
|
||||
;; Initialize the process marker; it is used by the filter.
|
||||
(move-marker (process-mark proc) 1 (current-buffer)))
|
||||
(setq mode-line-process '(":%s")))))
|
||||
|
||||
;;;###autoload
|
||||
(defun ag-project-dired (pattern)
|
||||
"Recursively find files in current project matching PATTERN.
|
||||
|
||||
See also `ag-dired'."
|
||||
(interactive "sFile pattern: ")
|
||||
(ag-dired-regexp (ag/project-root default-directory) (ag/escape-pcre pattern)))
|
||||
|
||||
;;;###autoload
|
||||
(defun ag-project-dired-regexp (regexp)
|
||||
"Recursively find files in current project matching REGEXP.
|
||||
|
||||
See also `ag-dired-regexp'."
|
||||
(interactive "sFile regexp: ")
|
||||
(ag-dired-regexp (ag/project-root default-directory) regexp))
|
||||
|
||||
;;;###autoload
|
||||
(defun ag-kill-buffers ()
|
||||
"Kill all ag-mode buffers."
|
||||
(interactive)
|
||||
(dolist (buffer (buffer-list))
|
||||
(when (eq (buffer-local-value 'major-mode buffer) 'ag-mode)
|
||||
(kill-buffer buffer))))
|
||||
|
||||
;;;###autoload
|
||||
(defun ag-kill-other-buffers ()
|
||||
"Kill all ag-mode buffers other than the current buffer."
|
||||
(interactive)
|
||||
(let ((current-buffer (current-buffer)))
|
||||
(dolist (buffer (buffer-list))
|
||||
(when (and
|
||||
(eq (buffer-local-value 'major-mode buffer) 'ag-mode)
|
||||
(not (eq buffer current-buffer)))
|
||||
(kill-buffer buffer)))))
|
||||
|
||||
;; Taken from grep-filter, just changed the color regex.
|
||||
(defun ag-filter ()
|
||||
"Handle match highlighting escape sequences inserted by the ag process.
|
||||
This function is called from `compilation-filter-hook'."
|
||||
(when ag-highlight-search
|
||||
(save-excursion
|
||||
(forward-line 0)
|
||||
(let ((end (point)) beg)
|
||||
(goto-char compilation-filter-start)
|
||||
(forward-line 0)
|
||||
(setq beg (point))
|
||||
;; Only operate on whole lines so we don't get caught with part of an
|
||||
;; escape sequence in one chunk and the rest in another.
|
||||
(when (< (point) end)
|
||||
(setq end (copy-marker end))
|
||||
;; Highlight ag matches and delete marking sequences.
|
||||
(while (re-search-forward "\033\\[30;43m\\(.*?\\)\033\\[[0-9]*m" end 1)
|
||||
(replace-match (propertize (match-string 1)
|
||||
'face nil 'font-lock-face 'ag-match-face)
|
||||
t t))
|
||||
;; Delete all remaining escape sequences
|
||||
(goto-char beg)
|
||||
(while (re-search-forward "\033\\[[0-9;]*[mK]" end 1)
|
||||
(replace-match "" t t)))))))
|
||||
|
||||
(provide 'ag)
|
||||
;;; ag.el ends here
|
@ -0,0 +1,4 @@
|
||||
((nil . ((indent-tabs-mode . nil)
|
||||
(fill-column . 80)
|
||||
(sentence-end-double-space . t)
|
||||
(emacs-lisp-docstring-fill-column . 75))))
|
@ -0,0 +1,2 @@
|
||||
*.elc
|
||||
ert.el
|
@ -0,0 +1,26 @@
|
||||
# https://github.com/rolandwalker/emacs-travis
|
||||
|
||||
language: emacs-lisp
|
||||
|
||||
env:
|
||||
matrix:
|
||||
- EMACS=emacs24
|
||||
- EMACS=emacs-snapshot
|
||||
|
||||
install:
|
||||
- if [ "$EMACS" = "emacs24" ]; then
|
||||
sudo add-apt-repository -y ppa:cassou/emacs &&
|
||||
sudo apt-get update -qq &&
|
||||
sudo apt-get install -qq emacs24 emacs24-el;
|
||||
fi
|
||||
- if [ "$EMACS" = "emacs-snapshot" ]; then
|
||||
sudo add-apt-repository -y ppa:ubuntu-elisp/ppa &&
|
||||
sudo apt-get update -qq &&
|
||||
sudo apt-get install -qq emacs-snapshot;
|
||||
fi
|
||||
|
||||
before_script:
|
||||
make downloads
|
||||
|
||||
script:
|
||||
make test-batch EMACS=${EMACS}
|
@ -0,0 +1,255 @@
|
||||
2014-07-26 Dmitry Gutov <dgutov@yandex.ru>
|
||||
|
||||
Merge commit 'b1d019a4c815ac8bdc240d69eaa74eb4e34640e8' from
|
||||
company-master
|
||||
|
||||
2014-07-01 Dmitry Gutov <dgutov@yandex.ru>
|
||||
|
||||
Merge commit '7c14dedc79bf0c6eaad5bf50b80ea80dd721afdc' from company
|
||||
|
||||
Conflicts:
|
||||
packages/company/company-pysmell.el
|
||||
|
||||
2014-06-14 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* company/company-capf.el: Don't ignore things like semantic-capf.
|
||||
|
||||
2014-04-19 Dmitry Gutov <dgutov@yandex.ru>
|
||||
|
||||
Merge commit '51c140ca9ee32d27cacc7b2b07d4539bf98ae575' from
|
||||
company-master
|
||||
|
||||
Conflicts:
|
||||
packages/company/company-pysmell.el
|
||||
|
||||
2014-03-25 Dmitry Gutov <dgutov@yandex.ru>
|
||||
|
||||
Merge commit '4a7995ff69b25990dc520ed9e466dfbcdb7eafc8' from company
|
||||
|
||||
2014-03-19 Dmitry Gutov <dgutov@yandex.ru>
|
||||
|
||||
Merge commit 'fec7c0b4a8651160c5d759cc6703b2c45852d5bb'
|
||||
|
||||
2014-03-18 Dmitry Gutov <dgutov@yandex.ru>
|
||||
|
||||
Merge commit '7be4321260f0c73ef4c3cadc646f6bb496650253' from company
|
||||
|
||||
2014-02-18 Dmitry Gutov <dgutov@yandex.ru>
|
||||
|
||||
Merge commit '119822078ee3024c2d27017d45ef4578fa36040f' from company
|
||||
|
||||
2014-02-03 Dmitry Gutov <dgutov@yandex.ru>
|
||||
|
||||
Merge commit '67ab56a5469f16652e73667ec3b4f76ff6befee6' from company
|
||||
|
||||
2014-01-25 Dmitry Gutov <dgutov@yandex.ru>
|
||||
|
||||
Merge commit '8dc8f9525714db66f659a2a51322345068764bd3' from company
|
||||
|
||||
Conflicts:
|
||||
packages/company/company-capf.el
|
||||
|
||||
2014-01-24 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* company-capf.el (company--capf-data): Don't get confused by lambda
|
||||
exps.
|
||||
|
||||
2014-01-20 Dmitry Gutov <dgutov@yandex.ru>
|
||||
|
||||
Merge commit '2badcc6227a88e1aba288f442af5f4e1ce55d366' from company
|
||||
|
||||
2014-01-15 Dmitry Gutov <dgutov@yandex.ru>
|
||||
|
||||
Merge commit '8b4d7da0d6aa1e24379fe5ace5bd2705352ea07e' from company
|
||||
|
||||
2014-01-14 Dmitry Gutov <dgutov@yandex.ru>
|
||||
|
||||
Merge commit '67a96dbbfe645b64291ed62eab6f1eb391a834e0' from company
|
||||
|
||||
Conflicts:
|
||||
packages/company/company-elisp.el
|
||||
packages/company/company-oddmuse.el
|
||||
|
||||
2014-01-13 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* packages/company/company-etags.el: Require `cl' for `case'.
|
||||
* packages/company/company-oddmuse.el: Avoid `eval-when' before
|
||||
requiring `cl'.
|
||||
* packages/company/company-elisp.el (company-elisp): Simplify.
|
||||
|
||||
2013-10-06 Dmitry Gutov <dgutov@yandex.ru>
|
||||
|
||||
Sync from company/master
|
||||
|
||||
2013-08-29 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* packages/company/company-capf.el (company-capf): Add preliminary
|
||||
support for doc-buffer, meta, location, and require-match.
|
||||
|
||||
2013-08-21 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* packages/company/company-cmake.el: Fix up copyright. Require CL.
|
||||
* packages/company/company-template.el
|
||||
(company-template--buffer-templates): Declare before first use.
|
||||
* packages/company/company-eclim.el (json-array-type): Declare
|
||||
json-array-type.
|
||||
(company-eclim--candidates): Remove unused var `project-name'.
|
||||
|
||||
2013-08-21 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
Sync from company/master
|
||||
|
||||
2013-08-14 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
Mark merge point of company.
|
||||
|
||||
2013-06-27 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* GNUmakefile: Rename from Makefile. Add targets for in-place use.
|
||||
(all, all-in-place): New targets.
|
||||
* admin/archive-contents.el (archive--simple-package-p): Ignore
|
||||
autosave files.
|
||||
(archive--refresh-pkg-file): New function.
|
||||
(archive--write-pkg-file): Print with ' and ` shorthands.
|
||||
* packages/company/company-pysmell.el: Don't require pysmell during
|
||||
compile.
|
||||
* packages/muse/htmlize-hack.el: Don't require htmlize during compile.
|
||||
* packages/shen-mode/shen-mode.el (shen-functions): Define during
|
||||
compile.
|
||||
* smart-operator/smart-operator.el (smart-operator-insert-1): Use
|
||||
pcase.
|
||||
|
||||
2013-05-26 Dmitry Gutov <dgutov@yandex.ru>
|
||||
|
||||
company: Release 0.6.10
|
||||
|
||||
* Plays nicer with `org-indent-mode`.
|
||||
* Works in horizontally scrolled windows.
|
||||
|
||||
Git commit 764d2aa4ba50081adf69408e62d4863905b68b7f
|
||||
|
||||
2013-05-10 Dmitry Gutov <dgutov@yandex.ru>
|
||||
|
||||
company: Release 0.6.9
|
||||
|
||||
* `company-capf` respects `:exit-function` completion property.
|
||||
* `company-backends`: `prefix` command can return `t` in the cdr.
|
||||
* `company-clang-begin-after-member-access`: New option.
|
||||
* Mouse click outside the tooltip aborts completion.
|
||||
* `company-clang` uses standard input to pass the contents of current
|
||||
buffer to
|
||||
Clang 2.9+, otherwise saves the buffer and passes the path to the
|
||||
file.
|
||||
* `company-clang-auto-save` option has been removed.
|
||||
* Better interaction with `outline-minor-mode`.
|
||||
* `company-dabbrev-code` supports all `prog-mode` derivatives.
|
||||
|
||||
Git commit 4c735454d91f9674da0ecea950504888b1e10ff7
|
||||
|
||||
2013-04-27 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* company.el (company-capf): Add support for `sorted' and
|
||||
`post-completion'.
|
||||
(company--capf-data): New function.
|
||||
(company-backend): Declare before first use.
|
||||
(company-require-match-p): Only call company-require-match is needed.
|
||||
(company--continue-failed): Don't use backward-delete-char
|
||||
non-interactively.
|
||||
(company-search-assert-enabled): Demote it, since it comes too late to
|
||||
be inlined.
|
||||
(company-begin-with): Use a lexical closure, so the code is
|
||||
byte-compiled.
|
||||
(company--replacement-string, company--create-lines)
|
||||
(company-pseudo-tooltip-edit, company-doc-buffer): Silence the
|
||||
byte-compiler.
|
||||
|
||||
2013-04-16 Dmitry Gutov <dgutov@yandex.ru>
|
||||
|
||||
Release 0.6.8
|
||||
|
||||
* `company-auto-complete` is disabled by default.
|
||||
* `company-auto-complete-chars` default value includes fewer syntax
|
||||
classes.
|
||||
* In expanded function calls, arguments skipped by the user default to
|
||||
"argN".
|
||||
* `company-eclim` and `company-clang` do not strip argument types from
|
||||
fields.
|
||||
* `company-clang` expands function calls for all three modes now.
|
||||
* `company-clang` supports `c++-mode` by default.
|
||||
|
||||
Git commit 92ac3d0ef663bca26abbda33cc20a02a58b1c328
|
||||
|
||||
2013-04-05 Dmitry Gutov <dgutov@yandex.ru>
|
||||
|
||||
company: Release 0.6.7
|
||||
|
||||
* Two `company-elisp` tweaks.
|
||||
|
||||
Git commit 8dceda389115b397de48becc4b68a64f4dc4bbab
|
||||
|
||||
2013-04-01 Dmitry Gutov <dgutov@yandex.ru>
|
||||
|
||||
company: Release 0.6.6
|
||||
|
||||
## 2013-04-01 (0.6.6)
|
||||
|
||||
* `company-elisp` doesn't offer completions when typing the name and
|
||||
the arguments of a new function or macro definition, allowing to
|
||||
fall back to other back-ends like `company-dabbrev-code`.
|
||||
|
||||
## 2013-03-30 (0.6.5)
|
||||
|
||||
* Fixed keybindings when running in a terminal.
|
||||
* `company-elisp-show-locals-first`: new customizable variable.
|
||||
* `company-elisp` shows more accurate and comprehensive candidates
|
||||
list.
|
||||
|
||||
## 2013-03-26 (0.6.4)
|
||||
|
||||
* `company-eclim` shows valid completions after an opening paren.
|
||||
* Expanded template does not get removed until the point leaves it.
|
||||
After your input the last argument in a method call expanded by
|
||||
`company-eclim`, you can press `<tab>` once more, to jump after the
|
||||
closing paren. No other bundled back-ends are affected.
|
||||
|
||||
## 2013-03-25 (0.6.3)
|
||||
|
||||
* New tooltip face colors used on themes with light background.
|
||||
* Pseudo-tooltip stays up-to-date when text is inserted after the
|
||||
point.
|
||||
* Fixed `company-require-match` mechanics.
|
||||
|
||||
2013-03-24 Dmitry Gutov <dgutov@yandex.ru>
|
||||
|
||||
company: Release 0.6.2
|
||||
|
||||
2013-03-23 Dmitry Gutov <dgutov@yandex.ru>
|
||||
|
||||
company: Release 0.6.1
|
||||
|
||||
2013-03-21 Dmitry Gutov <dgutov@yandex.ru>
|
||||
|
||||
company: Remove angle brackets from README
|
||||
|
||||
2013-03-19 Dmitry Gutov <dgutov@yandex.ru>
|
||||
|
||||
company: Update pkg.el and summary string
|
||||
|
||||
2013-03-19 Dmitry Gutov <dgutov@yandex.ru>
|
||||
|
||||
company-tests.el: add copyright boilerplate
|
||||
|
||||
2013-03-19 Dmitry Gutov <dgutov@yandex.ru>
|
||||
|
||||
company-mode: Release 0.6
|
||||
|
||||
2011-08-01 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* company/*.el: Fix case misunderstanding. Use checkdoc.
|
||||
* company/company.el (company-capf): First cut at making Company use
|
||||
completion-at-point-functions.
|
||||
|
||||
2011-06-30 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
||||
Remove version numbers in packages/ directory
|
||||
|
@ -0,0 +1,37 @@
|
||||
EMACS=emacs
|
||||
CURL=curl --silent
|
||||
ERT_URL=http://git.savannah.gnu.org/cgit/emacs.git/plain/lisp/emacs-lisp/ert.el?h=emacs-24.3
|
||||
|
||||
.PHONY: ert test test-batch
|
||||
|
||||
package: *.el
|
||||
@ver=`grep -o "Version: .*" company.el | cut -c 10-`; \
|
||||
tar cjvf company-$$ver.tar.bz2 --mode 644 `git ls-files '*.el' | xargs`
|
||||
|
||||
elpa: *.el
|
||||
@version=`grep -o "Version: .*" company.el | cut -c 10-`; \
|
||||
dir=company-$$version; \
|
||||
mkdir -p "$$dir"; \
|
||||
cp `git ls-files '*.el' | xargs` company-$$version; \
|
||||
echo "(define-package \"company\" \"$$version\" \
|
||||
\"Modular in-buffer completion framework\")" \
|
||||
> "$$dir"/company-pkg.el; \
|
||||
tar cvf company-$$version.tar --mode 644 "$$dir"
|
||||
|
||||
clean:
|
||||
@rm -rf company-*/ company-*.tar company-*.tar.bz2 *.elc ert.el
|
||||
|
||||
test:
|
||||
${EMACS} -Q -nw -L . -l company-tests.el -l company-elisp-tests.el \
|
||||
--eval "(let (pop-up-windows) (ert t))"
|
||||
|
||||
test-batch:
|
||||
${EMACS} -Q --batch -L . -l company-tests.el -l company-elisp-tests.el \
|
||||
--eval "(ert-run-tests-batch-and-exit '(not (tag interactive)))"
|
||||
|
||||
downloads:
|
||||
${EMACS} -Q --batch -l ert || \
|
||||
${CURL} ${ERT_URL} > ert.el
|
||||
|
||||
compile:
|
||||
${EMACS} -Q --batch -L . -f batch-byte-compile company.el company-*.el
|
@ -0,0 +1,277 @@
|
||||
# History of user-visible changes
|
||||
|
||||
## 2014-07-26 (0.8.2)
|
||||
|
||||
* New user option `company-occurrence-weight-function`, allowing to tweak the
|
||||
behavior of the transformer `company-sort-by-occurrence`.
|
||||
* Setting `company-idle-delay` to `t` is deprecated. Use the value 0 instead.
|
||||
|
||||
## 2014-07-01 (0.8.1)
|
||||
|
||||
* `company-require-match` is not in effect when the new input doesn't continue
|
||||
the previous prefix, and that prefix was a match.
|
||||
* The meaning of `company-begin-commands` value t has slightly changed.
|
||||
* New transformer, `company-sort-by-backend-importance`.
|
||||
* When grouped back-ends are used, the back-end of the current candidate is
|
||||
indicated in the mode-line, enclosed in angle brackets.
|
||||
* New user option `company-gtags-insert-arguments`, t by default.
|
||||
* `company-css` knows about CSS3.
|
||||
* `company-gtags` supports `meta` and `annotation`.
|
||||
* User option `company-dabbrev-code-other-buffers` can have a new value: `code`.
|
||||
* New user option `company-tooltip-flip-when-above`.
|
||||
* `company-clang` uses the standard header search paths by default.
|
||||
* `C-h` is bound to `company-show-doc-buffer` (like `f1`).
|
||||
|
||||
## 2014-04-19 (0.8.0)
|
||||
|
||||
* `company-capf` is included in `company-backends` in any supported Emacs
|
||||
version (>= 24.1). `company-elisp` goes before it if Emacs version is < 24.4.
|
||||
* New user option `company-clang-insert-arguments`, by default t.
|
||||
* Default value of `company-idle-delay` lowered to `0.5`.
|
||||
* New user option `company-tooltip-minimum-width`, by default 0.
|
||||
* New function `company-grab-symbol-cons`.
|
||||
* `company-clang` fetches completion candidates asynchronously.
|
||||
* Added support for asynchronous back-ends (experimental).
|
||||
* Support for back-end command `crop` dropped (it was never documented).
|
||||
* Support for Emacs 23 dropped.
|
||||
* New user option `company-abort-manual-when-too-short`.
|
||||
|
||||
## 2014-03-25 (0.7.3)
|
||||
|
||||
* New user option `company-etags-ignore-case`.
|
||||
|
||||
## 2014-03-19 (0.7.2)
|
||||
|
||||
* Support for Emacs 22 officially dropped.
|
||||
* `company-clang` supports `indent-tabs-mode` and multibyte chars before point.
|
||||
|
||||
## 2014-03-18 (0.7.1)
|
||||
|
||||
* Group of back-ends can now contain keyword `:with`, which makes all back-ends
|
||||
after it to be skipped for prefix calculation.
|
||||
* New function `company-version`.
|
||||
* New bundled back-end `company-yasnippet`.
|
||||
* Completion candidates returned from grouped back-ends are tagged to remember
|
||||
which back-end each came from.
|
||||
* New user option `company-tooltip-align-annotations`, off by default.
|
||||
* New bundled back-end `company-bbdb`.
|
||||
|
||||
## 2014-02-18 (0.7)
|
||||
|
||||
* New back-end command, `match`, for non-prefix completion.
|
||||
* New user option `company-continue-commands`. The default value aborts
|
||||
completion on buffer saving commands.
|
||||
* New back-end command, `annotation`, for text displayed inline in the popup
|
||||
that's not a part of completion candidate.
|
||||
* `company-capf`, `company-clang` and `company-eclim` use `annotation`.
|
||||
* `company-preview*` faces inherit from `company-tooltip-selection` and
|
||||
`company-tooltip-common-selection` on light themes.
|
||||
* New user option `company-transformers`.
|
||||
* First transformer, `company-sort-by-occurrence`.
|
||||
* New user options controlling `company-dabbrev` and `company-dabbrev-code`.
|
||||
|
||||
## 2014-01-25 (0.6.14)
|
||||
|
||||
* The tooltip front-end is rendered with scrollbar, controlled by the user
|
||||
option `company-tooltip-offset-display`.
|
||||
* The tooltip front-end is rendered with margins, controlled by the user option
|
||||
`company-tooltip-margin`.
|
||||
|
||||
## 2014-01-14 (0.6.13)
|
||||
|
||||
* Experimental support for non-prefix completion.
|
||||
* Starting with Emacs version 24.4, `company-capf` is included in
|
||||
`company-backends` and replaces `company-elisp`.
|
||||
* `company-capf` supports completion tables that return non-default boundaries.
|
||||
* `company-elisp` is enabled in `inferior-emacs-lisp-mode`.
|
||||
|
||||
## 2013-09-28 (0.6.12)
|
||||
|
||||
* Default value of `company-begin-commands` changed to `(self-insert-command)`.
|
||||
* Futher improvement in `org-indent-mode` compatibility.
|
||||
|
||||
## 2013-08-18 (0.6.11)
|
||||
|
||||
* `company-template-c-like-templatify` removes all text after closing paren, for
|
||||
use in backends that display additional info there.
|
||||
* `company-cmake` is now bundled.
|
||||
* Better `linum` compatibility in Emacs <= 24.2.
|
||||
* `company-global-modes`: New option.
|
||||
|
||||
## 2013-05-26 (0.6.10)
|
||||
|
||||
* Plays nicer with `org-indent-mode`.
|
||||
* Works in horizontally scrolled windows.
|
||||
|
||||
## 2013-05-10 (0.6.9)
|
||||
|
||||
* `company-capf` respects `:exit-function` completion property.
|
||||
* `company-backends`: `prefix` command can return `t` in the cdr.
|
||||
* `company-clang-begin-after-member-access`: New option.
|
||||
* Mouse click outside the tooltip aborts completion.
|
||||
* `company-clang` uses standard input to pass the contents of current buffer to
|
||||
Clang 2.9+, otherwise saves the buffer and passes the path to the file.
|
||||
* `company-clang-auto-save` option has been removed.
|
||||
* Better interaction with `outline-minor-mode`.
|
||||
* `company-dabbrev-code` supports all `prog-mode` derivatives.
|
||||
|
||||
## 2013-04-16 (0.6.8)
|
||||
|
||||
* `company-auto-complete` is disabled by default.
|
||||
* `company-auto-complete-chars` default value includes fewer syntax classes.
|
||||
* In expanded function calls, arguments skipped by the user default to "argN".
|
||||
* `company-eclim` and `company-clang` do not strip argument types from fields.
|
||||
* `company-clang` expands function calls for all three modes now.
|
||||
* `company-clang` supports `c++-mode` by default.
|
||||
|
||||
## 2013-04-05 (0.6.7)
|
||||
|
||||
* Two `company-elisp` tweaks.
|
||||
|
||||
## 2013-04-01 (0.6.6)
|
||||
|
||||
* `company-elisp` doesn't offer completions when typing the name and the
|
||||
arguments of a new function or macro definition, allowing to fall back to
|
||||
other back-ends like `company-dabbrev-code`.
|
||||
|
||||
## 2013-03-30 (0.6.5)
|
||||
|
||||
* Fixed keybindings when running in a terminal.
|
||||
* `company-elisp-show-locals-first`: new customizable variable.
|
||||
* `company-elisp` shows more accurate and comprehensive candidates list.
|
||||
|
||||
## 2013-03-26 (0.6.4)
|
||||
|
||||
* `company-eclim` shows valid completions after an opening paren.
|
||||
* Expanded template does not get removed until the point leaves it. After your
|
||||
input the last argument in a method call expanded by `company-eclim`, you can
|
||||
press `<tab>` once more, to jump after the closing paren. No other bundled
|
||||
back-ends are affected.
|
||||
|
||||
## 2013-03-25 (0.6.3)
|
||||
|
||||
* New tooltip face colors used on themes with light background.
|
||||
* Pseudo-tooltip stays up-to-date when text is inserted after the point.
|
||||
* Fixed `company-require-match` mechanics.
|
||||
|
||||
## 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.
|
||||
* `company-eclim` and `company-clang` only expand the template on explicit user
|
||||
action (such as `company-complete-{selection,number,mouse}`).
|
||||
* `company-template` has some breaking changes. When point is at one of the
|
||||
fields, it's displayed at the beginning, not right after it; `<tab>` jumps to
|
||||
the next field, `forward-word` and `subword-forward` remappings are removed;
|
||||
when you jump to the next field, if the current one hasn't been edited, the
|
||||
overlay gets removed but the text remains.
|
||||
* `company-eclim` shows method overloads and expands templates for calls.
|
||||
* `company-clang-objc-templatify` does not insert spaces after colons anymore.
|
||||
* `company-clang` is now only initialized in supported buffers.
|
||||
So, no error messages if you don't have Clang until you open a C file.
|
||||
* `company-clang` recognizes Clang included in recent Xcode.
|
||||
* New commands `company-select-previous-or-abort` and
|
||||
`company-select-next-or-abort`, bound to `<up>` and `<down>`.
|
||||
|
||||
## 2013-03-19 (0.6)
|
||||
|
||||
* Across-the-board bugfixing.
|
||||
* `company-pysmell` is not used by default anymore.
|
||||
* Loading of `nxml`, `semantic`, `pymacs` and `ropemacs` is now deferred.
|
||||
* Candidates from grouped back-ends are merged more conservatively: only
|
||||
back-ends that return the same prefix at point are used.
|
||||
* `company-clang` now shows meta information, too.
|
||||
* Some performance improvements.
|
||||
* Fixed two old tooltip annoyances.
|
||||
* Instead of `overrriding-terminal-local-map`, we're now using
|
||||
`emulation-mode-map-alists` (experimental). This largely means that when the
|
||||
completion keymap is active, other minor modes' keymaps are still used, so,
|
||||
for example, it's not as easy to accidentally circumvent `paredit-mode`
|
||||
when it's enabled.
|
||||
* `company-elisp` has seen some improvements.
|
||||
* Added `company-capf`: completion adapter using
|
||||
`completion-at-point-functions`. (Stefan Monnier)
|
||||
* Clang completions now include macros and are case-sensitive.
|
||||
* Switching between tag files now works correctly with `company-etags`.
|
||||
|
||||
## 2010-02-24 (0.5)
|
||||
|
||||
* `company-ropemacs` now provides location and docs. (Fernando H. Silva)
|
||||
* Added `company-with-candidate-inserted` macro.
|
||||
* Added `company-clang` back-end.
|
||||
* Added new mechanism for non-consecutive insertion.
|
||||
(So far only used by clang for ObjC.)
|
||||
* The semantic back-end now shows meta information for local symbols.
|
||||
* Added compatibility for CEDET in Emacs 23.2 and from CVS. (Oleg Andreev)
|
||||
|
||||
## 2009-05-07 (0.4.3)
|
||||
|
||||
* Added `company-other-backend`.
|
||||
* Idle completion no longer interrupts multi-key command input.
|
||||
* Added `company-ropemacs` and `company-pysmell` back-ends.
|
||||
|
||||
## 2009-04-25 (0.4.2)
|
||||
|
||||
* In C modes . and -> now count towards `company-minimum-prefix-length`.
|
||||
* Reverted default front-end back to `company-preview-if-just-one-frontend`.
|
||||
* The pseudo tooltip will no longer be clipped at the right window edge.
|
||||
* Added `company-tooltip-minimum`.
|
||||
* Windows compatibility fixes.
|
||||
|
||||
## 2009-04-19 (0.4.1)
|
||||
|
||||
* Added `global-company-mode`.
|
||||
* Performance enhancements.
|
||||
* Added `company-eclim` back-end.
|
||||
* Added safer workaround for Emacs `posn-col-row` bug.
|
||||
|
||||
## 2009-04-18 (0.4)
|
||||
|
||||
* Automatic completion is now aborted if the prefix gets too short.
|
||||
* Added option `company-dabbrev-time-limit`.
|
||||
* `company-backends` now supports merging back-ends.
|
||||
* Added back-end `company-dabbrev-code` for generic code.
|
||||
* Fixed `company-begin-with`.
|
||||
|
||||
## 2009-04-15 (0.3.1)
|
||||
|
||||
* Added 'stop prefix to prevent dabbrev from completing inside of symbols.
|
||||
* Fixed issues with tabbar-mode and line-spacing.
|
||||
* Performance enhancements.
|
||||
|
||||
## 2009-04-12 (0.3)
|
||||
|
||||
* Added `company-begin-commands` option.
|
||||
* Added abbrev, tempo and Xcode back-ends.
|
||||
* Back-ends are now interactive. You can start them with M-x backend-name.
|
||||
* Added `company-begin-with` for starting company from elisp-code.
|
||||
* Added hooks.
|
||||
* Added `company-require-match` and `company-auto-complete` options.
|
||||
|
||||
## 2009-04-05 (0.2.1)
|
||||
|
||||
* Improved Emacs Lisp back-end behavior for local variables.
|
||||
* Added `company-elisp-detect-function-context` option.
|
||||
* The mouse can now be used for selection.
|
||||
|
||||
## 2009-03-22 (0.2)
|
||||
|
||||
* Added `company-show-location`.
|
||||
* Added etags back-end.
|
||||
* Added work-around for end-of-buffer bug.
|
||||
* Added `company-filter-candidates`.
|
||||
* More local Lisp variables are now included in the candidates.
|
||||
|
||||
## 2009-03-21 (0.1.5)
|
||||
|
||||
* Fixed elisp documentation buffer always showing the same doc.
|
||||
* Added `company-echo-strip-common-frontend`.
|
||||
* Added `company-show-numbers` option and M-0 ... M-9 default bindings.
|
||||
* Don't hide the echo message if it isn't shown.
|
||||
|
||||
## 2009-03-20 (0.1)
|
||||
|
||||
* Initial release.
|
@ -0,0 +1,4 @@
|
||||
See the [homepage](http://company-mode.github.com/).
|
||||
[](http://githalytics.com/company-mode/company-mode)
|
||||
|
||||
[](https://travis-ci.org/company-mode/company-mode)
|
@ -0,0 +1,51 @@
|
||||
;;; company-abbrev.el --- 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 GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
;;; Commentary:
|
||||
;;
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'company)
|
||||
(require 'cl-lib)
|
||||
(require 'abbrev)
|
||||
|
||||
(defun company-abbrev-insert (match)
|
||||
"Replace MATCH with the expanded abbrev."
|
||||
(expand-abbrev))
|
||||
|
||||
;;;###autoload
|
||||
(defun company-abbrev (command &optional arg &rest ignored)
|
||||
"`company-mode' completion back-end for abbrev."
|
||||
(interactive (list 'interactive))
|
||||
(cl-case command
|
||||
(interactive (company-begin-backend 'company-abbrev
|
||||
'company-abbrev-insert))
|
||||
(prefix (company-grab-symbol))
|
||||
(candidates (nconc
|
||||
(delete "" (all-completions arg global-abbrev-table))
|
||||
(delete "" (all-completions arg local-abbrev-table))))
|
||||
(meta (abbrev-expansion arg))
|
||||
(require-match t)))
|
||||
|
||||
(provide 'company-abbrev)
|
||||
;;; company-abbrev.el ends here
|
@ -0,0 +1,49 @@
|
||||
;;; company-bbdb.el --- company-mode completion back-end for BBDB in message-mode
|
||||
|
||||
;; Copyright (C) 2013-2014 Free Software Foundation, Inc.
|
||||
|
||||
;; Author: Jan Tatarik <jan.tatarik@gmail.com>
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
||||