]> code.delx.au - gnu-emacs-elpa/commitdiff
* packages/company/company-cmake.el: Fix up copyright. Require CL.
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 5 Sep 2013 23:24:27 +0000 (02:24 +0300)
committerDmitry Gutov <dgutov@yandex.ru>
Thu, 5 Sep 2013 23:24:27 +0000 (02:24 +0300)
* 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'.

company-cmake.el
company-eclim.el
company-template.el

index 0c96eb676a70e508d85b1472a1f8dd2b91d7df08..34359dc7ab011a1e0a9b298cfcd66e8fa29c9136 100644 (file)
@@ -1,24 +1,22 @@
 ;;; company-cmake.el --- company-mode completion back-end for CMake
 
-;; Copyright (C) 2013  Chen Bin
+;; Copyright (C) 2013  Free Software Foundation, Inc.
 
 ;; Author: Chen Bin <chenbin DOT sh AT gmail>
 ;; Version: 0.1
 
-;; This file is NOT part of GNU Emacs.
-
-;; GNU Emacs is free software: you can redistribute it and/or modify
+;; 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 3 of the License, or
 ;; (at your option) any later version.
 
-;; GNU Emacs is distributed in the hope that it will be useful,
+;; This program 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/>.
+;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 ;;
@@ -26,6 +24,8 @@
 ;; commands used by CMake.  And their descriptions.
 
 ;;; Code:
+
+(eval-when-compile (require 'cl))
 (require 'company)
 
 (defgroup company-cmake nil
index 05e609cdc438d31e0cada3446ece0b100ed483c0..70db7c31b10c52c014323b2224fb7be014e51a27 100644 (file)
@@ -70,6 +70,7 @@ eclim can only complete correctly when the buffer has been saved."
 (make-variable-buffer-local 'company-eclim--doc)
 
 (declare-function json-read "json")
+(defvar json-array-type)
 
 (defun company-eclim--call-process (&rest args)
   (let ((coding-system-for-read 'utf-8)
@@ -109,8 +110,7 @@ eclim can only complete correctly when the buffer has been saved."
 (defun company-eclim--candidates (prefix)
   (interactive "d")
   (let ((project-file (file-relative-name buffer-file-name
-                                          (company-eclim--project-dir)))
-        (project-name (company-eclim--project-name)))
+                                          (company-eclim--project-dir))))
     (when company-eclim-auto-save
       (when (buffer-modified-p)
         (basic-save-buffer))
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)))