[Top][All Lists]

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

Re: Scan of Emacs regexp mistakes

From: Mattias Engdegård
Subject: Re: Scan of Emacs regexp mistakes
Date: Tue, 14 Apr 2020 12:52:24 +0200

5 apr. 2020 kl. 14.30 skrev Mattias Engdegård <address@hidden>:

> A new scan of irregularities and errors in regexps in the Emacs tree, using 
> an experimental version of relint/xr.

The filename-matching regexp glitches were fixed separately by the attached 
patch, pushed to emacs-27, since these were actual or latent bugs.

Several different regexps were used for matching anything but "." and "..", all 
wrong. These were all replaced with the concise and correct (rx (or (not ".") 
"...")), meaning "[^.]\\|\\.\\.\\." for traditionalists.

It is quite clear that returning . and .. from directory-files etc was a 
mistake; they are practically never useful but requires callers to take steps 
to filter them out. It's likely that nothing would break if we stopped 
returning those entries, but that is not a change that I'm proposing right now.

Attachment: fix-file-matching-regexps.patch
Description: Binary data

reply via email to

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