134 |
(defvar texinfo-region-buffer-name "*Info Region*" |
(defvar texinfo-region-buffer-name "*Info Region*" |
135 |
"*Name of the temporary buffer used by \\[texinfo-format-region].") |
"*Name of the temporary buffer used by \\[texinfo-format-region].") |
136 |
|
|
137 |
|
(defvar texinfo-pre-format-hook nil |
138 |
|
"Hook called before the conversion of the Texinfo file to Info format. |
139 |
|
The functions on this hook are called with argument BUFFER, the buffer |
140 |
|
containing the Texinfo file.") |
141 |
|
|
142 |
;; These come from tex-mode.el. |
;; These come from tex-mode.el. |
143 |
(defvar tex-start-of-header) |
(defvar tex-start-of-header) |
144 |
(defvar tex-end-of-header) |
(defvar tex-end-of-header) |
220 |
input-buffer |
input-buffer |
221 |
(max region-beginning header-end) |
(max region-beginning header-end) |
222 |
region-end) |
region-end) |
223 |
|
(run-hook-with-args 'texinfo-pre-format-hook input-buffer) |
224 |
;; Make sure region ends in a newline. |
;; Make sure region ends in a newline. |
225 |
(or (= (preceding-char) ?\n) |
(or (= (preceding-char) ?\n) |
226 |
(insert "\n")) |
(insert "\n")) |
387 |
(set-syntax-table texinfo-format-syntax-table) |
(set-syntax-table texinfo-format-syntax-table) |
388 |
|
|
389 |
(insert-buffer-substring input-buffer) |
(insert-buffer-substring input-buffer) |
390 |
|
(run-hook-with-args 'texinfo-pre-format-hook input-buffer) |
391 |
(message "Converting %s to Info format..." (buffer-name input-buffer)) |
(message "Converting %s to Info format..." (buffer-name input-buffer)) |
392 |
|
|
393 |
;; Insert @include files so `texinfo-raise-lower-sections' can |
;; Insert @include files so `texinfo-raise-lower-sections' can |