comparison lisp/mail/mailheader.el @ 66965:1bca10e9d192

* simple.el (hard-newline): New variable. * mail/sendmail.el (mail-setup, mail-send, mail-insert-from-field) (sendmail-send-it, mail-do-fcc, mail-cc, mail-bcc, mail-fcc) (mail-mail-reply-to, mail-mail-followup-to) (mail-position-on-field, mail-signature, mail-yank-original) (mail-attach-file): Use it. * mail/mailheader.el (mail-header-format) (mail-header-format-function): Likewise. * add-log.el (add-change-log-entry, change-log-merge): Likewise.
author Chong Yidong <cyd@stupidchicken.com>
date Thu, 17 Nov 2005 16:30:52 +0000
parents fafd692d1e40
children 818361523ce8
comparison
equal deleted inserted replaced
66964:99b6d306113f 66965:1bca10e9d192
144 (lambda (header value) 144 (lambda (header value)
145 "Function to format headers without a specified formatting function." 145 "Function to format headers without a specified formatting function."
146 (insert (capitalize (symbol-name header)) 146 (insert (capitalize (symbol-name header))
147 ": " 147 ": "
148 (if (consp value) (car value) value) 148 (if (consp value) (car value) value)
149 "\n"))) 149 hard-newline)))
150 150
151 (defun mail-header-format (format-rules headers) 151 (defun mail-header-format (format-rules headers)
152 "Use FORMAT-RULES to format HEADERS and insert into current buffer. 152 "Use FORMAT-RULES to format HEADERS and insert into current buffer.
153 HEADERS should be an alist of the form (HEADER . VALUE), 153 HEADERS should be an alist of the form (HEADER . VALUE),
154 where HEADER is a header field name (a symbol or a string), 154 where HEADER is a header field name (a symbol or a string),
185 (funcall mail-header-format-function header value)))))) 185 (funcall mail-header-format-function header value))))))
186 (value 186 (value
187 (if (cdr rule) 187 (if (cdr rule)
188 (funcall (cdr rule) header value) 188 (funcall (cdr rule) header value)
189 (funcall mail-header-format-function header value)))))) 189 (funcall mail-header-format-function header value))))))
190 (insert "\n"))) 190 (insert hard-newline)))
191 191
192 (provide 'mailheader) 192 (provide 'mailheader)
193 193
194 ;;; arch-tag: 6e7aa221-80b5-4b3d-b46f-fd66ab567be0 194 ;;; arch-tag: 6e7aa221-80b5-4b3d-b46f-fd66ab567be0
195 ;;; mailheader.el ends here 195 ;;; mailheader.el ends here