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

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

[elpa] externals/denote af17af9f2b 04/12: Move a helper function above w


From: ELPA Syncer
Subject: [elpa] externals/denote af17af9f2b 04/12: Move a helper function above where it is first called
Date: Sun, 11 Feb 2024 03:57:53 -0500 (EST)

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

    Move a helper function above where it is first called
    
    This makes it easier to follow the sequence of definitions and
    calls (a style we generally try to follow).
---
 denote.el | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/denote.el b/denote.el
index f945e0c1c7..c3ec44a44e 100644
--- a/denote.el
+++ b/denote.el
@@ -1495,6 +1495,17 @@ for new note creation.  The default is `org'.")
   "Return all `denote-file-types' keys."
   (delete-dups (mapcar #'car denote-file-types)))
 
+(defun denote--format-front-matter (title date keywords id filetype)
+  "Front matter for new notes.
+
+TITLE, DATE, and ID are all strings or functions that return a
+string.  KEYWORDS is a list of strings.  FILETYPE is one of the
+values of `denote-file-type'."
+  (let* ((fm (denote--front-matter filetype))
+         (title (denote--format-front-matter-title title filetype))
+         (kws (denote--format-front-matter-keywords keywords filetype)))
+    (if fm (format fm title date kws id) "")))
+
 (defun denote--get-title-line-from-front-matter (title file-type)
   "Retrieve title line from front matter based on FILE-TYPE.
 Format TITLE in the title line.  The returned line does not
@@ -1756,17 +1767,6 @@ Apply `denote-sluggify' to KEYWORDS."
   (let ((kws (denote-sluggify-keywords keywords)))
     (funcall (denote--keywords-value-function file-type) kws)))
 
-(defun denote--format-front-matter (title date keywords id filetype)
-  "Front matter for new notes.
-
-TITLE, DATE, and ID are all strings or functions that return a
-string.  KEYWORDS is a list of strings.  FILETYPE is one of the
-values of `denote-file-type'."
-  (let* ((fm (denote--front-matter filetype))
-         (title (denote--format-front-matter-title title filetype))
-         (kws (denote--format-front-matter-keywords keywords filetype)))
-    (if fm (format fm title date kws id) "")))
-
 (defun denote--path (title keywords dir id file-type signature)
   "Return path to new file.
 Use ID, TITLE, KEYWORDS, FILE-TYPE and SIGNATURE to construct



reply via email to

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