]> code.delx.au - gnu-emacs-elpa/blobdiff - packages/company/company-abbrev.el
Merge commit '39c53c953ef9ec2a80e55849d2cb44de219801f5'
[gnu-emacs-elpa] / packages / company / company-abbrev.el
index 21dcd2e4588e7c9d68a255eb2f347c5420be39ee..a454aaa90d277c2d3950b7a5177969152fa2090f 100644 (file)
@@ -1,6 +1,6 @@
-;;; company-abbrev.el --- company-mode completion back-end for abbrev
+;;; company-abbrev.el --- company-mode completion back-end for abbrev
 
-;; Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2011  Free Software Foundation, Inc.
 
 ;; Author: Nikolaj Schumacher
 
 ;; 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)
-(eval-when-compile (require 'cl))
+(require 'cl-lib)
 (require 'abbrev)
 
 (defun company-abbrev-insert (match)
 
 ;;;###autoload
 (defun company-abbrev (command &optional arg &rest ignored)
-  "`company-mode' completion back-end for abbrev."
+  "`company-mode' completion back-end for abbrev."
   (interactive (list 'interactive))
-  (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)))
+  (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