bug-texinfo
[Top][All Lists]
Advanced

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

Re: texi2dvi is a bash script, not a Bourne shell script


From: Gavin Smith
Subject: Re: texi2dvi is a bash script, not a Bourne shell script
Date: Thu, 2 Jul 2015 00:33:40 +0100

On 1 July 2015 at 21:43, Gavin Smith <address@hidden> wrote:
> But we may as well rip out
> the uses of local anyway

Here's a patch to do this.

Because of the size of this patch, and the corresponding likelihood of
something being wrong, it is worth explaining my method for creating
this patch. This could help others to review it.

I use the Vim editor. I searched the file for instances of "local".
When I found a local variable, I positioned the cursor in the variable
name and searched for other usages using the * and # commands.
Sometimes I renamed a variable, using search and replace within a
visual selection (\zs and \ze are useful for adding a prefix to a
variable name). Sometimes I renamed a variable even when it wasn't
found elsewhere, but it was too short and too easy to reuse somewhere
else. Sometimes, I initialized variables to an empty string where
"local" might have done that and it was used.

Then I reviewed the changes with "svn diff -x -p | less". I looked at
the functions I changed and tried to find recursive calls, direct or
indirect. Many functions didn't call other functions, which were easy.
Other functions were only called from one other place, which in turn
was only called from one other place. A common end point for calls was
the "compile" function, which is only called from the top level of the
script. That's hoping that function names were not hidden inside a
variable somewhere and called that way.

Because of my tired eyes, I will not commit this change until tomorrow
at the earliest. Moreover, I have not tested it at all.

Attachment: texi2dvi-remove-local.diff
Description: Text document


reply via email to

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