(autoload 'nnmail-message-id "nnmail")
(autoload 'mail-position-on-field "sendmail")
(autoload 'message-remove-header "message")
- (autoload 'gnus-point-at-eol "gnus-util")
(autoload 'gnus-buffer-live-p "gnus-util"))
;; mm-util stuff.
"Return non-nil if SYM is a coding system."
(or (and (fboundp 'find-coding-system) (find-coding-system sym))
(and (fboundp 'coding-system-p) (coding-system-p sym))))
- (defalias 'mm-coding-system-p 'nnheader-coding-system-p))
+ (defalias 'mm-coding-system-p 'nnheader-coding-system-p)
+
+ (defalias 'mm-disable-multibyte
+ (static-if (featurep 'xemacs)
+ 'ignore
+ (lambda nil (set-buffer-multibyte nil))))
+ (defalias 'mm-enable-multibyte
+ (static-if (featurep 'xemacs)
+ 'ignore
+ ;; Why isn't it t but `to'? See mm-util.el.
+ (lambda nil (set-buffer-multibyte 'to))))
+
+ (defalias 'mm-encode-coding-region 'encode-coding-region)
+
+ (defalias 'mm-string-make-unibyte
+ (if (fboundp 'string-make-unibyte)
+ 'string-make-unibyte
+ 'identity)))
;; mail-parse stuff.
(unless (featurep 'mail-parse)
(first t)
(bol (save-restriction
(widen)
- (gnus-point-at-bol))))
+ (point-at-bol))))
(while (not (eobp))
(when (and (or break qword-break)
(> (- (point) bol) 76))
(goto-char (point-min))
(let ((bol (save-restriction
(widen)
- (gnus-point-at-bol)))
- (eol (gnus-point-at-eol)))
+ (point-at-bol)))
+ (eol (point-at-eol)))
(forward-line 1)
(while (not (eobp))
(if (and (looking-at "[ \t]")
- (< (- (gnus-point-at-eol) bol) 76))
+ (< (- (point-at-eol) bol) 76))
(delete-region eol (progn
(goto-char eol)
(skip-chars-forward "\r\n")
(point)))
- (setq bol (gnus-point-at-bol)))
- (setq eol (gnus-point-at-eol))
+ (setq bol (point-at-bol)))
+ (setq eol (point-at-eol))
(forward-line 1)))))))
(unless (fboundp 'std11-unfold-field)
(goto-char p)
(if (search-forward "\nmessage-id:" nil t)
(buffer-substring
- (1- (or (search-forward "<" (gnus-point-at-eol) t)
+ (1- (or (search-forward "<" (point-at-eol) t)
(point)))
- (or (search-forward ">" (gnus-point-at-eol) t) (point)))
+ (or (search-forward ">" (point-at-eol) t) (point)))
;; If there was no message-id, we just fake one to make
;; subsequent routines simpler.
(nnheader-generate-fake-message-id)))
(nnheader-generate-fake-message-id))))
(defun nnheader-parse-nov ()
- (let ((eol (gnus-point-at-eol)))
+ (let ((eol (point-at-eol)))
(make-full-mail-header
(nnheader-nov-read-integer) ; number
(nnheader-nov-field) ; subject
;; This is invalid, but not all articles have Message-IDs.
()
(mail-position-on-field "References")
- (let ((begin (gnus-point-at-bol))
+ (let ((begin (point-at-bol))
(fill-column 78)
(fill-prefix "\t"))
(when references
(point-max)))
(goto-char (point-min)))
+(defun nnheader-get-lines-and-char ()
+ "Return the number of lines and chars in the article body."
+ (goto-char (point-min))
+ (if (not (re-search-forward "\n\r?\n" nil t))
+ (list 0 0)
+ (list (count-lines (point) (point-max))
+ (- (point-max) (point)))))
+
(defun nnheader-remove-body ()
"Remove the body from an article in this current buffer."
(goto-char (point-min))
(defvar nnheader-directory-files-is-safe
(or (eq system-type 'windows-nt)
- (and (not (featurep 'xemacs))
- (> emacs-major-version 20)))
+ (not (featurep 'xemacs)))
"If non-nil, Gnus believes `directory-files' is safe.
It has been reported numerous times that `directory-files' fails with
an alarming frequency on NFS mounted file systems. If it is nil,
"Strip all \r's from the current buffer."
(nnheader-skeleton-replace "\r"))
-(defalias 'nnheader-run-at-time 'run-at-time)
(defalias 'nnheader-cancel-timer 'cancel-timer)
(defalias 'nnheader-cancel-function-timers 'cancel-function-timers)
(defalias 'nnheader-string-as-multibyte 'string-as-multibyte)