Lines Matching defs:makeinfo

0 ;;; makeinfo.el --- run makeinfo conveniently
27 ;;; The Texinfo mode `makeinfo' related commands are:
29 ;; makeinfo-region to run makeinfo on the current region.
30 ;; makeinfo-buffer to run makeinfo on the current buffer, or
32 ;; kill-compilation to kill currently running makeinfo job
33 ;; makeinfo-recenter-makeinfo-buffer to redisplay *compilation* buffer
37 ;; makeinfo bindings
38 ; (define-key texinfo-mode-map "\C-c\C-m\C-r" 'makeinfo-region)
39 ; (define-key texinfo-mode-map "\C-c\C-m\C-b" 'makeinfo-buffer)
42 ; 'makeinfo-recenter-compilation-buffer)
47 ;;; Variables used by `makeinfo'
51 (defgroup makeinfo nil
52 "Run makeinfo conveniently"
56 (defcustom makeinfo-run-command "makeinfo"
57 "*Command used to run `makeinfo' subjob.
60 :group 'makeinfo)
62 (defcustom makeinfo-options "--fill-column=70"
63 "*String containing options for running `makeinfo'.
68 :group 'makeinfo)
72 (defvar makeinfo-compilation-process nil
73 "Process that runs `makeinfo'. Should start out nil.")
75 (defvar makeinfo-temp-file nil
76 "Temporary file name used for text being sent as input to `makeinfo'.")
78 (defvar makeinfo-output-file-name nil
79 "Info file name used for text output by `makeinfo'.")
83 ;;; The `makeinfo' function definitions
85 (defun makeinfo-region (region-beginning region-end)
89 apply to a temporary file, not the original; use the `makeinfo-buffer'
96 ;; Cannot use `let' for makeinfo-temp-file or
97 ;; makeinfo-output-file-name since `makeinfo-compilation-sentinel'
100 (setq makeinfo-temp-file
119 (setq makeinfo-output-file-name
142 makeinfo-temp-file nil nil)
154 makeinfo-temp-file nil nil))
160 makeinfo-temp-file t nil)
162 ;; Run the `makeinfo-compile' command in the *compilation* buffer
164 (makeinfo-compile
165 (concat makeinfo-run-command
167 makeinfo-options
169 makeinfo-temp-file)
170 "Use `makeinfo-buffer' to gain use of the `next-error' command"
173 ;;; Actually run makeinfo. COMMAND is the command to run.
176 (defun makeinfo-compile (command error-message parse-errors)
186 'makeinfo-compilation-sentinel)))
188 ;; Delete makeinfo-temp-file after processing is finished,
192 (defun makeinfo-compilation-sentinel (proc msg)
194 (if (and makeinfo-temp-file (file-exists-p makeinfo-temp-file))
195 (delete-file makeinfo-temp-file))
197 (if (get-file-buffer makeinfo-output-file-name)
198 (progn (set-buffer makeinfo-output-file-name)
200 (find-file makeinfo-output-file-name))
203 (defun makeinfo-buffer ()
224 (setq makeinfo-output-file-name
230 (makeinfo-compile
231 (concat makeinfo-run-command " " makeinfo-options
236 (defun makeinfo-recenter-compilation-buffer (linenum)
241 (let ((makeinfo-buffer (get-buffer "*compilation*"))
243 (if (null makeinfo-buffer)
245 (pop-to-buffer makeinfo-buffer)
246 (bury-buffer makeinfo-buffer)
255 (provide 'makeinfo)
257 ;;; makeinfo.el ends here