aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXinglu Chen <public@yoctocell.xyz>2021-04-03 14:29:36 +0200
committerXinglu Chen <public@yoctocell.xyz>2021-04-03 14:29:36 +0200
commit19e857181bef33e000289504c09c9993731d79d9 (patch)
treee679b685016e812b30e2dd079e15c5f03a5ffdfa
parent0cdc87288c529a36111ee5b559bc9b959eba1c14 (diff)
git-email: Use alists in 'git-email--extract-headers'.
* git-email.el (git-email--extract-headers): Return an association list. (git-email--compose-email): Adapt to alists.
-rw-r--r--git-email.el10
1 files changed, 5 insertions, 5 deletions
diff --git a/git-email.el b/git-email.el
index 3db1ca3..20b9400 100644
--- a/git-email.el
+++ b/git-email.el
@@ -244,7 +244,7 @@ If the header is not found, return an empty string."
(with-temp-buffer
(insert-file-contents patch-file)
(mapcar (lambda (header)
- `(,header ,(git-email--extract-header header)))
+ `(,header . ,(git-email--extract-header header)))
git-email-headers)))
(defun git-email--extract-diff (patch-file)
@@ -313,10 +313,10 @@ them into the message buffer."
sendemail-to))
(diff (git-email--extract-diff patch-file)))
(funcall git-email-compose-email-function to
- ;; Remove 'subject' header, otherwise two subject headers will be
- ;; inserted.
- (cadr (assoc 'subject used-headers))
- (seq-filter #'git-email--remove-subject used-headers))
+ ;; Remove 'subject' header, otherwise two subject headers will be
+ ;; inserted.
+ (cdr (assoc 'subject used-headers))
+ (seq-filter #'git-email--remove-subject used-headers))
;; Insert diff at the beginning of the body
(goto-char (point-min))
(let ((body (or (re-search-forward