Function: org-texinfo-kbd-macro
org-texinfo-kbd-macro is a byte-compiled function defined in
ox-texinfo.el.gz.
Signature
(org-texinfo-kbd-macro KEY &optional NOQUOTE)
Documentation
Quote KEY using @kbd{...} and if necessary @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.
Source Code
;; Defined in /usr/src/emacs/lisp/org/ox-texinfo.el.gz
;;; Public Functions
(defun org-texinfo-kbd-macro (key &optional noquote)
"Quote KEY using @kbd{...} and if necessary @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
(if noquote "@key{\\&}" "@@texinfo:@key{@@\\&@@texinfo:}@@")
key t))))