emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/denote d9f439e47f 173/355: Add helper function to prepa


From: ELPA Syncer
Subject: [elpa] externals/denote d9f439e47f 173/355: Add helper function to prepare completion table
Date: Sun, 26 Jun 2022 23:58:20 -0400 (EDT)

branch: externals/denote
commit d9f439e47f352cc16bf69c9e4d24ed577ae92ad7
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Add helper function to prepare completion table
---
 denote.el | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/denote.el b/denote.el
index 6bbd58c103..9690fd547d 100644
--- a/denote.el
+++ b/denote.el
@@ -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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]