bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Within `@code`, `@-` and `@/` are handled the same


From: Werner LEMBERG
Subject: Re: Within `@code`, `@-` and `@/` are handled the same
Date: Thu, 15 Dec 2022 17:58:55 +0000 (UTC)

> Attached are two patches that fix both issues.  Note that the bug with
> no hyphenation in `@t` is at least 20 years old...

And here's a better fix for the `@t` issue.


    Werner
>From 7753a129ddafbc5ccdae62bb130620883764a526 Mon Sep 17 00:00:00 2001
From: Werner Lemberg <wl@gnu.org>
Date: Thu, 15 Dec 2022 18:28:00 +0100
Subject: [PATCH 1/2] texinfo.tex: Make `\restorehyphenation` actually work.

After leaving a group, `\font` is usually a different font.  Without this
patch, the action of `\nohyphenation` was never reset in that case.
---
 doc/texinfo.tex | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/doc/texinfo.tex b/doc/texinfo.tex
index dbd5166014..a083885b25 100644
--- a/doc/texinfo.tex
+++ b/doc/texinfo.tex
@@ -2821,8 +2821,11 @@ end
 % the end of a paragraph.  Restore normal hyphenation at the end of the
 % group within which \nohyphenation is presumably called.
 %
-\def\nohyphenation{\hyphenchar\font = -1  \aftergroup\restorehyphenation}
-\def\restorehyphenation{\hyphenchar\font = `- }
+\def\nohyphenation{%
+  \hyphenchar\font = -1
+  \aftergroup\restorehyphenation \expandafter\aftergroup\the\font}
+\def\restorehyphenation#1{%
+  \hyphenchar#1 = `- }
 
 \newif\iffrenchspacing
 \frenchspacingfalse
-- 
2.39.0


reply via email to

[Prev in Thread] Current Thread [Next in Thread]