"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)
(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,