move cp-unvisited-file-list to relevant section
This commit is contained in:
parent
2a46d758f7
commit
363c875df6
1 changed files with 12 additions and 12 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue