(defvar nnheader-head-chop-length 2048
"*Length of each read operation when trying to fetch HEAD headers.")
-(defvar nnheader-file-name-translation-alist nil
+(defvar nnheader-file-name-translation-alist
+ (let ((case-fold-search t))
+ (cond
+ ((string-match "windows-nt\\|os/2\\|emx\\|cygwin"
+ (symbol-name system-type))
+ (append (mapcar (lambda (c) (cons c ?_))
+ '(?: ?* ?\" ?< ?> ??))
+ (if (string-match "windows-nt\\|cygwin"
+ (symbol-name system-type))
+ nil
+ '((?+ . ?-)))))
+ (t nil)))
"*Alist that says how to translate characters in file names.
For instance, if \":\" is invalid as a file character in file names
on your system, you could say something like:
"Text coding system for write.
This variable is a substitute for `mm-text-coding-system-for-write'.")
+(defvar nnheader-auto-save-coding-system
+ (cond
+ ((boundp 'MULE) '*internal*)
+ ((not (fboundp 'find-coding-system)) nil)
+ ((find-coding-system 'emacs-mule)
+ (if (memq system-type '(windows-nt ms-dos ms-windows))
+ 'emacs-mule-dos 'emacs-mule))
+ ((find-coding-system 'escape-quoted) 'escape-quoted)
+ ((find-coding-system 'no-conversion) 'no-conversion)
+ (t nil))
+ "Coding system of auto save file.")
+
(eval-and-compile
(autoload 'nnmail-message-id "nnmail")
(autoload 'mail-position-on-field "sendmail")
(autoload 'gnus-point-at-eol "gnus-util")
(autoload 'gnus-buffer-live-p "gnus-util"))
-;; mm- stuff.
+;; mm-util stuff.
(unless (featurep 'mm-util)
;; Should keep track of `mm-image-load-path' in mm-util.el.
(defun nnheader-image-load-path (&optional package)
(defalias 'mm-with-unibyte-current-buffer
'nnheader-with-unibyte-current-buffer)
+ ;; Should keep track of `mm-with-unibyte' in mm-util.el.
+ (defmacro nnheader-with-unibyte (&rest forms)
+ "Eval the FORMS with the default value of `enable-multibyte-characters'
+nil, ."
+ `(let (default-enable-multibyte-characters)
+ ,@forms))
+ (put 'nnheader-with-unibyte 'lisp-indent-function 0)
+ (put 'nnheader-with-unibyte 'edebug-form-spec '(body))
+ (put 'mm-with-unibyte 'lisp-indent-function 0)
+ (put 'mm-with-unibyte 'edebug-form-spec '(body))
+ (defalias 'mm-with-unibyte 'nnheader-with-unibyte)
+
;; Should keep track of `mm-guess-mime-charset' in mm-util.el.
(defun nnheader-guess-mime-charset ()
"Guess the default MIME charset from the language environment."
(charsets-to-mime-charset (list item))))
(t
'iso-8859-1))))
- (defalias 'mm-guess-mime-charset 'nnheader-guess-mime-charset))
+ (defalias 'mm-guess-mime-charset 'nnheader-guess-mime-charset)
+
+ (defalias 'mm-char-int 'char-int)
+
+ ;; Should keep track of the same alias in mm-util.el.
+ (defalias 'mm-multibyte-p
+ (static-cond ((and (featurep 'xemacs) (featurep 'mule))
+ (lambda nil t))
+ ((featurep 'xemacs)
+ (lambda nil nil))
+ ((boundp 'MULE)
+ (lambda nil mc-flag))
+ (t
+ (lambda nil enable-multibyte-characters))))
+
+ ;; Should keep track of the same alias in mm-util.el.
+ (defalias 'mm-make-temp-file
+ (if (fboundp 'make-temp-file)
+ 'make-temp-file
+ (lambda (prefix &optional dir-flag)
+ (let ((file (expand-file-name
+ (make-temp-name prefix)
+ (if (fboundp 'temp-directory)
+ (temp-directory)
+ temporary-file-directory))))
+ (if dir-flag
+ (make-directory file))
+ file)))))
;; mail-parse stuff.
(unless (featurep 'mail-parse)
(defalias 'mail-header-field-value 'std11-field-value))
+;; ietf-drums stuff.
+(unless (featurep 'ietf-drums)
+ ;; Should keep track of `ietf-drums-unfold-fws' in ietf-drums.el.
+ (defun nnheader-unfold-fws ()
+ "Unfold folding white space in the current buffer."
+ (goto-char (point-min))
+ (while (re-search-forward "[ \t]*\n[ \t]+" nil t)
+ (replace-match " " t t))
+ (goto-char (point-min)))
+
+ (defalias 'ietf-drums-unfold-fws 'nnheader-unfold-fws))
+
;;; Header access macros.
;; These macros may look very much like the ones in GNUS 4.1. They