1 |
;;; nnheader.el --- header access macros for Gnus and its backends |
;;; nnheader.el --- header access macros for Gnus and its backends |
2 |
|
|
3 |
;; Copyright (C) 1987, 1988, 1989, 1990, 1993, 1994, 1995, 1996, |
;; Copyright (C) 1987, 1988, 1989, 1990, 1993, 1994, 1995, 1996, |
4 |
;; 1997, 1998, 2000, 2001, 2002, 2003, 2004 |
;; 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005 |
5 |
;; Free Software Foundation, Inc. |
;; Free Software Foundation, Inc. |
6 |
|
|
7 |
;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet> |
;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet> |
953 |
(defun nnheader-find-file-noselect (&rest args) |
(defun nnheader-find-file-noselect (&rest args) |
954 |
"Open a file with some variables bound. |
"Open a file with some variables bound. |
955 |
See `find-file-noselect' for the arguments." |
See `find-file-noselect' for the arguments." |
956 |
(let ((format-alist nil) |
(let* ((format-alist nil) |
957 |
(auto-mode-alist (mm-auto-mode-alist)) |
(auto-mode-alist (mm-auto-mode-alist)) |
958 |
(default-major-mode 'fundamental-mode) |
(default-major-mode 'fundamental-mode) |
959 |
(enable-local-variables nil) |
(enable-local-variables nil) |
960 |
(after-insert-file-functions nil) |
(after-insert-file-functions nil) |
961 |
(enable-local-eval nil) |
(enable-local-eval nil) |
962 |
(find-file-hooks nil) |
(coding-system-for-read nnheader-file-coding-system) |
963 |
(coding-system-for-read nnheader-file-coding-system)) |
(ffh (if (boundp 'find-file-hook) |
964 |
(apply 'find-file-noselect args))) |
'find-file-hook |
965 |
|
'find-file-hooks)) |
966 |
|
(val (symbol-value ffh))) |
967 |
|
(set ffh nil) |
968 |
|
(unwind-protect |
969 |
|
(apply 'find-file-noselect args) |
970 |
|
(set ffh val)))) |
971 |
|
|
972 |
(defun nnheader-directory-regular-files (dir) |
(defun nnheader-directory-regular-files (dir) |
973 |
"Return a list of all regular files in DIR." |
"Return a list of all regular files in DIR." |