unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [patch] texinfmt.el; new var `texinfo-pre-format-hook'
@ 2003-10-28 20:28 Wedler, Christoph
  0 siblings, 0 replies; only message in thread
From: Wedler, Christoph @ 2003-10-28 20:28 UTC (permalink / raw)
  Cc: 'Masayuki Ataka'

When people use M-x texinfo-format-buffer together with my package
X-Symbol (<http://x-symbol.sourceforge.net/>), X-Symbol doesn't have any
chance to do its encoding, i.e., converting characters to the
corresponding TeXinfo sequences (e.g., converting ä to @"a).

The following patch should fix this (it's vs 1.68, but should also work
vs the current head revision 1.70).


2003-05-19  Christoph Wedler  <wedler@users.sourceforge.net>

	* textmodes/texinfmt.el (texinfo-pre-format-hook): New variable.
	(texinfo-format-region): Use it.
	(texinfo-format-buffer-1): Ditto.


diff -c texinfmt.el.~1.68~ texinfmt.el
*** texinfmt.el.~1.68~	Mon May 19 21:51:57 2003
--- texinfmt.el	Mon May 19 21:51:57 2003
***************
*** 134,139 ****
--- 134,144 ----
  (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,220 ****
--- 220,226 ----
       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,386 ****
--- 387,393 ----
      (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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-10-28 20:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-28 20:28 [patch] texinfmt.el; new var `texinfo-pre-format-hook' Wedler, Christoph

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).