From ea963c0e116629f117a3cfc71d668065900db07e Mon Sep 17 00:00:00 2001
From: Philippe Dosch <Philippe.Dosch@loria.fr>
Date: Thu, 25 Apr 2024 11:33:13 +0200
Subject: [PATCH] Add cite-mail-part function

---
 .emacs | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/.emacs b/.emacs
index da8c050..53391f3 100644
--- a/.emacs
+++ b/.emacs
@@ -1113,6 +1113,19 @@ For the middle line, remove all characters after the prefix and insert '[snip]'
       (forward-line 1))))
 (global-set-key (kbd "M-s s") 'snip-lines-mail)
 
+(defun cite-mail-part ()
+  "Prefix each line in the region with '> '."
+  (interactive)
+  (save-excursion
+    (let ((begin (region-beginning))
+          (end (region-end)))
+      (goto-char begin)
+      (while (< (point) end)
+	(beginning-of-line)
+	(insert "> ")
+	(forward-line 1)))))
+(global-set-key (kbd "M-s t") 'cite-mail-part)
+
 ;;; .emacs ends here
 (provide '.emacs)
 
-- 
GitLab