Add helper function to prepare completion table
This commit is contained in:
parent
d66312e517
commit
d9f439e47f
|
@ -221,6 +221,13 @@ We consider those characters illigal for our purposes.")
|
|||
|
||||
;;;; File helper functions
|
||||
|
||||
(defun denote--completion-table (category candidates)
|
||||
"Pass appropriate metadata CATEGORY to completion CANDIDATES."
|
||||
(lambda (string pred action)
|
||||
(if (eq action 'metadata)
|
||||
`(metadata (category . ,category))
|
||||
(complete-with-action action candidates string pred))))
|
||||
|
||||
(defun denote-directory ()
|
||||
"Return path of variable `denote-directory' as a proper directory."
|
||||
(let ((path denote-directory))
|
||||
|
|
Loading…
Reference in a new issue