From: Richard M. Stallman Date: Thu, 21 Sep 1995 20:20:49 +0000 (+0000) Subject: (mail-file-babyl-p): Function moved from rmail.el and renamed. X-Git-Tag: emacs-19.34~2805 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=996792b15038e452652fdfa121d8cc5f552d833c;p=emacs.git (mail-file-babyl-p): Function moved from rmail.el and renamed. --- diff --git a/lisp/mail/mail-utils.el b/lisp/mail/mail-utils.el index 6cf718060c7..26ad072293e 100644 --- a/lisp/mail/mail-utils.el +++ b/lisp/mail/mail-utils.el @@ -38,6 +38,17 @@ Otherwise, (the default) use a smaller, somewhat faster, and often correct parser.") +;; Returns t if file FILE is an Rmail file. +;;;###autoload +(defun mail-file-babyl-p (file) + (let ((buf (generate-new-buffer " *rmail-file-p*"))) + (unwind-protect + (save-excursion + (set-buffer buf) + (insert-file-contents file nil 0 100) + (looking-at "BABYL OPTIONS:")) + (kill-buffer buf)))) + (defun mail-string-delete (string start end) "Returns a string containing all of STRING except the part from START (inclusive) to END (exclusive)."