texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: Initial @newdef implementation


From: Gavin D. Smith
Subject: branch master updated: Initial @newdef implementation
Date: Sat, 11 Feb 2023 08:09:44 -0500

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 654ee2ff6b Initial @newdef implementation
654ee2ff6b is described below

commit 654ee2ff6b69fc5ced63af8b9631d0b4dbab2e1b
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Sat Feb 11 13:03:51 2023 +0000

    Initial @newdef implementation
    
    * doc/texinfo.tex (@newdef): Implement @newdef.  Syntax is subject
    to change.
---
 ChangeLog       |  7 +++++++
 doc/texinfo.tex | 17 ++++++++++++++++-
 2 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 68c7807131..369c73a468 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2023-02-11  Gavin Smith <gavinsmith0123@gmail.com>
+
+       Initial @newdef implementation
+
+       * doc/texinfo.tex (@newdef): Implement @newdef.  Syntax is subject
+       to change.
+
 2023-02-11  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Makefile.tres, tp/t/60macro.t: add
diff --git a/doc/texinfo.tex b/doc/texinfo.tex
index 3148068f66..6efbafd777 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{2023-02-11.02}
+\def\texinfoversion{2023-02-11.13}
 %
 % Copyright 1985, 1986, 1988, 1990-2023 Free Software Foundation, Inc.
 %
@@ -7596,6 +7596,21 @@ might help (with 'rm \jobname.?? \jobname.??s')%
   \parseargusing\activeparens{\printdefunline\deflineheader}%
 }
 
+% user-defined def commands
+% @newdef @COMMAND = CATEGORY INDEX
+% use {} for INDEX if no index entry should be made
+\parseargdef\newdef{%
+  \donewdef#1\donewdef
+}
+\def\donewdef#1= #2 #3\donewdef{%
+  \def\idx{#3}%
+  \ifx\empty\idx
+    \def#1{\deflinex #2 }%
+  \else
+    \def#1##1 {\doind{#3}{\code{##1}}\deflinex #2 {##1} }%
+  \fi
+}
+
 % \makedefun{deffoo} (\deffooheader parameters) { (\deffooheader expansion) }
 %
 % Define \deffoo, \deffoox  \Edeffoo and \deffooheader.



reply via email to

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