Function: makeinfo-buffer
makeinfo-buffer is an autoloaded, interactive and byte-compiled
function defined in makeinfo.el.gz.
Signature
(makeinfo-buffer)
Documentation
Make Info file from current buffer.
Use the C-x ` (next-error) command to move to the next error
(if there are errors).
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/textmodes/makeinfo.el.gz
;;;###autoload
(defun makeinfo-buffer ()
"Make Info file from current buffer.
Use the \\[next-error] command to move to the next error
\(if there are errors)."
(interactive)
(cond ((null buffer-file-name)
(error "Buffer not visiting any file"))
((buffer-modified-p)
(if (y-or-n-p "Buffer modified; do you want to save it? ")
(save-buffer))))
;; Find and record the Info filename,
;; or else explain that a filename is needed.
(save-excursion
(goto-char (point-min))
(let ((search-end (save-excursion (forward-line 100) (point))))
(if (re-search-forward
"^@setfilename[ \t]+\\([^ \t\n]+\\)[ \t]*"
search-end t)
(setq makeinfo-output-file-name
(expand-file-name
(buffer-substring (match-beginning 1) (match-end 1))))
(error
"The texinfo file needs a line saying: @setfilename <name>"))))
(setq makeinfo-output-node-name (makeinfo-current-node))
(save-excursion
(let ((default-directory (file-name-directory buffer-file-name)))
(makeinfo-compile
(concat makeinfo-run-command " " makeinfo-options
" " (file-name-nondirectory buffer-file-name))
nil
'makeinfo-compilation-sentinel-buffer))))