[Utils] Only show important document with prefix arg

This commit is contained in:
Daniel - 2017-11-25 20:45:59 +01:00
parent f77e1133a3
commit 4bae941b44
Signed by: dbo
GPG Key ID: 4F63DB96D45AA9C6
1 changed files with 4 additions and 3 deletions

View File

@ -333,14 +333,15 @@ path."
("Find file" . find-file))))
"Helm source for important documents.")
(defun db/helm-shortcuts ()
(defun db/helm-shortcuts (arg)
"Open helm completion on common locations."
(interactive)
(interactive "p")
(require 'helm-files)
(require 'helm-bookmark)
(helm :sources `(db/helm-source-frequently-used-features
db/helm-source-frequently-visited-locations
,(when (file-directory-p db/important-documents-path)
,(when (and (= arg 4)
(file-directory-p db/important-documents-path))
'db/helm-source-important-documents)
helm-source-bookmarks
helm-source-bookmark-set)))