Cleanup how my/project-find-common-projects works
Use dolist to remove unnecessary duplication Add ~/Documents/ directory to list searched
This commit is contained in:
parent
e0dd62a108
commit
05ef93948f
19
init.el
19
init.el
|
@ -958,17 +958,18 @@
|
||||||
(magit-project-status "Magit")))
|
(magit-project-status "Magit")))
|
||||||
:config
|
:config
|
||||||
(defun my/project-find-common-projects ()
|
(defun my/project-find-common-projects ()
|
||||||
"Search common project directories using
|
"Search and remember common project directories.
|
||||||
`project-remember-project-under'."
|
|
||||||
|
Calls `project-remember-project-under' for ~/.config/,
|
||||||
|
~/Projects/, and ~/Documents/"
|
||||||
(interactive)
|
(interactive)
|
||||||
(require 'project)
|
(require 'project)
|
||||||
(if (file-exists-p "~/.config/")
|
(project-forget-zombie-projects)
|
||||||
(project-remember-projects-under "~/.config/" t))
|
(dolist
|
||||||
(if (file-exists-p "~/Projects/")
|
(dir
|
||||||
(project-remember-projects-under "~/Projects/" t))
|
'("~/.config/" "~/Projects/" "~/Documents/"))
|
||||||
(if (file-exists-p "~/Documents/")
|
(project-remember-projects-under dir t))
|
||||||
(project-remember-projects-under "~/Documents/" t)))
|
))
|
||||||
(project-forget-zombie-projects))
|
|
||||||
|
|
||||||
(use-package magit
|
(use-package magit
|
||||||
:bind (("C-c g g" . magit-status)
|
:bind (("C-c g g" . magit-status)
|
||||||
|
|
Loading…
Reference in a new issue