diff options
author | Richard M. Stallman <rms@gnu.org> | 1993-06-16 19:24:34 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1993-06-16 19:24:34 +0000 |
commit | 5bd65b3b64557839f85ec70762c561b184618b28 (patch) | |
tree | 43f10067ce1539e3e5e164f808d7a46fdfb23bd9 /lisp/mail/rmailout.el | |
parent | 76d8cb227abdb2b63d56f9ed6365edaab5c3cfce (diff) | |
download | emacs-5bd65b3b64557839f85ec70762c561b184618b28.tar.gz |
(rmail-output): Use insert-file-contents to look at
beginning of output file.
Diffstat (limited to 'lisp/mail/rmailout.el')
-rw-r--r-- | lisp/mail/rmailout.el | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/lisp/mail/rmailout.el b/lisp/mail/rmailout.el index 49aa6c5cd23..fa6bf01bf39 100644 --- a/lisp/mail/rmailout.el +++ b/lisp/mail/rmailout.el @@ -162,16 +162,14 @@ When called from lisp code, N may be omitted." ;; If we can do it, read a little of the file ;; to check whether it is an RMAIL file. ;; If it is, don't mess it up. - (if (fboundp 'insert-partial-file-contents) - (progn - (insert-partial-file-contents file-name 0 20) - (if (looking-at "BABYL OPTIONS:\n") - (error (save-excursion - (set-buffer rmailbuf) - (substitute-command-keys - "File %s is an RMAIL file; use the \\[rmail-output-to-rmail-file] command")) - file-name)) - (erase-buffer))) + (insert-file-contents file-name nil 0 20) + (if (looking-at "BABYL OPTIONS:\n") + (error (save-excursion + (set-buffer rmailbuf) + (substitute-command-keys + "Use \\[rmail-output-to-rmail-file] to output to Rmail file `%s'")) + (file-name-nondirectory file-name))) + (erase-buffer) (insert-buffer-substring rmailbuf) (insert "\n") (goto-char (point-min)) |