Skip to content

Commit

Permalink
[emacs-lisp] Add elisp-demos package integration (#16402)
Browse files Browse the repository at this point in the history
* [emacs-lisp] Add `elisp-demos` package integration.

* [emacs-lisp] Move `advice-add` into `:init` block. Add `:commands` block.
  • Loading branch information
pataquets authored May 17, 2024
1 parent ffebed0 commit 287acfa
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.develop
Original file line number Diff line number Diff line change
Expand Up @@ -2073,6 +2073,7 @@ Other:
- ~SPC m r d d~ for =emr-delete-unused-definition=
- ~SPC m e w~ for =emr-eval-and-replace=
- Added =elisp-def= integration (thanks to Thanh Vuong)
- Added =elisp-demos= integration (thanks to Alfonso Montero)
**** Emoji
- Added support for Emoji fonts on macOS and Linux (thanks to CodeFalling)
- Setup =emojify= cache directory (thanks to Boris Buliga)
Expand Down
1 change: 1 addition & 0 deletions layers/+lang/emacs-lisp/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ always be in your dotfile, it is not recommended to uninstall it.
- Nameless package prefix with optional [[https://github.com/Malabarba/Nameless][nameless]]
- Structurally safe editing using optional [[https://github.com/luxbock/evil-cleverparens][evil-cleverparens]]
- Visual feedback when evaluation using [[https://github.com/hchbaw/eval-sexp-fu.el][eval-sexp-fu]]
- Provide Emacs Lisp API usage examples using [[https://github.com/xuchunyang/elisp-demos][elisp-demos]]

* Install
To use this configuration layer, add it to your =~/.spacemacs=. You will need to
Expand Down
11 changes: 11 additions & 0 deletions layers/+lang/emacs-lisp/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
(edebug :location built-in)
eldoc
elisp-def
elisp-demos
elisp-slime-nav
(emacs-lisp :location built-in)
evil
Expand Down Expand Up @@ -160,6 +161,16 @@
(use-package elisp-def
:defer t))

(defun emacs-lisp/init-elisp-demos ()
(use-package elisp-demos
:defer t
:init
(advice-add 'describe-function-1
:after #'elisp-demos-advice-describe-function-1)
(advice-add 'helpful-update
:after #'elisp-demos-advice-helpful-update)
:commands (elisp-demos-add-demo elisp-demos-find-demo)))

(defun emacs-lisp/init-elisp-slime-nav ()
;; Elisp go-to-definition with M-. and back again with M-,
(use-package elisp-slime-nav
Expand Down

0 comments on commit 287acfa

Please sign in to comment.