diff --git a/ha-config.org b/ha-config.org index 1c50fd1..3a66ca1 100644 --- a/ha-config.org +++ b/ha-config.org @@ -1062,11 +1062,6 @@ Unfilling a paragraph joins all the lines in a paragraph into a single line. Tak (fill-paragraph nil))) #+end_src *** Help Operations -Let’s take advantage of [[https://github.com/Wilfred/helpful][helpful]] package for getting more information into the =describe-function= call. -#+begin_src emacs-lisp - (use-package helpful) -#+end_src - While the ~C-h~ is easy enough, I am now in the habit of typing ~SPC h~ instead. Since I tweaked the help menu, I craft my own menu: #+begin_src emacs-lisp diff --git a/ha-programming-elisp.org b/ha-programming-elisp.org index a9f3743..af647b6 100644 --- a/ha-programming-elisp.org +++ b/ha-programming-elisp.org @@ -55,6 +55,22 @@ Show code examples with the [[https://github.com/xuchunyang/elisp-demos][elisp-d :config (advice-add 'describe-function-1 :after #'elisp-demos-advice-describe-function-1)) #+end_src +** Better Function Help +Let’s take advantage of [[https://github.com/Wilfred/helpful][helpful]] package for getting more information into the =describe-function= call. +#+begin_src emacs-lisp + (use-package helpful) +#+end_src +And we should extend it with the [[https://github.com/xuchunyang/elisp-demos][elisp-demos]] project: +#+begin_src emacs-lisp + (use-package elisp-demos + :after helpful + :config + (ha-elisp-leader + "h a" '("add helpful demo" . elisp-demos-add-demo)) + + (advice-add 'helpful-update :after #'elisp-demos-advice-helpful-update)) +#+end_src +Find a function without a good demonstration? Call =elisp-demos-add-demo=. * Navigation and Editing ** Goto Definitions Wilfred’s [[https://github.com/Wilfred/elisp-def][elisp-def]] project does a better job at jumping to the definition of a symbol at the point, so: