diff --git a/README.org b/README.org index 1d5407e..cce0bb3 100644 --- a/README.org +++ b/README.org @@ -1005,9 +1005,19 @@ output to =stdout=. :CUSTOM_ID: sec:help :END: -Table [[tab:help-key-bindings]] lists a number of key bindings to start playing with -the help facilities of Emacs. Try {{{kbd(C-h o)}}} instead of {{{kbd(C-h f)}}} -or {{{kbd(C-h v)}}}. +Listing [[lst:setup-help]] enriches the help buffer. Table [[tab:help-key-bindings]] +lists a number of key bindings to start playing with the help facilities of +Emacs. Try {{{kbd(C-h o)}}} instead of {{{kbd(C-h f)}}} or {{{kbd(C-h v)}}}. + +#+caption[Setup =help=]: +#+caption: Setup =help=. +#+name: lst:setup-help +#+begin_src emacs-lisp -n :results silent +(with-eval-after-load 'help-fns + (add-hook 'help-fns-describe-function-functions + #'shortdoc-help-fns-examples-function) + (setopt help-enable-symbol-autoload t)) +#+end_src #+attr_latex: :booktabs yes :float table #+caption[Help key bindings]: @@ -1024,18 +1034,6 @@ or {{{kbd(C-h v)}}}. | info | help-map | {{{kbd(C-h i)}}} | |------------------------------+----------+------------------| -#+begin_src emacs-lisp -n :exports none :results silent :tangle no -(defun org-key-binding-macro (cmd) - (let* ((sym (intern-soft cmd)) - (keys (and (commandp sym) (where-is-internal sym nil 'first-only))) - (prefix (seq-take keys (1- (length keys)))) - (keymap (key-binding prefix 'accept-default))) - (format "%s %s %s {{{kbd(%s)}}}" - cmd keymap (help--binding-locus keys nil) (key-description keys)))) - -(org-key-binding-macro 'consult-buffer) -#+end_src - ** [[info:emacs#Name Help][Shortdoc-display-group (info)]] :PROPERTIES: :CUSTOM_ID: sec:shortdoc-display-group