comparison lisp/tm/gnus-charset.el @ 70:131b0175ea99 r20-0b30

Import from CVS: tag r20-0b30
author cvs
date Mon, 13 Aug 2007 09:02:59 +0200
parents e04119814345
children 54cc21c15cbb
comparison
equal deleted inserted replaced
69:804d1389bcd6 70:131b0175ea99
3 ;; Copyright (C) 1995,1996 Free Software Foundation, Inc. 3 ;; Copyright (C) 1995,1996 Free Software Foundation, Inc.
4 4
5 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> 5 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
6 ;; Created: 1996/8/6 6 ;; Created: 1996/8/6
7 ;; Version: 7 ;; Version:
8 ;; $Id: gnus-charset.el,v 1.4 1997/03/16 05:55:40 steve Exp $ 8 ;; $Id: gnus-charset.el,v 1.1.1.1 1996/12/18 22:43:38 steve Exp $
9 ;; Keywords: news, MIME, multimedia, multilingual, encoded-word 9 ;; Keywords: news, MIME, multimedia, multilingual, encoded-word
10 10
11 ;; This file is not part of GNU Emacs yet. 11 ;; This file is not part of GNU Emacs yet.
12 12
13 ;; This program is free software; you can redistribute it and/or 13 ;; This program is free software; you can redistribute it and/or
81 'nntp-open-network-stream-with-no-code-conversion) 81 'nntp-open-network-stream-with-no-code-conversion)
82 ) 82 )
83 (call-after-loaded 83 (call-after-loaded
84 'nnheader 84 'nnheader
85 (lambda () 85 (lambda ()
86 (defun nnheader-find-file-noselect (&rest args) 86 (defun nnheader-find-file-noselect (filename &optional nowarn rawfile)
87 (as-binary-input-file 87 (as-binary-input-file (find-file-noselect filename nowarn rawfile))
88 (let ((format-alist nil)
89 (auto-mode-alist (nnheader-auto-mode-alist))
90 (default-major-mode 'fundamental-mode)
91 (after-insert-file-functions ; for jam-code-guess
92 (if (memq 'jam-code-guess-after-insert-file-function
93 after-insert-file-functions)
94 '(jam-code-guess-after-insert-file-function))))
95 (apply 'find-file-noselect args)))
96 ) 88 )
97 ;; Red Gnus 0.67 or later 89 (defun nnheader-insert-file-contents-literally
98 (defun nnheader-insert-file-contents
99 (filename &optional visit beg end replace) 90 (filename &optional visit beg end replace)
100 (as-binary-input-file 91 (as-binary-input-file
101 (let ((format-alist nil) 92 (insert-file-contents-literally filename visit beg end replace)
102 (auto-mode-alist (nnheader-auto-mode-alist)) 93 ))
103 (default-major-mode 'fundamental-mode)
104 (enable-local-variables nil)
105 (after-insert-file-functions ; for jam-code-guess
106 (if (memq 'jam-code-guess-after-insert-file-function
107 after-insert-file-functions)
108 '(jam-code-guess-after-insert-file-function))))
109 (insert-file-contents filename visit beg end replace))
110 )
111 ;; for gnspool on OS/2
112 (while (re-search-forward "\r$" nil t)
113 (replace-match "")
114 )
115 )
116 ;; imported from Red Gnus 0.66
117 (or (fboundp 'nnheader-auto-mode-alist)
118 (defun nnheader-auto-mode-alist ()
119 (let ((alist auto-mode-alist)
120 out)
121 (while alist
122 (when (listp (cdar alist))
123 (push (car alist) out))
124 (pop alist))
125 (nreverse out)))
126 )
127 ;; alias for Old Gnus
128 (defalias 'nnheader-insert-file-contents-literally
129 'nnheader-insert-file-contents)
130 )) 94 ))
131 (call-after-loaded 95 (call-after-loaded
132 'nnmail 96 'nnmail
133 (lambda () 97 (lambda ()
134 (defun nnmail-find-file (file) 98 (defun nnmail-find-file (file)
147 (file-error nil)) 111 (file-error nil))
148 ))) 112 )))
149 )) 113 ))
150 (defun gnus-prepare-save-mail-function () 114 (defun gnus-prepare-save-mail-function ()
151 (setq file-coding-system *noconv* 115 (setq file-coding-system *noconv*
152 buffer-file-coding-system 'no-conversion) 116 coding-system-for-write 'no-conversion)
153 ) 117 )
154 (add-hook 'nnmail-prepare-save-mail-hook 118 (add-hook 'nnmail-prepare-save-mail-hook
155 'gnus-prepare-save-mail-function) 119 'gnus-prepare-save-mail-function)
156 120
157 (gnus-set-newsgroup-default-charset "alt.chinese" 'hz-gb-2312) 121 (gnus-set-newsgroup-default-charset "alt.chinese" 'hz-gb-2312)