[Top][All Lists]

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

Re: Emacs regexp scan (Sep 29)

From: Paul Eggert
Subject: Re: Emacs regexp scan (Sep 29)
Date: Sat, 5 Oct 2019 12:19:16 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

On 10/5/19 3:59 AM, Eli Zaretskii wrote:
The text in the manual says:

   To include a ‘-’, write ‘-’ as the first or last character of the
   character alternative, or as the upper bound of a range.

That quote is from an older version of the manual, which was amended after some discussion on this very point. The manual now distinguishes more carefully between what's recommended, and what's valid even though it may cause confusion. The manual now recommends putting literal '-' at the end and says that putting it elsewhere is not the best style even when it is valid.

I take your point about not modifying Emacs just for the fun of it. However, when bugs are being fixed, it's OK if the person doing the fix takes the opportunity to make nearby code clearer, as the added clarity can increase the probability of the fix being correct and can simplify later maintenance. Although one can go overboard in the process and it's sometimes better to leave code alone even when it is confusing, generally speaking we should delegate these minor decisions to whoever's actually doing the work, in order to encourage bug-fixers rather than throw cold water on them.

reply via email to

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