Function: mail-insert-file
mail-insert-file is an interactive and byte-compiled function defined
in sendmail.el.gz.
Signature
(mail-insert-file &optional FILE)
Documentation
Insert a file at the end of the buffer, with separator lines around it.
Probably introduced at or before Emacs version 24.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/mail/sendmail.el.gz
(defun mail-insert-file (&optional file)
"Insert a file at the end of the buffer, with separator lines around it."
(interactive "fAttach file: ")
(save-excursion
(goto-char (point-max))
(or (bolp) (newline))
(newline)
(let ((start (point))
middle)
(insert (format "===File %s===" file))
(insert-char ?= (max 0 (- 60 (current-column))))
(newline)
(setq middle (point))
(insert "============================================================\n")
(push-mark)
(goto-char middle)
(insert-file-contents file)
(or (bolp) (newline))
(goto-char start))))