[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [nongnu] elpa/org-contrib eaef050f28: lisp/ox-bibtex.el (org-bibtex-
|
From: |
Stefan Monnier |
|
Subject: |
Re: [nongnu] elpa/org-contrib eaef050f28: lisp/ox-bibtex.el (org-bibtex-goto-citation): Add missing require |
|
Date: |
Tue, 30 Jan 2024 07:41:58 -0500 |
|
User-agent: |
Gnus/5.13 (Gnus v5.13) |
> diff --git a/lisp/ox-bibtex.el b/lisp/ox-bibtex.el
> index 743fd7da2a..8cdf390cf2 100644
> --- a/lisp/ox-bibtex.el
> +++ b/lisp/ox-bibtex.el
> @@ -157,9 +157,11 @@ to `org-bibtex-citation-p' predicate."
> (defvar org-bibtex-file nil
> "Org file of BibTeX entries.")
>
> +(declare-function obe-citations "org-bibtex-extras" ())
> (defun org-bibtex-goto-citation (&optional citation)
> "Visit a citation given its ID."
> (interactive)
> + (require 'org-bibtex-extras)
> (let ((citation (or citation (completing-read "Citation: "
> (obe-citations)))))
> (find-file (or org-bibtex-file
> (error "`org-bibtex-file' has not been configured")))
The `declare-function` should be placed right next (after) the
`require`. In practice it (currently) makes no difference (because of
technical details of how `declare-function` is (currently) implemented),
but in theory it clarifies that you do not intend to claim that it's safe
to call `obe-citations` from anywhere within `ox-bibtex`, but only from
within `org-bibtex-goto-citation`.
Stefan
- Re: [nongnu] elpa/org-contrib eaef050f28: lisp/ox-bibtex.el (org-bibtex-goto-citation): Add missing require,
Stefan Monnier <=
- Re: [nongnu] elpa/org-contrib eaef050f28: lisp/ox-bibtex.el (org-bibtex-goto-citation): Add missing require, Ihor Radchenko, 2024/01/30
- Re: [nongnu] elpa/org-contrib eaef050f28: lisp/ox-bibtex.el (org-bibtex-goto-citation): Add missing require, Stefan Monnier, 2024/01/30
- Re: [nongnu] elpa/org-contrib eaef050f28: lisp/ox-bibtex.el (org-bibtex-goto-citation): Add missing require, Ihor Radchenko, 2024/01/30
- Re: [nongnu] elpa/org-contrib eaef050f28: lisp/ox-bibtex.el (org-bibtex-goto-citation): Add missing require, Stefan Monnier, 2024/01/30
- Re: [nongnu] elpa/org-contrib eaef050f28: lisp/ox-bibtex.el (org-bibtex-goto-citation): Add missing require, Ihor Radchenko, 2024/01/30
- Re: [nongnu] elpa/org-contrib eaef050f28: lisp/ox-bibtex.el (org-bibtex-goto-citation): Add missing require, Stefan Monnier, 2024/01/30
- Re: [nongnu] elpa/org-contrib eaef050f28: lisp/ox-bibtex.el (org-bibtex-goto-citation): Add missing require, Emanuel Berg, 2024/01/31