]> git.eshelyaron.com Git - emacs.git/commitdiff
(mail-use-rfc822): Remove * from defcustom doc.
authorGlenn Morris <rgm@gnu.org>
Tue, 10 Feb 2009 03:39:38 +0000 (03:39 +0000)
committerGlenn Morris <rgm@gnu.org>
Tue, 10 Feb 2009 03:39:38 +0000 (03:39 +0000)
(mail-file-babyl-p): Use with-temp-buffer.

lisp/ChangeLog
lisp/mail/mail-utils.el

index 3e43dfb74c3b39840855b4971267e9dbea2323f8..e311549257e1fafcef9434ededeb558cce62b0d6 100644 (file)
@@ -1,5 +1,8 @@
 2009-02-10  Glenn Morris  <rgm@gnu.org>
 
+       * mail/mail-utils.el (mail-use-rfc822): Remove * from defcustom doc.
+       (mail-file-babyl-p): Use with-temp-buffer.
+
        * mail/rmailsort.el: Just require rmail.
 
        * mail/rmailedit.el: Just require rmail.
index 2311efc37ee9da81ced5e29a36fdf2c68d92c310..9c607cb4f4c837983347b7f0b00ac73d1496c6a3 100644 (file)
@@ -33,8 +33,8 @@
 (require 'lisp-mode)
 
 ;;;###autoload
-(defcustom mail-use-rfc822 nil "\
-*If non-nil, use a full, hairy RFC822 parser on mail addresses.
+(defcustom mail-use-rfc822 nil
+  "If non-nil, use a full, hairy RFC822 parser on mail addresses.
 Otherwise, (the default) use a smaller, somewhat faster, and
 often correct parser."
   :type 'boolean
@@ -43,13 +43,10 @@ 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))))
+  "Return non-nil if FILE is a Babyl file."
+  (with-temp-buffer
+    (insert-file-contents file nil 0 100)
+    (looking-at "BABYL OPTIONS:")))
 
 (defun mail-string-delete (string start end)
   "Returns a string containing all of STRING except the part