changeset 13055:d94531fd96a4

(mail-file-babyl-p): Function moved from rmail.el and renamed.
author Richard M. Stallman <rms@gnu.org>
date Thu, 21 Sep 1995 20:20:49 +0000
parents b2df0396fae2
children c1ce3b4556f2
files lisp/mail/mail-utils.el
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/mail-utils.el	Thu Sep 21 20:20:11 1995 +0000
+++ b/lisp/mail/mail-utils.el	Thu Sep 21 20:20:49 1995 +0000
@@ -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)."