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

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

[elpa] externals/denote 582b50ab13 03/13: Make denote-title-prompt publi


From: ELPA Syncer
Subject: [elpa] externals/denote 582b50ab13 03/13: Make denote-title-prompt public
Date: Wed, 14 Sep 2022 00:57:40 -0400 (EDT)

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

    Make denote-title-prompt public
    
    We are working towards version 1.0.0.  The idea is to provide functions
    that users/developers can rely on.  By making them public (removing the
    double hyphens) we signify that those forms are (i) in a stable
    state, and (ii) any change to them will be handled with care and
    documented accordingly.
---
 denote.el | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/denote.el b/denote.el
index b998f34edc..3f435bbd71 100644
--- a/denote.el
+++ b/denote.el
@@ -1180,7 +1180,7 @@ When called from Lisp, all arguments are optional.
    (let ((args (make-vector 6 nil)))
      (dolist (prompt denote-prompts)
        (pcase prompt
-         ('title (aset args 0 (denote--title-prompt
+         ('title (aset args 0 (denote-title-prompt
                                (when (use-region-p)
                                  (buffer-substring-no-properties
                                   (region-beginning)
@@ -1208,9 +1208,9 @@ When called from Lisp, all arguments are optional.
     (denote--keywords-add-to-history keywords)))
 
 (defvar denote--title-history nil
-  "Minibuffer history of `denote--title-prompt'.")
+  "Minibuffer history of `denote-title-prompt'.")
 
-(defun denote--title-prompt (&optional default-title)
+(defun denote-title-prompt (&optional default-title)
   "Read file title for `denote'.
 With optional DEFAULT-TITLE use it as the default value."
   (let* ((def default-title)
@@ -1219,6 +1219,11 @@ With optional DEFAULT-TITLE use it as the default value."
                    "File title: ")))
     (read-string format nil 'denote--title-history def)))
 
+(define-obsolete-function-alias
+  'denote--title-prompt
+  'denote-title-prompt
+  "1.0.0")
+
 (defvar denote--file-type-history nil
   "Minibuffer history of `denote--file-type-prompt'.")
 
@@ -1594,7 +1599,7 @@ files)."
           (file-type (denote--filetype-heuristics file)))
      (list
       file
-      (denote--title-prompt
+      (denote-title-prompt
        (denote--retrieve-title-or-filename file file-type))
       (denote-keywords-prompt))))
   (let* ((dir (file-name-directory file))
@@ -1799,7 +1804,7 @@ relevant front matter."
   (interactive
    (list
     (buffer-file-name)
-    (denote--title-prompt)
+    (denote-title-prompt)
     (denote-keywords-prompt)))
   (when (denote--writable-and-supported-p file)
     (denote--add-front-matter file title keywords (denote--file-name-id file)
@@ -2566,7 +2571,7 @@ output of the `denote-org-capture-specifiers' (which can 
include
 arbitrary text).
 
 Consult the manual for template samples."
-  (let* ((title (denote--title-prompt))
+  (let* ((title (denote-title-prompt))
          (keywords (denote-keywords-prompt))
          (front-matter (denote--format-front-matter
                         title (denote--date nil 'org) keywords



reply via email to

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