From b32fc55cd4d3e071b21ce88d23e139fb720ed13f Mon Sep 17 00:00:00 2001 From: yoctocell Date: Fri, 8 Jan 2021 17:02:17 +0100 Subject: Reformat buffer Keep line width under 80. * git-email.el (git-email--fontify-using-faces): (git-email--compose-email): (git-email-format-patch): --- git-email.el | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'git-email.el') diff --git a/git-email.el b/git-email.el index 282c1cc..470de40 100644 --- a/git-email.el +++ b/git-email.el @@ -236,7 +236,8 @@ If the header is not found, return an empty string." (defun git-email--fontify-using-faces (text) (let ((pos 0)) (while (setq next (next-single-property-change pos 'face text)) - (put-text-property pos next 'font-lock-face (get-text-property pos 'face text) text) + (put-text-property pos next 'font-lock-face + (get-text-property pos 'face text) text) (setq pos next)) (add-text-properties 0 (length text) '(fontified t) text) text)) @@ -269,11 +270,14 @@ them into the message buffer." (cadr (assoc 'subject used-headers)) (seq-filter 'git-email--remove-subject used-headers)) ;; Insert diff at the beginning of the body - (let ((body (or (re-search-forward "<#part \\(encrypt\\|sign\\)=.*mime>" nil t) + (let ((body (or (re-search-forward + "<#part \\(encrypt\\|sign\\)=.*mime>" + nil t) (re-search-forward "--text follows this line--" nil t)))) (goto-char (+ body 1)) (save-excursion - (insert (git-email--fontify-using-faces (git-email--fontify-diff diff))))) + (insert (git-email--fontify-using-faces + (git-email--fontify-diff diff))))) ;; Jump to subject if it is a cover letter (when (re-search-backward "\\*\\*\\* SUBJECT HERE \\*\\*\\*" nil t) (kill-line)))) @@ -327,9 +331,11 @@ arguments in `git-email-format-patch-default-args' will be used." git-email-format-patch-default-args)) ;; List of patches generated, the last element is an empty string ;; so remove it. Reverse the list so we edit the cover letter first. - (files (nreverse (butlast (split-string (shell-command-to-string - (concat "git format-patch " args " " rev)) - "\n"))))) + (files (nreverse (butlast + (split-string + (shell-command-to-string + (concat "git format-patch " args " " rev)) + "\n"))))) (dolist (file files) (run-hooks 'git-email-pre-compose-email-hook) (git-email--compose-email file) -- cgit v1.2.3