*** empty log message ***
[gnus] / lisp / nnheader.el
index c2bb9c4..0b68710 100644 (file)
@@ -1,5 +1,5 @@
 ;;; nnheader.el --- header access macros for Gnus and its backends
-;; Copyright (C) 1987,88,89,90,93,94,95,96 Free Software Foundation, Inc.
+;; Copyright (C) 1987,88,89,90,93,94,95,96,97 Free Software Foundation, Inc.
 
 ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
 ;;     Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
@@ -56,7 +56,9 @@ on your system, you could say something like:
  (autoload 'nnmail-message-id "nnmail")
  (autoload 'mail-position-on-field "sendmail")
  (autoload 'message-remove-header "message")
- (autoload 'cancel-function-timers "timers"))
+ (autoload 'cancel-function-timers "timers")
+ (autoload 'gnus-point-at-eol "gnus-util")
+ (autoload 'gnus-buffer-live-p "gnus-util"))
 
 ;;; Header access macros.
 
@@ -342,6 +344,10 @@ the line could be found."
               (setq min (point)))
              (t
               (setq found 'yes)))))
+    ;; We may be at the first line.
+    (when (and (not num)
+              (not (eobp)))
+      (setq num (read cur)))
     ;; Now we may have found the article we're looking for, or we
     ;; may be somewhere near it.
     (when (and (not (eq found 'yes))
@@ -623,19 +629,6 @@ without formatting."
       (apply 'insert format args))
     t))
 
-(defun nnheader-mail-file-mbox-p (file)
-  "Say whether FILE looks like an Unix mbox file."
-  (when (and (file-exists-p file)
-            (file-readable-p file)
-            (file-regular-p file))
-    (save-excursion
-      (nnheader-set-temp-buffer " *mail-file-mbox-p*")
-      (nnheader-insert-file-contents file)
-      (goto-char (point-min))
-      (prog1
-         (looking-at message-unix-mail-delimiter)
-       (kill-buffer (current-buffer))))))
-
 (defun nnheader-replace-chars-in-string (string from to)
   "Replace characters in STRING from FROM to TO."
   (let ((string (substring string 0))  ;Copy string.
@@ -754,6 +747,7 @@ find-file-hooks, etc.
   (let ((format-alist nil)
        (auto-mode-alist (nnheader-auto-mode-alist))
        (default-major-mode 'fundamental-mode)
+       (enable-local-variables nil)
         (after-insert-file-functions nil))
     (apply 'find-file-noselect args)))