]> code.delx.au - gnu-emacs-elpa/blobdiff - company-files.el
Added Xcode back-end.
[gnu-emacs-elpa] / company-files.el
index abb2a00fabbd56db94b73ddcb9d492f82bbf1f47..b81625a0d24092d5fddc326cc6634462b48798f0 100644 (file)
@@ -2,7 +2,7 @@
 ;;
 ;; Copyright (C) 2009 Nikolaj Schumacher
 ;;
-;; This file is part of company.
+;; This file is part of company 0.2.1.
 ;;
 ;; This program is free software; you can redistribute it and/or
 ;; modify it under the terms of the GNU General Public License
       (setq company-files-completion-cache (cons dir (nreverse candidates))))
     (cdr company-files-completion-cache)))
 
+;;;###autoload
 (defun company-files (command &optional arg &rest ignored)
+  "a `company-mode' completion back-end existing file names."
+  (interactive (list 'interactive))
   (case command
+    ('interactive (company-begin-backend 'company-files))
     ('prefix (company-files-grab-existing-name))
     ('candidates (company-files-complete arg))
+    ('location (cons (dired-noselect
+                      (file-name-directory (directory-file-name arg))) 1))
     ('sorted t)
     ('no-cache t)))