diff options
author | Kenichi Handa <handa@m17n.org> | 1997-08-28 04:51:02 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 1997-08-28 04:51:02 +0000 |
commit | e0b8fdf59fd9b2195f0e5d0e8bde9ca8669695a3 (patch) | |
tree | 574e2534f5c7d41e95e0eb21229305b011467fd7 /lisp/gnus/nnheader.el | |
parent | a16dd35a64da48a282d1327cbe03de5a881317f7 (diff) | |
download | emacs-e0b8fdf59fd9b2195f0e5d0e8bde9ca8669695a3.tar.gz |
(nnheader-pathname-coding-system): New variable.
(nnheader-file-coding-system): New variable.
(nnheader-group-pathname): Encode pathname for Emacs 20.
(nnheader-find-file-noselect): Bind `coding-system-for-read' with
`nnheader-file-coding-system' for Emacs/mule and XEmacs/mule.
(nnheader-insert-file-contents): Bind `coding-system-for-read'
with `nnheader-file-coding-system' for Emacs/mule and XEmacs/mule.
Diffstat (limited to 'lisp/gnus/nnheader.el')
-rw-r--r-- | lisp/gnus/nnheader.el | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/lisp/gnus/nnheader.el b/lisp/gnus/nnheader.el index 376bc9d7227..a137b3fb0b1 100644 --- a/lisp/gnus/nnheader.el +++ b/lisp/gnus/nnheader.el @@ -669,6 +669,11 @@ without formatting." (or (not (numberp gnus-verbose-backends)) (<= level gnus-verbose-backends))) +;; 1997/8/10 by MORIOKA Tomohiko +(defvar nnheader-pathname-coding-system + 'iso-8859-1 + "*Coding system for pathname.") + (defun nnheader-group-pathname (group dir &optional file) "Make pathname for GROUP." (concat @@ -677,7 +682,13 @@ without formatting." (if (file-directory-p (concat dir group)) (concat dir group "/") ;; If not, we translate dots into slashes. - (concat dir (nnheader-replace-chars-in-string group ?. ?/) "/"))) + (concat dir + ;; 1997/8/10 by MORIOKA Tomohiko + ;; encode file name for Emacs 20. + (encode-coding-string + (nnheader-replace-chars-in-string group ?. ?/) + nnheader-pathname-coding-system) + "/"))) (cond ((null file) "") ((numberp file) (int-to-string file)) (t file)))) @@ -734,6 +745,10 @@ If FILE, find the \".../etc/PACKAGE\" file instead." (when (string-match (car ange-ftp-path-format) path) (ange-ftp-re-read-dir path))))) +;; 1997/5/4 by MORIOKA Tomohiko <morioka@jaist.ac.jp> +(defvar nnheader-file-coding-system nil + "Coding system used in file backends of Gnus.") + (defun nnheader-insert-file-contents (filename &optional visit beg end replace) "Like `insert-file-contents', q.v., but only reads in the file. A buffer may be modified in several ways after reading into the buffer due @@ -743,7 +758,9 @@ find-file-hooks, etc. (let ((format-alist nil) (auto-mode-alist (nnheader-auto-mode-alist)) (default-major-mode 'fundamental-mode) - (after-insert-file-functions nil)) + (after-insert-file-functions nil) + ;; 1997/5/4 by MORIOKA Tomohiko <morioka@jaist.ac.jp> + (coding-system-for-read nnheader-file-coding-system)) (insert-file-contents filename visit beg end replace))) (defun nnheader-find-file-noselect (&rest args) @@ -751,7 +768,9 @@ find-file-hooks, etc. (auto-mode-alist (nnheader-auto-mode-alist)) (default-major-mode 'fundamental-mode) (enable-local-variables nil) - (after-insert-file-functions nil)) + (after-insert-file-functions nil) + ;; 1997/5/16 by MORIOKA Tomohiko <morioka@jaist.ac.jp> + (coding-system-for-read nnheader-file-coding-system)) (apply 'find-file-noselect args))) (defun nnheader-auto-mode-alist () |