Add elisp-demos back into system

This commit is contained in:
Howard Abrams 2023-03-20 11:11:58 -07:00
parent ce756d681c
commit 4be00bd345
2 changed files with 16 additions and 5 deletions

View file

@ -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
Lets 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

View file

@ -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
Lets 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
Wilfreds [[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: