From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: regular expressions that match nothing Date: Fri, 17 May 2019 08:53:13 -0400 Message-ID: References: <7a6b23f52418b093a4cf7a6db4306cf425533249.camel@acm.org> <20190515194129.GA4103@ACM> <39a146e4709b532db817abc47f17799b@webmail.orcon.net.nz> <20190517094301.GA5011@ACM> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="86965"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 17 14:54:15 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hRcNF-000MKs-Jz for ged-emacs-devel@m.gmane.org; Fri, 17 May 2019 14:54:09 +0200 Original-Received: from localhost ([127.0.0.1]:48165 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRcNE-0005hM-7f for ged-emacs-devel@m.gmane.org; Fri, 17 May 2019 08:54:08 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:51438) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRcMY-0005hH-V6 for emacs-devel@gnu.org; Fri, 17 May 2019 08:53:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hRcMX-0001Ic-Qr for emacs-devel@gnu.org; Fri, 17 May 2019 08:53:26 -0400 Original-Received: from [195.159.176.226] (port=55166 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hRcMX-0001Hl-Ju for emacs-devel@gnu.org; Fri, 17 May 2019 08:53:25 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1hRcMU-000LL2-GH for emacs-devel@gnu.org; Fri, 17 May 2019 14:53:22 +0200 X-Injected-Via-Gmane: http://gmane.org/ Cancel-Lock: sha1:SgQi9fT4DaOfCTEUJ5jACumWzlQ= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:236664 Archived-At: > similar long symbols were introduced this would be a pain - a minor pain > yes, but a pain nevertheless. While it's long, it's shorter than the cryptic regexp itself if you take into account the comment that had to accompany the regexp to explain it and that now is made unnecessary because the name is self-explanatory. > Why has nobody commented on my suggestion of using re- rather than > regexp- as the prefix? We already have re-search-forward. I recommended "regexp-". I like brevity and plead guilty of preferring "-re" (over "-regexp") suffixes in variable names. Yet I recommended "regexp-" because it seems to be what Elisp is standardizing on (e.g. compare `C-h o re- TAB` and `C-h o regexp- TAB`; or look at the number of variables that were renamed from "-re" to "-regexp") and I think uniformity and understandability here trumps saving a few chars. Especially because this is not used very often at all. Of course, feel free to define `c-nomatch` ;-) My own favorite is -∅ which I believe is the shortest of all the suggestions I've seen pass by; yet I don't think we want to go that way. Clearly, this is prime bikeshedding material, so I'll just support the code author's choice because he was the one who finally did it, after all these years where it's been mentioned as something we could/should do. Stefan