]> code.delx.au - gnu-emacs-elpa/blobdiff - company.el
Bumped version to 0.2.1.
[gnu-emacs-elpa] / company.el
index ea482c7e033cb3796304a64b0f45c45b5afdc8bd..245df81ed1084d0837c2f25e3cd433dae485fede 100644 (file)
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2009 Nikolaj Schumacher
 ;;
 ;; Author: Nikolaj Schumacher <bugs * nschum de>
-;; Version: 0.2
+;; Version: 0.2.1
 ;; Keywords: abbrev, convenience, matchis
 ;; URL: http://nschum.de/src/emacs/company/
 ;; Compatibility: GNU Emacs 22.x, GNU Emacs 23.x
 ;;     ('candidates (list "foobar" "foobaz" "foobarbaz"))
 ;;     ('meta (format "This value is named %s" arg))))
 ;;
+;; Sometimes it is a good idea to mix two back-ends together, for example to
+;; enrich gtags with dabbrev text (to emulate local variables):
+;;
+;; (defun gtags-gtags-dabbrev-backend (command &optional arg &rest ignored)
+;;   (case command
+;;     (prefix (company-gtags 'prefix))
+;;     (candidates (append (company-gtags 'candidates arg)
+;;                         (company-dabbrev 'candidates arg)))))
+;;
 ;; Known Issues:
 ;; When point is at the very end of the buffer, the pseudo-tooltip appears very
 ;; wrong, unless company is allowed to temporarily insert a fake newline.
@@ -56,7 +65,9 @@
 ;;
 ;;; Change Log:
 ;;
-;;    Added `company-elisp-functions-only-in-context' option.
+;; 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)
@@ -711,7 +722,9 @@ keymap during active completions (`company-active-map'):
                                candidate))
               `(string-match ,company-search-string candidate))))
   (company-update-candidates
-   (company-apply-predicate company-candidates company-candidates-predicate)))
+   (company-apply-predicate company-candidates company-candidates-predicate))
+  ;; Invalidate cache.
+  (setq company-candidates-cache (cons company-prefix company-candidates)))
 
 (defun company-filter-printing-char ()
   (interactive)