summaryrefslogtreecommitdiff
path: root/lisp/mail/mail-utils.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-09-21 20:20:49 +0000
committerRichard M. Stallman <rms@gnu.org>1995-09-21 20:20:49 +0000
commitbb517c693d6204392438d720fb40ccb8dc8bc537 (patch)
tree71632be144d1a32a449eb0f24a08a685fd9911b9 /lisp/mail/mail-utils.el
parentd57890f046f250e8bfd9e20c0025d7b583600b56 (diff)
downloademacs-bb517c693d6204392438d720fb40ccb8dc8bc537.tar.gz
(mail-file-babyl-p): Function moved from rmail.el and renamed.
Diffstat (limited to 'lisp/mail/mail-utils.el')
-rw-r--r--lisp/mail/mail-utils.el11
1 files changed, 11 insertions, 0 deletions
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)."