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

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

[elpa] externals/org ac0042184e: org-bibtex-headline-format-function: Fa


From: ELPA Syncer
Subject: [elpa] externals/org ac0042184e: org-bibtex-headline-format-function: Factor out lambda default value
Date: Tue, 25 Jul 2023 06:59:12 -0400 (EDT)

branch: externals/org
commit ac0042184e89a468f01c3d4ac6b6bd92f2d127c6
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>

    org-bibtex-headline-format-function: Factor out lambda default value
    
    * lisp/ol-bibtex.el (org-bibtex-headline-format-default): New function
    to be used as the default value of
    `org-bibtex-headline-format-function'.
    (org-bibtex-headline-format-function): Update the default value.
    
    Link: https://orgmode.org/list/87edl71tyu.fsf@localhost
---
 lisp/ol-bibtex.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lisp/ol-bibtex.el b/lisp/ol-bibtex.el
index fd9517233e..4308424a3f 100644
--- a/lisp/ol-bibtex.el
+++ b/lisp/ol-bibtex.el
@@ -266,7 +266,7 @@ a missing title field."
   :type 'boolean)
 
 (defcustom org-bibtex-headline-format-function
-  (lambda (entry) (cdr (assq :title entry)))
+  #'org-bibtex-headline-format-default
   "Function returning the headline text for `org-bibtex-write'.
 It should take a single argument, the bibtex entry (an alist as
 returned by `org-bibtex-read').  The default value simply returns
@@ -636,6 +636,10 @@ With prefix argument OPTIONAL also prompt for optional 
fields."
 With prefix argument OPTIONAL also prompt for optional fields."
   (interactive) (org-map-entries (lambda () (org-bibtex-check optional))))
 
+(defun org-bibtex-headline-format-default (entry)
+  "Return headline text according to ENTRY title."
+  (cdr (assq :title entry)))
+
 (defun org-bibtex-create (&optional arg nonew)
   "Create a new entry at the given level.
 With a prefix arg, query for optional fields as well.



reply via email to

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