]> code.delx.au - gnu-emacs-elpa/blobdiff - packages/company/company-template.el
* packages/company/company-etags.el: Require `cl' for `case'.
[gnu-emacs-elpa] / packages / company / company-template.el
index 5c72ac8bbff0c39c4124920c3f00363071f0e255..ea1db86bca7a695711f62b51f0251fb7a7bf673f 100644 (file)
@@ -1,6 +1,6 @@
 ;;; company-template.el
 
-;; Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 2009, 2010, 2013 Free Software Foundation, Inc.
 
 ;; Author: Nikolaj Schumacher
 
@@ -34,6 +34,9 @@
     (define-key keymap [tab] 'company-template-forward-field)
     keymap))
 
+(defvar company-template--buffer-templates nil)
+(make-variable-buffer-local 'company-template--buffer-templates)
+
 ;; interactive ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 (defun company-template-templates-at (pos)
@@ -73,9 +76,6 @@
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-(defvar company-template--buffer-templates nil)
-(make-variable-buffer-local 'company-template--buffer-templates)
-
 (defun company-template-declare-template (beg end)
   (let ((ov (make-overlay beg end)))
     ;; (overlay-put ov 'face 'highlight)
@@ -134,7 +134,7 @@ Leave point at the end of the field."
 
 ;; hooks ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-(defun company-template-insert-hook (ovl after-p &rest ignore)
+(defun company-template-insert-hook (ovl after-p &rest _ignore)
   "Called when a snippet input prompt is modified."
   (unless after-p
     (company-template-remove-field ovl t)))