• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/emacs-93/emacs/lisp/gnus/

Lines Matching +defs:temp +defs:file +defs:name

11 ;; This file is part of GNU Emacs.
24 ;; along with GNU Emacs; see the file COPYING. If not, write to the
66 Value is an integer, nil, or t. nil means read in chunks of a file
68 entire file immediately, disregarding `nnheader-head-chop-length'.
78 (symbol-name system-type))
92 (defvar nnheader-file-name-translation-alist
96 (symbol-name system-type))
100 (symbol-name system-type))
104 "*Alist that says how to translate characters in file names.
105 For instance, if \":\" is invalid as a file character in file names
108 \(setq nnheader-file-name-translation-alist '((?: . ?_)))")
111 (string-to-char (substring (file-name-as-directory ".") -1))
341 (concat "\n" (symbol-name (car extra)) ":") nil t)
365 (with-temp-buffer
443 (insert (symbol-name (caar extra))
452 (defun nnheader-parse-overview-file (file)
455 (nnheader-insert-file-contents file)
463 (defun nnheader-write-overview-file (file headers)
465 (with-temp-file file
571 (defun nnheader-file-error (file)
575 ((not (file-exists-p file))
577 ((file-directory-p file)
579 ((not (file-readable-p file))
581 file))
583 (defun nnheader-insert-head (file)
585 (when (file-exists-p file)
587 ;; Just read the entire file.
588 (nnheader-insert-file-contents file)
595 ;; `insert-file-contents' returns.
598 (nth 1 (mm-insert-file-contents
599 file nil beg
607 (when (mm-coding-system-p nnheader-file-coding-system)
609 nnheader-file-coding-system))))
671 (defun nnheader-set-temp-buffer (name &optional noerase)
673 (set-buffer (get-buffer-create name))
690 "Regexp that matches numerical file names.")
693 "Regexp that matches numerical full file names.")
695 (defsubst nnheader-file-to-number (file)
696 "Take a FILE name and return the article number."
698 (string-to-number file)
699 (string-match nnheader-numerical-short-files file)
700 (string-to-number (match-string 0 file))))
708 an alarming frequency on NFS mounted file systems. If it is nil,
721 (mapcar 'nnheader-file-to-number
728 (defun nnheader-article-to-file-alist (dir)
729 "Return an alist of article/file pairs in DIR."
730 (mapcar (lambda (file) (cons (nnheader-file-to-number file) file))
741 (defun nnheader-translate-file-chars (file &optional full)
742 "Translate FILE into something that can be a file name.
744 (if (null nnheader-file-name-translation-alist)
746 file
751 (setq leaf (copy-sequence file)
755 ;; We translate -- but only the file name. We leave the directory
761 ;; file-name-nondirectory is not enough to split
762 ;; file names, containing ':', e.g.
766 ;; "d:file.name" -> "a:" "file.name"
770 ;; to translate then only the file name part.
772 (setq leaf file
774 (if (string-match "\\(^\\w:\\|[/\\]\\)\\([^/\\]+\\)$" file)
775 (setq leaf (substring file (match-beginning 2))
776 path (substring file 0 (match-beginning 2)))))
778 (setq leaf (file-name-nondirectory file)
779 path (file-name-directory file))))
783 nnheader-file-name-translation-alist)))
834 (defun nnheader-file-to-group (file &optional top)
835 "Return a group name based on FILE and TOP."
838 file
840 (substring (expand-file-name file)
842 (expand-file-name
843 (file-name-as-directory top))))
860 "*Coding system for file name.")
862 (defun nnheader-group-pathname (group dir &optional file)
863 "Make file name for GROUP."
865 (let ((dir (file-name-as-directory (expand-file-name dir))))
867 (file-name-as-directory
868 (if (file-directory-p (concat dir group))
869 (expand-file-name group dir)
871 (expand-file-name (mm-encode-coding-string
875 (cond ((null file) "")
876 ((numberp file) (int-to-string file))
877 (t file))))
881 (apply 'concat (file-name-as-directory dir) files))
888 (defun nnheader-file-size (file)
889 "Return the file size of FILE or 0."
890 (or (nth 7 (file-attributes file)) 0))
892 (defun nnheader-find-etc-directory (package &optional file first)
896 If FILE, find the \".../etc/PACKAGE\" file instead.
897 If FIRST is non-nil, return the directory or the file found at the
905 (file-exists-p
907 (file-name-directory
908 (directory-file-name (car path)))
910 (if file "" "/"))))
911 (or file (file-directory-p dir)))
919 (car (sort results 'file-newer-than-file-p)))))
933 (defvar nnheader-file-coding-system 'raw-text
934 "Coding system used in file backends of Gnus.")
936 (defun nnheader-insert-file-contents (filename &optional visit beg end replace)
937 "Like `insert-file-contents', q.v., but only reads in the file.
939 to advanced Emacs features, such as file-name-handlers, format decoding,
940 find-file-hooks, etc.
942 (let ((coding-system-for-read nnheader-file-coding-system))
943 (mm-insert-file-contents filename visit beg end replace)))
945 (defun nnheader-insert-nov-file (file first)
946 (let ((size (nth 7 (file-attributes file)))
950 ;; If the file is small, we just load it.
951 (nnheader-insert-file-contents file)
953 ;; not, we just insert the rest of the file as well.
955 (nnheader-insert-file-contents file nil (- size cutoff) size)
963 (nnheader-insert-file-contents file)))))))
965 (defun nnheader-find-file-noselect (&rest args)
966 "Open a file with some variables bound.
967 See `find-file-noselect' for the arguments."
972 (after-insert-file-functions nil)
974 (coding-system-for-read nnheader-file-coding-system)
975 (ffh (if (boundp 'find-file-hook)
976 'find-file-hook
977 'find-file-hooks))
981 (apply 'find-file-noselect args)
989 (when (file-regular-p (car files))
999 (unless (member (file-name-nondirectory (car files)) '("." ".."))