Add by-backend stuff to the init short documentation group

This commit is contained in:
Gerard Vermeulen 2022-04-18 10:39:08 +02:00
parent d27c3613cd
commit 561ae31d39

View File

@ -590,25 +590,18 @@ defined in this Org file.
;; Ensure defining the functions before documenting them.
(define-short-documentation-group init
"Face"
(invert-default-face
:no-manual t)
(set-default-face-height
:no-manual t)
(invert-default-face :no-manual t)
(set-default-face-height :no-manual t)
"Org"
(org-babel-execute:latex-extra-header
:no-manual t)
(org-babel-execute:latex-header
:no-manual t)
(org-electric-dollar
:no-manual t)
(org-eval-emacs-lisp-setup-blocks
:no-manual t)
(org-eval-python-setup-blocks
:no-manual t)
(org-eval-infixed-blocks
:no-manual t)
(org-syntax-convert-keyword-case-to-lower
:no-manual t))))
(by-backend :no-manual t)
(by-backend-kbd-org-macro :no-manual t)
(org-babel-execute:latex-extra-header :no-manual t)
(org-babel-execute:latex-header :no-manual t)
(org-electric-dollar :no-manual t)
(org-eval-emacs-lisp-setup-blocks :no-manual t)
(org-eval-python-setup-blocks :no-manual t)
(org-eval-infixed-blocks :no-manual t)
(org-syntax-convert-keyword-case-to-lower :no-manual t))))
#+end_src
** [[info:info#Top][Info (info)]]
@ -2045,17 +2038,21 @@ Listing [[lst:by-backend-kbd-org-macro]] defines the tools for the definition of
[[https://orgmode.org/][Org mode]] =kbd= macro on the fifth line of listing
[[lst:source-file-export-keyword-settings]].
#+attr_latex: :options breaklines
#+caption[Define the tools of the =Org-mode= =kbd= macro]:
#+caption: Define the tools for the =Org-mode= =kbd= macro.
#+name: lst:by-backend-kbd-org-macro
#+begin_src emacs-lisp
(with-eval-after-load 'ox
(with-eval-after-load 'emacs
(autoload 'htmlize-protect-string "htmlize" nil t)
;; https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-LaTeX.html#orge5c50fd
(defmacro by-backend (&rest body)
`(cl-case org-export-current-backend ,@body))
"Help for org-export backend dependent execution."
`(cl-case ',(bound-and-true-p org-export-current-backend) ,@body))
(defun by-backend-kbd-org-macro (keys)
"Help for an org-export backend dependent \"#+macro: kbd\"."
(by-backend
(html (format "@@html:<kbd>%s</kbd>@@" (htmlize-protect-string keys)))
(latex (format "@@latex:\\colorbox{PowderBlue}{\\texttt{%s}}@@" keys)))))