mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
etc: Add tempel snippet move.
* etc/snippets/tempel/text-mode (move\): New entry. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
1033645e9d
commit
b6274a20e8
1 changed files with 17 additions and 0 deletions
|
@ -99,3 +99,20 @@ text-mode :when (and (fboundp 'git-commit-mode) (git-commit-mode))
|
|||
": 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.")
|
||||
|
|
Loading…
Reference in a new issue