aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXinglu Chen <public@yoctocell.xyz>2021-06-21 14:56:36 +0200
committerXinglu Chen <public@yoctocell.xyz>2021-06-21 14:56:36 +0200
commite6a8567b4354aa585540cf8577b68d081cd52b16 (patch)
tree9771b4f2f4bef1582517a5b8d864399f7f2ddae3
parentb003fa1ed30d2a98c9f1a51be6da8fbc75243c1c (diff)
git-email: Divide file into pages.
* git-email.el: Add page separators. Signed-off-by: Xinglu Chen <public@yoctocell.xyz>
-rw-r--r--git-email.el15
1 files changed, 11 insertions, 4 deletions
diff --git a/git-email.el b/git-email.el
index 485d433..487429a 100644
--- a/git-email.el
+++ b/git-email.el
@@ -40,7 +40,9 @@
(require 'message)
(require 'cl-lib)
+
;;;; Customization options
+
(defgroup git-email nil
"Work with git and email."
:group 'convenience)
@@ -156,7 +158,7 @@ If none of the functions return non-nil value,
:package-version '(git-email . "0.2.0"))
-;;;; Remove Compiler warnings
+;; Remove Compiler warnings
(declare-function dired-get-filename "dired.el")
(declare-function dired-map-over-marks "dired.el")
(declare-function ibuffer-get-marked-buffers "ibuffer.el")
@@ -164,8 +166,9 @@ If none of the functions return non-nil value,
(declare-function vc-dir-current-file "vc-dir.el")
(declare-function log-view-current-entry "log-view.el")
-
+
;;;; Get files to send
+
(defun git-email--check-file (file)
"Check if FILE is a patch."
(if (and (file-readable-p file)
@@ -228,8 +231,9 @@ Falls back to `default-directory'."
default-directory)))
dir))
-
+
;;;; Get contents from patch
+
(defun git-email--extract-header (header)
"Extract HEADER from the current buffer."
(goto-char (point-min))
@@ -363,8 +367,9 @@ them into the message buffer."
(re-search-backward "\\*\\*\\* SUBJECT HERE \\*\\*\\*" nil t))
(kill-line))))
-
+
;;;; Format patches
+
(defun git-email--minibuffer-get-revision ()
"Let the user choose a git revision from the minibuffer."
(interactive)
@@ -437,7 +442,9 @@ default behavior is to delete them after sending the message."
(mapc #'delete-file files))))
+
;;;; Operate on emails
+
(defun git-email-message-buffer-greaterp (old new)
"Compare the number in the buffer name of OLD with NEW"
(cl-flet ((regexp (name)