[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/setup 0e4995f 15/19: Use fenced code block for example
From: |
Stefan Monnier |
Subject: |
[elpa] externals/setup 0e4995f 15/19: Use fenced code block for example |
Date: |
Mon, 15 Mar 2021 17:26:28 -0400 (EDT) |
branch: externals/setup
commit 0e4995f338efd437abaae157dbf5013eebd56032
Author: Philip K <philipk@posteo.net>
Commit: Philip K <philipk@posteo.net>
Use fenced code block for example
---
README.md | 74 +++++++++++++++++++++++++++++++++------------------------------
1 file changed, 39 insertions(+), 35 deletions(-)
diff --git a/README.md b/README.md
index 22d609f..e3e464a 100644
--- a/README.md
+++ b/README.md
@@ -4,48 +4,52 @@
The `setup' macro simplifies repetitive configuration patterns. For
example, these macros:
- (setup shell
- (let ((key "C-c s"))
- (:global (key shell))
- (:bind (key bury-buffer))))
+~~~elisp
+(setup shell
+ (let ((key "C-c s"))
+ (:global (key shell))
+ (:bind (key bury-buffer))))
- (setup (:package paredit)
- (:hide-mode)
- (:hook-into scheme-mode lisp-mode))
+(setup (:package paredit)
+ (:hide-mode)
+ (:hook-into scheme-mode lisp-mode))
- (setup (:package yasnippet)
- (:with-mode yas-minor-mode
- (:rebind "<backtab>" yas-expand)
- (:option yas-prompt-functions '(yas-completing-prompt)
- yas-wrap-around-region t)
- (:hook-into prog-mode)))
+(setup (:package yasnippet)
+ (:with-mode yas-minor-mode
+ (:rebind "<backtab>" yas-expand)
+ (:option yas-prompt-functions '(yas-completing-prompt)
+ yas-wrap-around-region t)
+ (:hook-into prog-mode)))
+~~~
will be replaced with the functional equivalent of
- (global-set-key (kbd "C-c s") #'shell)
- (with-eval-after-load 'shell
- (define-key shell-mode-map (kbd "C-c s") #'bury-buffer))
-
-
- (unless (package-install-p 'paredit)
- (package-install 'paredit))
- (delq (assq 'paredit-mode minor-mode-alist)
- minor-mode-alist)
- (add-hook 'scheme-mode-hook #'paredit-mode)
- (add-hook 'lisp-mode-hook #'paredit-mode)
-
-
- (unless (package-install-p 'yasnippet)
- (package-install 'yasnippet))
- (with-eval-after-load 'yasnippet
- (dolist (key (where-is-internal 'yas-expand yas-minor-mode-map))
- (define-key yas-minor-mode-map key nil))
- (define-key yas-minor-mode-map "<backtab>" #'yas-expand)
- (customize-set-variable 'yas-prompt-functions '(yas-completing-prompt))
- (customize-set-variable 'yas-wrap-around-region t))
- (add-hook 'prog-mode-hook #'yas-minor-mode)
+~~~elisp
+(global-set-key (kbd "C-c s") #'shell)
+(with-eval-after-load 'shell
+ (define-key shell-mode-map (kbd "C-c s") #'bury-buffer))
+
+
+(unless (package-install-p 'paredit)
+ (package-install 'paredit))
+(delq (assq 'paredit-mode minor-mode-alist)
+ minor-mode-alist)
+(add-hook 'scheme-mode-hook #'paredit-mode)
+(add-hook 'lisp-mode-hook #'paredit-mode)
+
+
+(unless (package-install-p 'yasnippet)
+ (package-install 'yasnippet))
+(with-eval-after-load 'yasnippet
+ (dolist (key (where-is-internal 'yas-expand yas-minor-mode-map))
+ (define-key yas-minor-mode-map key nil))
+ (define-key yas-minor-mode-map "<backtab>" #'yas-expand)
+ (customize-set-variable 'yas-prompt-functions '(yas-completing-prompt))
+ (customize-set-variable 'yas-wrap-around-region t))
+(add-hook 'prog-mode-hook #'yas-minor-mode)
+~~~
Additional "keywords" can be defined using `setup-define`. All known
keywords are documented in the docstring for `setup`.
- [elpa] externals/setup updated (6d84649 -> 39accbf), Stefan Monnier, 2021/03/15
- [elpa] externals/setup aa9bad8 05/19: Drop unused setup-indent property, Stefan Monnier, 2021/03/15
- [elpa] externals/setup 44d2cfd 09/19: Ignore package.el files, Stefan Monnier, 2021/03/15
- [elpa] externals/setup d2e31e7 01/19: Replaced CC0 LICENSE with GPL, Stefan Monnier, 2021/03/15
- [elpa] externals/setup bb11fa8 06/19: Avoid reconstructing entire edebug specification, Stefan Monnier, 2021/03/15
- [elpa] externals/setup 0e4995f 15/19: Use fenced code block for example,
Stefan Monnier <=
- [elpa] externals/setup 7fddc97 17/19: Explain usage of keywords for local macros, Stefan Monnier, 2021/03/15
- [elpa] externals/setup 8ca0d20 18/19: Bump version to 0.1.1, Stefan Monnier, 2021/03/15
- [elpa] externals/setup c9bc47a 16/19: Simplify edebug specification generation, Stefan Monnier, 2021/03/15
- [elpa] externals/setup 39accbf 19/19: Mention GitHub mirror, Stefan Monnier, 2021/03/15
- [elpa] externals/setup 578f7bb 04/19: Update setup-define docstring, Stefan Monnier, 2021/03/15
- [elpa] externals/setup 894819d 10/19: Drop "none" as argument for :debug, Stefan Monnier, 2021/03/15
- [elpa] externals/setup d9a5850 02/19: Manually specify macro arity via :repeatable, Stefan Monnier, 2021/03/15
- [elpa] externals/setup 1bfca33 03/19: Avoid manual signature specification via help-function-arglist, Stefan Monnier, 2021/03/15
- [elpa] externals/setup fc958ad 08/19: Rename :needs argument to executable, Stefan Monnier, 2021/03/15
- [elpa] externals/setup 295e173 12/19: Update README, Stefan Monnier, 2021/03/15