Mercurial > hg > xemacs-beta
diff lisp/gnus/nnheader.el @ 108:360340f9fd5f r20-1b6
Import from CVS: tag r20-1b6
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:18:39 +0200 |
parents | 0d2f883870bc |
children | 48d667d6f17f |
line wrap: on
line diff
--- a/lisp/gnus/nnheader.el Mon Aug 13 09:17:27 2007 +0200 +++ b/lisp/gnus/nnheader.el Mon Aug 13 09:18:39 2007 +0200 @@ -56,7 +56,9 @@ (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. @@ -142,7 +144,7 @@ references chars lines xref) "Create a new mail header structure initialized with the parameters given." (vector number subject from date id references chars lines xref)) - + ;; fake message-ids: generation and detection (defvar nnheader-fake-message-id 1) @@ -281,7 +283,7 @@ (defun nnheader-insert-nov (header) (princ (mail-header-number header) (current-buffer)) - (insert + (insert "\t" (or (mail-header-subject header) "(none)") "\t" (or (mail-header-from header) "(nobody)") "\t" @@ -313,7 +315,7 @@ ;; First we find the first wanted line. (nnheader-find-nov-line beg) (delete-region (point-min) (point)) - ;; Then we find the last wanted line. + ;; Then we find the last wanted line. (when (nnheader-find-nov-line end) (forward-line 1)) (delete-region (point) (point-max))) @@ -529,7 +531,7 @@ (defvar jka-compr-compression-info-list) (defvar nnheader-numerical-files (if (boundp 'jka-compr-compression-info-list) - (concat "\\([0-9]+\\)\\(" + (concat "\\([0-9]+\\)\\(" (mapconcat (lambda (i) (aref i 0)) jka-compr-compression-info-list "\\|") "\\)?") @@ -552,7 +554,7 @@ (defun nnheader-directory-files-safe (&rest args) ;; It has been reported numerous times that `directory-files' ;; fails with an alarming frequency on NFS mounted file systems. - ;; This function executes that function twice and returns + ;; This function executes that function twice and returns ;; the longest result. (let ((first (apply 'directory-files args)) (second (apply 'directory-files args))) @@ -579,7 +581,7 @@ (defun nnheader-translate-file-chars (file) (if (null nnheader-file-name-translation-alist) ;; No translation is necessary. - file + file ;; We translate -- but only the file name. We leave the directory ;; alone. (let* ((i 0) @@ -627,19 +629,6 @@ (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. @@ -654,12 +643,12 @@ (defun nnheader-file-to-group (file &optional top) "Return a group name based on FILE and TOP." - (nnheader-replace-chars-in-string + (nnheader-replace-chars-in-string (if (not top) file (condition-case () (substring (expand-file-name file) - (length + (length (expand-file-name (file-name-as-directory top)))) (error ""))) @@ -723,7 +712,7 @@ (setq dir (concat (file-name-directory (directory-file-name (car path))) - "etc/" package + "etc/" package (if file "" "/")))) (or file (file-directory-p dir))) (setq result dir @@ -792,13 +781,13 @@ (goto-char (point-min)) (while (,(if regexp 're-search-forward 'search-forward) ,from nil t) - (insert-buffer-substring + (insert-buffer-substring cur start (prog1 (match-beginning 0) (set-buffer new))) (goto-char (point-max)) ,(when to `(insert ,to)) (set-buffer cur) (setq start (point))) - (insert-buffer-substring + (insert-buffer-substring cur start (prog1 (point-max) (set-buffer new))) (copy-to-buffer cur (point-min) (point-max)) (kill-buffer (current-buffer))