[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
- [elpa] externals/denote updated (9353d23aa4 -> 55e923ffc5), ELPA Syncer, 2024/02/11
- [elpa] externals/denote e66f275c15 01/12: Ensure that denote-surround-with-quotes does not return "nil" if S is nil, ELPA Syncer, 2024/02/11
- [elpa] externals/denote a2229e03ff 09/12: Simplify 'denote-parse-date' now that 'denote-valid-date-p' does the work, ELPA Syncer, 2024/02/11
- [elpa] externals/denote d862b65526 06/12: Define denote-get-identifier function, ELPA Syncer, 2024/02/11
- [elpa] externals/denote 9dced4b7fd 07/12: Harden the conditionality of denote-valid-date-p, ELPA Syncer, 2024/02/11
- [elpa] externals/denote af17af9f2b 04/12: Move a helper function above where it is first called,
ELPA Syncer <=
- [elpa] externals/denote 07e8d0bf90 08/12: Clarify the documentation of denote-valid-date-p, ELPA Syncer, 2024/02/11
- [elpa] externals/denote 121ed6d04d 11/12: Use the new 'denote-get-identifier' where appropriate, ELPA Syncer, 2024/02/11
- [elpa] externals/denote 6c503ed953 02/12: Rename denote-surround-with-quotes to denote-format-string-for-md-front-matter, ELPA Syncer, 2024/02/11
- [elpa] externals/denote 675f5e44ba 03/12: Add denote-format-string-for-org-front-matter, ELPA Syncer, 2024/02/11
- [elpa] externals/denote 2339e51633 05/12: Rename 'denote--valid-date' to 'denote-valid-date-p', ELPA Syncer, 2024/02/11
- [elpa] externals/denote 55e923ffc5 12/12: Make denote-format-file-name also accept nil TITLE and SIGNATURE, ELPA Syncer, 2024/02/11
- [elpa] externals/denote 91f51e6cab 10/12: Use the correct number for the {{{development-version}}} in the docs, ELPA Syncer, 2024/02/11