aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa1997-08-28 04:51:02 +0000
committerKenichi Handa1997-08-28 04:51:02 +0000
commite0b8fdf59fd9b2195f0e5d0e8bde9ca8669695a3 (patch)
tree574e2534f5c7d41e95e0eb21229305b011467fd7
parenta16dd35a64da48a282d1327cbe03de5a881317f7 (diff)
downloademacs-e0b8fdf59fd9b2195f0e5d0e8bde9ca8669695a3.tar.gz
emacs-e0b8fdf59fd9b2195f0e5d0e8bde9ca8669695a3.zip
(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.
-rw-r--r--lisp/gnus/nnheader.el25
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."
669 (or (not (numberp gnus-verbose-backends)) 669 (or (not (numberp gnus-verbose-backends))
670 (<= level gnus-verbose-backends))) 670 (<= level gnus-verbose-backends)))
671 671
672;; 1997/8/10 by MORIOKA Tomohiko
673(defvar nnheader-pathname-coding-system
674 'iso-8859-1
675 "*Coding system for pathname.")
676
672(defun nnheader-group-pathname (group dir &optional file) 677(defun nnheader-group-pathname (group dir &optional file)
673 "Make pathname for GROUP." 678 "Make pathname for GROUP."
674 (concat 679 (concat
@@ -677,7 +682,13 @@ without formatting."
677 (if (file-directory-p (concat dir group)) 682 (if (file-directory-p (concat dir group))
678 (concat dir group "/") 683 (concat dir group "/")
679 ;; If not, we translate dots into slashes. 684 ;; If not, we translate dots into slashes.
680 (concat dir (nnheader-replace-chars-in-string group ?. ?/) "/"))) 685 (concat dir
686 ;; 1997/8/10 by MORIOKA Tomohiko
687 ;; encode file name for Emacs 20.
688 (encode-coding-string
689 (nnheader-replace-chars-in-string group ?. ?/)
690 nnheader-pathname-coding-system)
691 "/")))
681 (cond ((null file) "") 692 (cond ((null file) "")
682 ((numberp file) (int-to-string file)) 693 ((numberp file) (int-to-string file))
683 (t file)))) 694 (t file))))
@@ -734,6 +745,10 @@ If FILE, find the \".../etc/PACKAGE\" file instead."
734 (when (string-match (car ange-ftp-path-format) path) 745 (when (string-match (car ange-ftp-path-format) path)
735 (ange-ftp-re-read-dir path))))) 746 (ange-ftp-re-read-dir path)))))
736 747
748;; 1997/5/4 by MORIOKA Tomohiko <morioka@jaist.ac.jp>
749(defvar nnheader-file-coding-system nil
750 "Coding system used in file backends of Gnus.")
751
737(defun nnheader-insert-file-contents (filename &optional visit beg end replace) 752(defun nnheader-insert-file-contents (filename &optional visit beg end replace)
738 "Like `insert-file-contents', q.v., but only reads in the file. 753 "Like `insert-file-contents', q.v., but only reads in the file.
739A buffer may be modified in several ways after reading into the buffer due 754A buffer may be modified in several ways after reading into the buffer due
@@ -743,7 +758,9 @@ find-file-hooks, etc.
743 (let ((format-alist nil) 758 (let ((format-alist nil)
744 (auto-mode-alist (nnheader-auto-mode-alist)) 759 (auto-mode-alist (nnheader-auto-mode-alist))
745 (default-major-mode 'fundamental-mode) 760 (default-major-mode 'fundamental-mode)
746 (after-insert-file-functions nil)) 761 (after-insert-file-functions nil)
762 ;; 1997/5/4 by MORIOKA Tomohiko <morioka@jaist.ac.jp>
763 (coding-system-for-read nnheader-file-coding-system))
747 (insert-file-contents filename visit beg end replace))) 764 (insert-file-contents filename visit beg end replace)))
748 765
749(defun nnheader-find-file-noselect (&rest args) 766(defun nnheader-find-file-noselect (&rest args)
@@ -751,7 +768,9 @@ find-file-hooks, etc.
751 (auto-mode-alist (nnheader-auto-mode-alist)) 768 (auto-mode-alist (nnheader-auto-mode-alist))
752 (default-major-mode 'fundamental-mode) 769 (default-major-mode 'fundamental-mode)
753 (enable-local-variables nil) 770 (enable-local-variables nil)
754 (after-insert-file-functions nil)) 771 (after-insert-file-functions nil)
772 ;; 1997/5/16 by MORIOKA Tomohiko <morioka@jaist.ac.jp>
773 (coding-system-for-read nnheader-file-coding-system))
755 (apply 'find-file-noselect args))) 774 (apply 'find-file-noselect args)))
756 775
757(defun nnheader-auto-mode-alist () 776(defun nnheader-auto-mode-alist ()