move cp-unvisited-file-list to relevant section

This commit is contained in:
Eric Danan 2017-08-16 11:00:37 +02:00
parent 2a46d758f7
commit 363c875df6

View file

@ -65,18 +65,6 @@
;;; counsel-projectile-find-file ;;; counsel-projectile-find-file
(defun counsel-projectile--unvisited-file-list ()
"Return a list of unvisited files for the current project.
Like `projectile-current-project-files', but skips any files
already being visited by a buffer."
(let ((root (projectile-project-root)))
(cl-loop
for name in (projectile-current-project-files)
for file = (expand-file-name name root)
if (not (get-file-buffer file))
collect name)))
(defun counsel-projectile--find-file-action (file &optional other-window) (defun counsel-projectile--find-file-action (file &optional other-window)
"Find FILE and run `projectile-find-file-hook'." "Find FILE and run `projectile-find-file-hook'."
(funcall (if other-window (funcall (if other-window
@ -368,6 +356,18 @@ invokes `projectile-commander' instead of
;;; counsel-projectile ;;; counsel-projectile
(defun counsel-projectile--unvisited-file-list ()
"Return a list of unvisited files for the current project.
Like `projectile-current-project-files', but skips any files
already being visited by a buffer."
(let ((root (projectile-project-root)))
(cl-loop
for name in (projectile-current-project-files)
for file = (expand-file-name name root)
if (not (get-file-buffer file))
collect name)))
(defun counsel-projectile--global-list () (defun counsel-projectile--global-list ()
"Get a list of project buffers and files." "Get a list of project buffers and files."
(append (append