texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: @r and @t in def line


From: Gavin D. Smith
Subject: branch master updated: @r and @t in def line
Date: Fri, 29 Jul 2022 11:36:28 -0400

This is an automated email from the git hooks/post-receive script.

gavin pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new 8d6ed059da @r and @t in def line
8d6ed059da is described below

commit 8d6ed059da7b53a4e80ca4a0b3d193219cb09aeb
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Fri Jul 29 16:35:12 2022 +0100

    @r and @t in def line
    
    * doc/texinfo.tex (\r, \t): Cancel special definitions made
    for ( ) [ ] & on def line.
    * doc/texinfo-tex-test.texi (Definitions): Add example.
---
 ChangeLog                 |  8 ++++++++
 doc/texinfo-tex-test.texi |  6 ++++++
 doc/texinfo.tex           | 16 +++++++++-------
 3 files changed, 23 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 5eb702410e..cd9677556e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2022-07-29  Gavin Smith  <gavinsmith0123@gmail.com>
+
+       @r and @t in def line
+
+       * doc/texinfo.tex (\r, \t): Cancel special definitions made
+       for ( ) [ ] & on def line.
+       * doc/texinfo-tex-test.texi (Definitions): Add example.
+
 2022-07-29  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/Convert/LaTeX.pm (_convert): when ignoring
diff --git a/doc/texinfo-tex-test.texi b/doc/texinfo-tex-test.texi
index 745b88b0e3..a6970b159d 100644
--- a/doc/texinfo-tex-test.texi
+++ b/doc/texinfo-tex-test.texi
@@ -1762,6 +1762,12 @@ Check explicit bold with @code{@@r@{@@b@{...} on def line
 hello 
 @end defun
 
+Check typewriter [ and ] on def line with @code{@@t}:
+
+@defun foo @t{\f[}font@t{]}
+Do something depending on @var{font}.
+@end defun
+
 
 
 
diff --git a/doc/texinfo.tex b/doc/texinfo.tex
index 23d56da1ad..e626e19998 100644
--- a/doc/texinfo.tex
+++ b/doc/texinfo.tex
@@ -3,7 +3,7 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2022-07-29.14}
+\def\texinfoversion{2022-07-29.16}
 %
 % Copyright 1985, 1986, 1988, 1990-2022 Free Software Foundation, Inc.
 %
@@ -2818,7 +2818,7 @@ end
 \let\emph=\smartitalic
 
 % Explicit font changes: @r, @sc, undocumented @ii.
-\def\r#1{{\stopmagicamp\rm #1}} % roman font, used for code comment
+\def\r#1{{\defcharsdefault\rm #1}} % roman font, used for code comment
 \def\sc#1{{\smallcaps#1}}       % smallcaps font
 \def\ii#1{{\it #1}}             % italic font
 
@@ -2856,7 +2856,7 @@ end
 
 % @t, explicit typewriter.
 \def\t#1{%
-  {\tt \plainfrenchspacing #1}%
+  {\tt \defcharsdefault \plainfrenchspacing #1}%
   \null
 }
 
@@ -7881,13 +7881,15 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 % so TeX would otherwise complain about undefined control sequence.
 {
   \activeparens
-  \global\let(=\lparen \global\let)=\rparen
-  \global\let[=\lbrack \global\let]=\rbrack
-  \global\let& = \&
+  \gdef\defcharsdefault{%
+    \let(=\lparen \let)=\rparen
+    \let[=\lbrack \let]=\rbrack
+    \let& = \&%
+  }
+  \globaldefs=1 \defcharsdefault
 
   \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb}
   \gdef\magicamp{\let&=\amprm}
-  \gdef\stopmagicamp{\let&=\&}
 }
 \let\ampchar\&
 



reply via email to

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