[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 14/30: company-files.el: Use the "private function" naming conven
From: |
Dmitry Gutov |
Subject: |
[elpa] 14/30: company-files.el: Use the "private function" naming convention |
Date: |
Tue, 14 Oct 2014 22:22:49 +0000 |
dgutov pushed a commit to branch master
in repository elpa.
commit 8ae29175171b6945008744b051f3f6efb82de6db
Author: Dmitry Gutov <address@hidden>
Date: Mon Sep 29 00:05:04 2014 +0400
company-files.el: Use the "private function" naming convention
---
company-files.el | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/company-files.el b/company-files.el
index 9a650d6..5a77699 100644
--- a/company-files.el
+++ b/company-files.el
@@ -28,13 +28,13 @@
(require 'company)
(require 'cl-lib)
-(defun company-files-directory-files (dir prefix)
+(defun company-files--directory-files (dir prefix)
(ignore-errors
(if (equal prefix "")
(directory-files dir nil "\\`[^.]\\|\\`.[^.]")
(file-name-all-completions prefix dir))))
-(defvar company-files-regexps
+(defvar company-files--regexps
(let* ((root (if (eq system-type 'windows-nt)
"[a-zA-Z]:/"
"/"))
@@ -43,11 +43,11 @@
(concat "\'\\(" begin "[^\'\n]*\\)")
(concat "\\(?:[ \t]\\|^\\)\\(" begin "[^ \t\n]*\\)"))))
-(defun company-files-grab-existing-name ()
+(defun company-files--grab-existing-name ()
;; Grab the file name.
;; When surrounded with quotes, it can include spaces.
(let (file dir)
- (and (cl-dolist (regexp company-files-regexps)
+ (and (cl-dolist (regexp company-files--regexps)
(when (setq file (company-grab-line regexp 1))
(cl-return file)))
(setq dir (file-name-directory file))
@@ -56,29 +56,29 @@
(file-name-all-completions (file-name-nondirectory file) dir)
file)))
-(defvar company-files-completion-cache nil)
+(defvar company-files--completion-cache nil)
-(defun company-files-complete (prefix)
+(defun company-files--complete (prefix)
(let* ((dir (file-name-directory prefix))
(key (cons (expand-file-name dir)
(nth 5 (file-attributes dir))))
(file (file-name-nondirectory prefix))
candidates directories)
- (unless (equal key (car company-files-completion-cache))
- (dolist (file (company-files-directory-files dir file))
+ (unless (equal key (car company-files--completion-cache))
+ (dolist (file (company-files--directory-files dir file))
(setq file (concat dir file))
(push file candidates)
(when (file-directory-p file)
(push file directories)))
(dolist (directory (reverse directories))
;; Add one level of children.
- (dolist (child (company-files-directory-files directory ""))
+ (dolist (child (company-files--directory-files directory ""))
(push (concat directory
(unless (eq (aref directory (1- (length directory)))
?/) "/")
child) candidates)))
- (setq company-files-completion-cache (cons key (nreverse candidates))))
+ (setq company-files--completion-cache (cons key (nreverse candidates))))
(all-completions prefix
- (cdr company-files-completion-cache))))
+ (cdr company-files--completion-cache))))
;;;###autoload
(defun company-files (command &optional arg &rest ignored)
@@ -88,8 +88,8 @@ File paths with spaces are only supported inside strings."
(interactive (list 'interactive))
(cl-case command
(interactive (company-begin-backend 'company-files))
- (prefix (company-files-grab-existing-name))
- (candidates (company-files-complete arg))
+ (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)
- [elpa] 17/30: company-begin-commands: Add `orgtbl-self-insert-command', (continued)
- [elpa] 17/30: company-begin-commands: Add `orgtbl-self-insert-command', Dmitry Gutov, 2014/10/14
- [elpa] 19/30: company-clang-arguments: Fix default element value, Dmitry Gutov, 2014/10/14
- [elpa] 21/30: company-call-backend-raw: Use `condition-case-unless-debug', too, Dmitry Gutov, 2014/10/14
- [elpa] 20/30: Handle non-printable and multiple-width chars in completions, Dmitry Gutov, 2014/10/14
- [elpa] 18/30: Use `condition-case-unless-debug' more, Dmitry Gutov, 2014/10/14
- [elpa] 22/30: company-dabbrev--search: Ignore "uninteresting" buffers, Dmitry Gutov, 2014/10/14
- [elpa] 23/30: Make new tests and interactive-only, Dmitry Gutov, 2014/10/14
- [elpa] 24/30: company-fill-propertize: Use `string-width' on `company-common', Dmitry Gutov, 2014/10/14
- [elpa] 25/30: Handle nil company-common, in order not to bind it in tests, Dmitry Gutov, 2014/10/14
- [elpa] 12/30: Update NEWS; do the forgotten version bump, Dmitry Gutov, 2014/10/14
- [elpa] 14/30: company-files.el: Use the "private function" naming convention,
Dmitry Gutov <=
- [elpa] 26/30: Call `bbdb-search' inside `eval' block, Dmitry Gutov, 2014/10/14
- [elpa] 27/30: Extract regexp for buffers to ignore into a new var, Dmitry Gutov, 2014/10/14
- [elpa] 28/30: company-template-c-like-templatify: Support generics, Dmitry Gutov, 2014/10/14
- [elpa] 29/30: Bump the version, Dmitry Gutov, 2014/10/14
- [elpa] 30/30: Merge commit '60d4c09c982a1c562a70cd6aa705f47ab3badcfb' from company, Dmitry Gutov, 2014/10/14