[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 1/3] ox-texinfo: Add function for use by kbd macro
From: |
Nicolas Goaziou |
Subject: |
Re: [PATCH v3 1/3] ox-texinfo: Add function for use by kbd macro |
Date: |
Sat, 22 Jan 2022 16:19:54 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Hello,
Jonas Bernoulli <jonas@bernoul.li> writes:
> * doc/doc-setup.org: Use org-texinfo-kbd-macro for kbd macro.
> * doc/org-manual.org: Add new node "Key bindings in Texinfo export".
> * lisp/ox-texinfo.el (org-texinfo-kbd-macro): New function.
Thank you. Some comments follow.
> +(defun org-texinfo-kbd-macro (key &optional noquote)
> + "Quote KEY using @kbd{...} and if necessary $key{...}.
Typo: $key -> @key
> +This is intended to be used as an Org macro like so:
> +
> + #+macro: kbd (eval (org-texinfo-kbd-macro $1))
> + Type {{{kbd(C-c SPC)}}}.
> +
> +Also see info node `(org)Key bindings in Texinfo export'.
> +
> +If optional NOQOUTE is non-nil, then do not add the quoting
> +that is necessary when using this in an Org macro."
> + (format (if noquote "@kbd{%s}" "@@texinfo:@kbd{@@%s@@texinfo:}@@")
> + (let ((case-fold-search nil))
> + (replace-regexp-in-string
> + org-texinfo--quoted-keys-regexp
AFAICT the variable is not defined in the patch.
Otherwise, LGTM.
Regards,
--
Nicolas Goaziou