summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorLiliana Marie Prikler <liliana.prikler@gmail.com>2022-10-06 19:04:23 +0200
committerLiliana Marie Prikler <liliana.prikler@gmail.com>2022-10-06 21:16:46 +0200
commitda281417cc381374345dd404b2f10b4cb07a87d2 (patch)
treec5de4ec623882cbc3f0af16a025e43399004e9d6 /etc
parent980c34853e1020018df3a0c04753ea46d880e9a7 (diff)
downloadguix-patches-da281417cc381374345dd404b2f10b4cb07a87d2.tar
guix-patches-da281417cc381374345dd404b2f10b4cb07a87d2.tar.gz
snippets: tempel: Reformat.
This makes it so that ‘indent-region’ and ‘delete-trailing-whitespace’ do not change the file. * etc/snippets/tempel/text-mode: Reformat.
Diffstat (limited to 'etc')
-rw-r--r--etc/snippets/tempel/text-mode231
1 files changed, 123 insertions, 108 deletions
diff --git a/etc/snippets/tempel/text-mode b/etc/snippets/tempel/text-mode
index d6a1d8df45..da72b29d3c 100644
--- a/etc/snippets/tempel/text-mode
+++ b/etc/snippets/tempel/text-mode
@@ -2,117 +2,132 @@
text-mode :when (and (fboundp 'git-commit-mode) (git-commit-mode))
-(add\
- "gnu: Add "
- (p
- (with-temp-buffer
- (magit-git-wash #'magit-diff-wash-diffs
- "diff" "--staged")
- (goto-char (point-min))
- (when (re-search-forward "\\+(define-public \\(\\S-+\\)" nil 'noerror)
- (match-string-no-properties 1)))
- var ) "." n n
- "* " (car (magit-staged-files)) " (" (s var ) "): New variable.")
+(add\ "gnu: Add "
+ (p (with-temp-buffer
+ (magit-git-wash #'magit-diff-wash-diffs
+ "diff" "--staged")
+ (goto-char (point-min))
+ (when (re-search-forward "\\+(define-public \\(\\S-+\\)"
+ nil 'noerror)
+ (match-string-no-properties 1)))
+ var)
+ "." n n
+ "* " (car (magit-staged-files)) " (" (s var ) "): New variable.")
-(remove\
- "gnu: Remove "
- (p (with-temp-buffer
- (magit-git-wash #'magit-diff-wash-diffs
- "diff" "--staged")
- (goto-char (point-min))
- (when (re-search-forward "\\-(define-public \\(\\S-+\\)" nil 'noerror)
- (match-string-no-properties 1)))
- var) "." n n
- "* " (car (magit-staged-files)) " (" (s var) "): Delete variable.")
+(remove\ "gnu: Remove "
+ (p (with-temp-buffer
+ (magit-git-wash #'magit-diff-wash-diffs
+ "diff" "--staged")
+ (goto-char (point-min))
+ (when (re-search-forward "\\-(define-public \\(\\S-+\\)"
+ nil 'noerror)
+ (match-string-no-properties 1)))
+ var)
+ "." n n
+ "* " (car (magit-staged-files)) " (" (s var) "): Delete variable.")
-(rename\
- "gnu: "
- (p (with-temp-buffer
- (magit-git-wash #'magit-diff-wash-diffs
- "diff" "--staged")
- (beginning-of-buffer)
- (when (search-forward "-(define-public " nil 'noerror)
- (thing-at-point 'sexp 'no-properties)))
- prev-var)
- ": Rename package to "
- (p (with-temp-buffer
- (magit-git-wash #'magit-diff-wash-diffs
- "diff" "--staged")
- (beginning-of-buffer)
- (when (search-forward "+(define-public " nil 'noerror)
- (thing-at-point 'sexp 'no-properties)))
- new-var) "." n n
- "* " (car (magit-staged-files)) " (" (s prev-var) "): Define in terms of" n
- "'deprecated-package'." n
- "(" (s new-var) "): New variable, formerly known as \"" (s prev-var) "\".")
+(rename\ "gnu: "
+ (p (with-temp-buffer
+ (magit-git-wash #'magit-diff-wash-diffs
+ "diff" "--staged")
+ (beginning-of-buffer)
+ (when (search-forward "-(define-public " nil 'noerror)
+ (thing-at-point 'sexp 'no-properties)))
+ prev-var)
+ ": Rename package to "
+ (p (with-temp-buffer
+ (magit-git-wash #'magit-diff-wash-diffs
+ "diff" "--staged")
+ (beginning-of-buffer)
+ (when (search-forward "+(define-public " nil 'noerror)
+ (thing-at-point 'sexp 'no-properties)))
+ new-var)
+ "." n n
+ "* " (car (magit-staged-files)) " (" (s prev-var) "): "
+ "Define in terms of" n
+ "'deprecated-package'." n
+ "(" (s new-var) "): New variable, formerly known as \""
+ (s prev-var) "\".")
-(update\
- "gnu: "
- (p (with-temp-buffer
- (magit-git-wash #'magit-diff-wash-diffs
- "diff" "--staged")
- (goto-char (point-min))
- (when (re-search-forward "^[ ]*(define-public \\(\\S-+\\)" nil 'noerror)
- (match-string-no-properties 1)))
- var)
- ": Update to "
- (p (with-temp-buffer
- (magit-git-wash #'magit-diff-wash-diffs
- "diff" "--staged")
- (goto-char (point-min))
- (search-forward "name" nil 'noerror)
- (search-forward "+" nil 'noerror) ; first change
- (when (and (search-forward "version " nil 'noerror)
- (looking-at-p "\""))
- (let ((end (save-excursion (search-forward "\")" nil 'noerror))))
- (when end
- (forward-char)
- (buffer-substring-no-properties (point) (- end 2))))))
- version) "." n n
- "* " (car (magit-staged-files)) " (" (s var) "): Update to " (s version) "."
- n (mapconcat (lambda (file) (concat "* " file)) (cdr (magit-staged-files)) "\n"))
+(update\ "gnu: "
+ (p (with-temp-buffer
+ (magit-git-wash #'magit-diff-wash-diffs
+ "diff" "--staged")
+ (goto-char (point-min))
+ (when (re-search-forward "^[ ]*(define-public \\(\\S-+\\)"
+ nil 'noerror)
+ (match-string-no-properties 1)))
+ var)
+ ": Update to "
+ (p (with-temp-buffer
+ (magit-git-wash #'magit-diff-wash-diffs
+ "diff" "--staged")
+ (goto-char (point-min))
+ (search-forward "name" nil 'noerror)
+ (search-forward "+" nil 'noerror) ; first change
+ (when (and (search-forward "version " nil 'noerror)
+ (looking-at-p "\""))
+ (let ((end (save-excursion (search-forward "\")"
+ nil 'noerror))))
+ (when end
+ (forward-char)
+ (buffer-substring-no-properties (point) (- end 2))))))
+ version)
+ "." n n
+ "* " (car (magit-staged-files)) " (" (s var) "): "
+ "Update to " (s version) "." n
+ (mapconcat (lambda (file) (concat "* " file))
+ (cdr (magit-staged-files))
+ "\n"))
-(addcl\
- "gnu: Add cl-"
- (p (replace-regexp-in-string
- "^cl-" "" (with-temp-buffer
- (magit-git-wash #'magit-diff-wash-diffs
- "diff" "--staged")
- (beginning-of-buffer)
- (when (search-forward "+(define-public " nil 'noerror)
- (replace-regexp-in-string
- "^sbcl-" ""
- (thing-at-point 'sexp 'no-properties)))))
- var) "." n n
- "* " (car (magit-staged-files))
- " (cl-" (s var) ", ecl-" (s var) ", sbcl-" (s var) "): New variables.")
+(addcl\ "gnu: Add cl-"
+ (p (replace-regexp-in-string
+ "^cl-" "" (with-temp-buffer
+ (magit-git-wash #'magit-diff-wash-diffs
+ "diff" "--staged")
+ (beginning-of-buffer)
+ (when (search-forward "+(define-public " nil 'noerror)
+ (replace-regexp-in-string
+ "^sbcl-" ""
+ (thing-at-point 'sexp 'no-properties)))))
+ var)
+ "." n n
+ "* " (car (magit-staged-files))
+ " (cl-" (s var)
+ ", ecl-" (s var)
+ ", sbcl-" (s var) "): New variables.")
-(https\
- "gnu: "
- (p (with-temp-buffer
- (magit-git-wash #'magit-diff-wash-diffs
- "diff" "--staged")
- (goto-char (point-min))
- (when (re-search-forward "^[ ]*(define-public \\(\\S-+\\)" nil 'noerror)
- (match-string-no-properties 1)))
- var)
- ": Use HTTPS home page." n n
- "* " (car (magit-staged-files)) " (" (s var) ")[home-page]: Use HTTPS." n
- (mapconcat (lambda (file) (concat "* " file)) (cdr (magit-staged-files)) "\n"))
+(https\ "gnu: "
+ (p (with-temp-buffer
+ (magit-git-wash #'magit-diff-wash-diffs
+ "diff" "--staged")
+ (goto-char (point-min))
+ (when (re-search-forward "^[ ]*(define-public \\(\\S-+\\)"
+ nil 'noerror)
+ (match-string-no-properties 1)))
+ var)
+ ": Use HTTPS home page." n n
+ "* " (car (magit-staged-files)) " (" (s var) ")[home-page]: Use HTTPS."
+ n
+ (mapconcat (lambda (file) (concat "* " file))
+ (cdr (magit-staged-files))
+ "\n"))
-(move\
- "gnu: "
- (p (with-temp-buffer
- (magit-git-wash #'magit-diff-wash-diffs
- "diff" "--staged")
- (goto-char (point-min))
- (when (re-search-forward "\\-(define-public \\(\\S-+\\)" nil 'noerror)
- (match-string-no-properties 1)))
- var)
- ": Move to "
- (concat "("
- (string-replace "\.scm" ""
- (string-replace "/" " " (car (magit-staged-files))))
- ").") n
- n "* " (car (magit-staged-files)) " (" (s var) "): Move from here…"
- n "* " (cadr (magit-staged-files)) " (" (s var) "): …to here.")
+(move\ "gnu: "
+ (p (with-temp-buffer
+ (magit-git-wash #'magit-diff-wash-diffs
+ "diff" "--staged")
+ (goto-char (point-min))
+ (when (re-search-forward "\\-(define-public \\(\\S-+\\)"
+ nil 'noerror)
+ (match-string-no-properties 1)))
+ var)
+ ": Move to "
+ (concat "("
+ (string-replace "\.scm" ""
+ (string-replace "/" " "
+ (car (magit-staged-files))))
+ ").")
+ n
+ n "* " (car (magit-staged-files)) " (" (s var) "): Move from here…"
+ n "* " (cadr (magit-staged-files)) " (" (s var) "): …to here.")