unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Nicolas Graves via Guix-patches via <guix-patches@gnu.org>
To: 73253@debbugs.gnu.org
Cc: ngraves@ngraves.fr
Subject: [bug#73253] [PATCH] .dir-locals.el: Add tempel snippets.
Date: Sat, 14 Sep 2024 16:47:16 +0200	[thread overview]
Message-ID: <20240914144723.15156-1-ngraves@ngraves.fr> (raw)

Change-Id: Ic16f571f26fffee12e478e00c54be55e6eb90831
---
 .dir-locals.el                                    | 15 +++++++++++++++
 .../tempel/{scheme-mode => scheme-mode.eld}       |  2 --
 etc/snippets/tempel/{text-mode => text-mode.eld}  |  2 --
 3 files changed, 15 insertions(+), 4 deletions(-)
 rename etc/snippets/tempel/{scheme-mode => scheme-mode.eld} (98%)
 rename etc/snippets/tempel/{text-mode => text-mode.eld} (99%)

diff --git a/.dir-locals.el b/.dir-locals.el
index d0c25b867b..201ebd4198 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -19,6 +19,21 @@
                          (locate-dominating-file default-directory
                                                  ".dir-locals.el")))
 
+     ;; TempEl
+     (eval . (with-eval-after-load
+                 'tempel
+               (if (stringp tempel-path)
+                   (setq tempel-path (list tempel-path)))
+               (let ((guix-tempel-snippets
+                      (concat
+                       (expand-file-name
+                        "etc/snippets/tempel"
+                        (locate-dominating-file default-directory
+                                                ".dir-locals.el"))
+                       "/*.eld")))
+                 (unless (member guix-tempel-snippets tempel-path)
+                   (add-to-list 'tempel-path guix-tempel-snippets)))))
+
      ;; YASnippet
      (eval . (with-eval-after-load
                  'yasnippet
diff --git a/etc/snippets/tempel/scheme-mode b/etc/snippets/tempel/scheme-mode.eld
similarity index 98%
rename from etc/snippets/tempel/scheme-mode
rename to etc/snippets/tempel/scheme-mode.eld
index 249f4ce8e3..21a5dd6dee 100644
--- a/etc/snippets/tempel/scheme-mode
+++ b/etc/snippets/tempel/scheme-mode.eld
@@ -1,5 +1,3 @@
--*- mode: lisp-data -*-
-
 scheme-mode
 
 (package...
diff --git a/etc/snippets/tempel/text-mode b/etc/snippets/tempel/text-mode.eld
similarity index 99%
rename from etc/snippets/tempel/text-mode
rename to etc/snippets/tempel/text-mode.eld
index c635b7ee6f..397221b846 100644
--- a/etc/snippets/tempel/text-mode
+++ b/etc/snippets/tempel/text-mode.eld
@@ -1,5 +1,3 @@
--*- mode: lisp-data -*-
-
 text-mode :when (bound-and-true-p git-commit-mode)
 
 (add\ "gnu: Add "
-- 
2.46.0





             reply	other threads:[~2024-09-14 14:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-14 14:47 Nicolas Graves via Guix-patches via [this message]
2024-09-21 16:09 ` bug#73253: [PATCH] .dir-locals.el: Add tempel snippets jgart via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240914144723.15156-1-ngraves@ngraves.fr \
    --to=guix-patches@gnu.org \
    --cc=73253@debbugs.gnu.org \
    --cc=ngraves@ngraves.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).