]> git.eshelyaron.com Git - emacs.git/commitdiff
(texinfo-pre-format-hook): New variable.
authorEli Zaretskii <eliz@gnu.org>
Sat, 1 Nov 2003 17:12:02 +0000 (17:12 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sat, 1 Nov 2003 17:12:02 +0000 (17:12 +0000)
(texinfo-format-region): Use it.
(texinfo-format-buffer-1): Ditto.

lisp/ChangeLog
lisp/textmodes/texinfmt.el

index 64a5b3f7a08f4e9d9078c8de6d20ad50dfe66629..9094e15a8b6852f704b96aba84fb828b682df519 100644 (file)
@@ -1,3 +1,9 @@
+2003-11-01  Christoph Wedler  <wedler@users.sourceforge.net>  (tiny change)
+
+       * textmodes/texinfmt.el (texinfo-pre-format-hook): New variable.
+       (texinfo-format-region): Use it.
+       (texinfo-format-buffer-1): Ditto.
+
 2003-11-01  Alan Mackenzie  <acm@muc.de>
 
        Changes to allow scrolling whilst in isearch mode:
index 3b135e1a081a34fb8e9fcbf468459ab56acc972c..3e79d18a1089e3d266f8aa7b9112f01c8cae9e31 100644 (file)
@@ -134,6 +134,11 @@ Info-split to do these manually."
 (defvar texinfo-region-buffer-name "*Info Region*"
   "*Name of the temporary buffer used by \\[texinfo-format-region].")
 
+(defvar texinfo-pre-format-hook nil
+  "Hook called before the conversion of the Texinfo file to Info format.
+The functions on this hook are called with argument BUFFER, the buffer
+containing the Texinfo file.")
+
 ;; These come from tex-mode.el.
 (defvar tex-start-of-header)
 (defvar tex-end-of-header)
@@ -215,6 +220,7 @@ converted to Info is stored in a temporary buffer."
      input-buffer
      (max region-beginning header-end)
      region-end)
+    (run-hook-with-args 'texinfo-pre-format-hook input-buffer)
     ;; Make sure region ends in a newline.
     (or (= (preceding-char) ?\n)
         (insert "\n"))
@@ -381,6 +387,7 @@ if large.  You can use Info-split to do this manually."
     (set-syntax-table texinfo-format-syntax-table)
 
     (insert-buffer-substring input-buffer)
+    (run-hook-with-args 'texinfo-pre-format-hook input-buffer)
     (message "Converting %s to Info format..." (buffer-name input-buffer))
 
     ;; Insert @include files so `texinfo-raise-lower-sections' can