Function: gnus-group-make-doc-group
gnus-group-make-doc-group is an interactive and byte-compiled function
defined in gnus-group.el.gz.
Signature
(gnus-group-make-doc-group FILE TYPE)
Documentation
Create a group that uses a single file as the source.
If called with a prefix argument, ask for the file type.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/gnus-group.el.gz
(defun gnus-group-make-doc-group (file type)
"Create a group that uses a single file as the source.
If called with a prefix argument, ask for the file type."
(interactive (list (read-file-name "File name: ")
(and current-prefix-arg 'ask))
gnus-group-mode)
(when (eq type 'ask)
(let ((err "")
char found)
(while (not found)
(message
"%sFile type (mbox, babyl, digest, forward, mmdf, guess) [m, b, d, f, a, g]: "
err)
(setq found (cond ((= (setq char (read-char)) ?m) 'mbox)
((= char ?b) 'babyl)
((= char ?d) 'digest)
((= char ?f) 'forward)
((= char ?a) 'mmfd)
((= char ?g) 'guess)
(t (setq err (format "%c unknown. " char))
nil))))
(setq type found)))
(setq file (expand-file-name file))
(let* ((name (gnus-generate-new-group-name
(gnus-group-prefixed-name
(file-name-nondirectory file) '(nndoc ""))))
(method (list 'nndoc file
(list 'nndoc-address file)
(list 'nndoc-article-type (or type 'guess))))
(coding (gnus-group-name-charset method name)))
(setcar (cdr method) (encode-coding-string file coding))
(gnus-group-make-group
(gnus-group-real-name name) method nil nil)))