From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [nongnu] elpa/helm 07dacfe2e2 08/11: Prefer string-match-p over string-suffix-p Date: Thu, 14 Sep 2023 16:13:22 +0300 Message-ID: <83ttrwlwy5.fsf@gnu.org> References: <169468919249.10884.8856179202519044902@vcs2.savannah.gnu.org> <20230914105954.20BD1C051D0@vcs2.savannah.gnu.org> <875y4dosa4.fsf@posteo.net> <83wmwslxlc.fsf@gnu.org> <87wmwsoqe0.fsf@posteo.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7636"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, thievol@posteo.net To: Philip Kaludercic Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Sep 14 15:14:25 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qgmAq-0001nE-SS for ged-emacs-devel@m.gmane-mx.org; Thu, 14 Sep 2023 15:14:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qgmA3-0006QM-80; Thu, 14 Sep 2023 09:13:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qgmA0-0006MO-Q2 for emacs-devel@gnu.org; Thu, 14 Sep 2023 09:13:33 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qgmA0-0007x8-GO; Thu, 14 Sep 2023 09:13:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=YMtXLxqM//gXtY7zEPV6ph9aKJsdV7DIIvE4VYTzAIs=; b=YOuSnIclJqMo BqIyXDh7HlzJpzsuM3z/Gb2gOKbkoq3PRVaSj+QH2q/z+z552qXlreI2FIOK7kip5ppOPrembAR8W 4EUcvdSd1yBX3Ivm/Mu/IiJYg6MLN9k44Wfiq2T6YTvWoa++5R9sfkU0U5oBhMPkcEo08TA/c+2TO TktUCPY3wK+Zm7Us7U1hZ8jVSSBHXI5Vpk9k+CvgncegIzOHVKoYboRMV6p3v8aCpbzvoIrEU/eXU GagqfsiqeIJdD9olh9724xXG7QtRtwjvUfA1RMG0nMwYtjtMLOrIVU7eBNwJFxRxEKfWEwsMPyKJv tPQi9pVGjNCzz5QapF/tRw==; In-Reply-To: <87wmwsoqe0.fsf@posteo.net> (message from Philip Kaludercic on Thu, 14 Sep 2023 13:06:47 +0000) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:310575 Archived-At: > From: Philip Kaludercic > Cc: emacs-devel@gnu.org, thievol@posteo.net > Date: Thu, 14 Sep 2023 13:06:47 +0000 > > Eli Zaretskii writes: > > > I think this change is simply incorrect: the first argument of > > string-suffix-p is not interpreted as a regexp, but as a simple > > literal string (the implementation uses compare-strings internally). > > But why is it incorrect? `string-suffix-p' is passed a string, while > `string-match-p' takes a regular expression, that might be too liberal > but should still match everything the previous check did -- or am I > missing something? Why do the change when string-suffix-p already ensures there's nothing in the second argument after the suffix?