Re: `@unmacro` regression

2024-02-09 Thread Gavin Smith
On Sun, Feb 04, 2024 at 04:18:27PM +, Werner LEMBERG wrote:
> Indeed, because it is not too an exotic feature.  In LilyPond, we have
> a bunch of smaller files that get included in a master document; every
> file comprises a section of the document and essentially starts with
> 
> ```
> @unmacro foo
> @macro foo
> ...
> @end macro
> ```
> 
> Doing this ensures that we can easily change the order of the sections
> if ever necessary, without the need to adjust the macro code.
> 
> > However, since the error message has existed in texinfo.tex for so
> > long I will leave it a few days to see if anybody has any other
> > commments on the matter.
> 
> OK.

Committed today and it will be updated on ftp.gnu.org shortly.



Re: `@unmacro` regression

2024-02-04 Thread Werner LEMBERG

>>You can undefine a macro FOO with ‘@unmacro FOO’.  It is not an
>>error to undefine a macro that is already undefined.  For
>>example:
>>
>>  @unmacro foo
>>
>> However, this doesn't work.
>
> I don't know if this is a regression as the code for this error
> message existed as far back as I could see in the git repository,
> back to 2002 (commit fc8e4fc5f364ca4f, 2002-09-03).  The text in the
> manual has also existed for a very long time (commit 16440098c622,
> 2002-08-25).

D'oh :-)

> It's odd that nobody seems to have noticed this before.

Indeed, because it is not too an exotic feature.  In LilyPond, we have
a bunch of smaller files that get included in a master document; every
file comprises a section of the document and essentially starts with

```
@unmacro foo
@macro foo
...
@end macro
```

Doing this ensures that we can easily change the order of the sections
if ever necessary, without the need to adjust the macro code.

> However, since the error message has existed in texinfo.tex for so
> long I will leave it a few days to see if anybody has any other
> commments on the matter.

OK.


Werner


Re: `@unmacro` regression

2024-02-02 Thread Gavin Smith
On Thu, Feb 01, 2024 at 12:37:29PM +, Werner LEMBERG wrote:
> 
> In the texinfo manual of version 7.1 I can find the following about
> `@unmacro`:
> 
> 
>You can undefine a macro FOO with ‘@unmacro FOO’.  It is not an
>error to undefine a macro that is already undefined.  For example:
> 
>  @unmacro foo
> 
> 
> However, this doesn't work.

I don't know if this is a regression as the code for this error message
existed as far back as I could see in the git repository, back to 2002
(commit fc8e4fc5f364ca4f, 2002-09-03).  The text in the manual has also
existed for a very long time (commit 16440098c622, 2002-08-25).  It's
odd that nobody seems to have noticed this before.

It does not appear to cause any error with texi2any.  It would be
straightforward to remove the error message from texinfo.tex, and resolve
the inconsistency with both texi2any and the documentation.  However, since
the error message has existed in texinfo.tex for so long I will leave it
a few days to see if anybody has any other commments on the matter.

> ./u.texi:3: Macro foo not defined.
> @\unmacro ...se @errmessage {Macro #1 not defined}
>   @fi 
> l.3 @unmacro foo
> ```
> 



`@unmacro` regression

2024-02-01 Thread Werner LEMBERG

In the texinfo manual of version 7.1 I can find the following about
`@unmacro`:


   You can undefine a macro FOO with ‘@unmacro FOO’.  It is not an
   error to undefine a macro that is already undefined.  For example:

 @unmacro foo


However, this doesn't work.  This input document

``` u.texi
\input texinfo

@unmacro foo

@bye
```

processed with `texi2pdf` aborts:

```
./u.texi:3: Macro foo not defined.
@\unmacro ...se @errmessage {Macro #1 not defined}
  @fi 
l.3 @unmacro foo
```


Werner