From 19e857181bef33e000289504c09c9993731d79d9 Mon Sep 17 00:00:00 2001 From: Xinglu Chen Date: Sat, 3 Apr 2021 14:29:36 +0200 Subject: 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. --- git-email.el | 10 +++++----- 1 file 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 -- cgit v1.2.3