diff mbox series

[bug#73535] doc: Update snippets documentation.

Message ID 20240928212853.29502-1-ngraves@ngraves.fr
State New
Headers show
Series [bug#73535] doc: Update snippets documentation. | expand

Commit Message

Nicolas Graves Sept. 28, 2024, 9:28 p.m. UTC
* doc/contributing.texi: Both tempel and yasnippets have been
integrated to .dir-locals.el, this source snippet is not necessary
anymore.
---
 doc/contributing.texi | 23 ++++++-----------------
 1 file changed, 6 insertions(+), 17 deletions(-)
diff mbox series

Patch

diff --git a/doc/contributing.texi b/doc/contributing.texi
index 1b9a3b7beb..bfcbac1fca 100644
--- a/doc/contributing.texi
+++ b/doc/contributing.texi
@@ -552,26 +552,15 @@  s-expression, etc.
 @cindex reducing boilerplate
 We also provide templates for common git commit messages and package
 definitions in the @file{etc/snippets} directory.  These templates can
-be used to expand short trigger strings to interactive text snippets. If
-you use @url{https://joaotavora.github.io/yasnippet/, YASnippet}, you
-may want to add the @file{etc/snippets/yas} snippets directory to the
+be used to expand short trigger strings to interactive text snippets.
+They are used automatically if @file{.dir-locals.el} is allowed to
+execute. Otherwise, if you use
+@url{https://joaotavora.github.io/yasnippet/, YASnippet}, you may want
+to add the @file{etc/snippets/yas} snippets directory to the
 @var{yas-snippet-dirs} variable.  If you use
 @url{https://github.com/minad/tempel/, Tempel}, you may want to add the
 @file{etc/snippets/tempel/*} path to the @var{tempel-path} variable in
-Emacs.
-
-@lisp
-;; @r{Assuming the Guix checkout is in ~/src/guix.}
-;; @r{Yasnippet configuration}
-(with-eval-after-load 'yasnippet
-  (add-to-list 'yas-snippet-dirs "~/src/guix/etc/snippets/yas"))
-;; @r{Tempel configuration}
-(with-eval-after-load 'tempel
-   ;; Ensure tempel-path is a list -- it may also be a string.
-   (unless (listp 'tempel-path)
-     (setq tempel-path (list tempel-path)))
-   (add-to-list 'tempel-path "~/src/guix/etc/snippets/tempel/*"))
-@end lisp
+Emacs. See @file{.dir-locals.el} in Guix checkout for more details.
 
 The commit message snippets depend on @url{https://magit.vc/, Magit} to
 display staged files.  When editing a commit message type @code{add}