Mercurial > hg > xemacs-beta
diff lisp/tm/gnus-charset.el @ 74:54cc21c15cbb r20-0b32
Import from CVS: tag r20-0b32
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:04:33 +0200 |
parents | 131b0175ea99 |
children | c7528f8e288d |
line wrap: on
line diff
--- a/lisp/tm/gnus-charset.el Mon Aug 13 09:03:47 2007 +0200 +++ b/lisp/tm/gnus-charset.el Mon Aug 13 09:04:33 2007 +0200 @@ -5,7 +5,7 @@ ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> ;; Created: 1996/8/6 ;; Version: -;; $Id: gnus-charset.el,v 1.1.1.1 1996/12/18 22:43:38 steve Exp $ +;; $Id: gnus-charset.el,v 1.1.1.2 1996/12/21 20:50:47 steve Exp $ ;; Keywords: news, MIME, multimedia, multilingual, encoded-word ;; This file is not part of GNU Emacs yet. @@ -83,14 +83,45 @@ (call-after-loaded 'nnheader (lambda () - (defun nnheader-find-file-noselect (filename &optional nowarn rawfile) - (as-binary-input-file (find-file-noselect filename nowarn rawfile)) + (defun nnheader-find-file-noselect (&rest args) + (as-binary-input-file + (let ((format-alist nil) + (auto-mode-alist (nnheader-auto-mode-alist)) + (default-major-mode 'fundamental-mode) + (after-insert-file-functions ; for jam-code-guess + (if (memq 'jam-code-guess-after-insert-file-function + after-insert-file-functions) + '(jam-code-guess-after-insert-file-function)))) + (apply 'find-file-noselect args))) ) - (defun nnheader-insert-file-contents-literally + ;; Red Gnus 0.67 or later + (defun nnheader-insert-file-contents (filename &optional visit beg end replace) (as-binary-input-file - (insert-file-contents-literally filename visit beg end replace) - )) + (let ((format-alist nil) + (auto-mode-alist (nnheader-auto-mode-alist)) + (default-major-mode 'fundamental-mode) + (enable-local-variables nil) + (after-insert-file-functions ; for jam-code-guess + (if (memq 'jam-code-guess-after-insert-file-function + after-insert-file-functions) + '(jam-code-guess-after-insert-file-function)))) + (insert-file-contents filename visit beg end replace)) + )) + ;; imported from Red Gnus 0.66 + (or (fboundp 'nnheader-auto-mode-alist) + (defun nnheader-auto-mode-alist () + (let ((alist auto-mode-alist) + out) + (while alist + (when (listp (cdar alist)) + (push (car alist) out)) + (pop alist)) + (nreverse out))) + ) + ;; alias for Old Gnus + (defalias 'nnheader-insert-file-contents-literally + 'nnheader-insert-file-contents) )) (call-after-loaded 'nnmail