From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Artur Malabarba Newsgroups: gmane.emacs.devel Subject: Re: Please add comments to isearch.el Date: Tue, 15 Dec 2015 10:26:49 +0000 Message-ID: References: <83fuzoojcn.fsf@gnu.org> <83poyd8kta.fsf@gnu.org> <20151211121617.GA3351@acm.fritz.box> <83y4d16txk.fsf@gnu.org> <83lh916jpp.fsf@gnu.org> <871tasbnhh.fsf@mail.linkov.net> <83d1uc6sdq.fsf@gnu.org> <874mfntfgq.fsf@mail.linkov.net> <8737v5ubog.fsf@mail.linkov.net> <876100egi4.fsf@mail.linkov.net> Reply-To: bruce.connor.am@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1450175227 1767 80.91.229.3 (15 Dec 2015 10:27:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 15 Dec 2015 10:27:07 +0000 (UTC) Cc: Alan Mackenzie , Eli Zaretskii , emacs-devel To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 15 11:26:59 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a8mor-0005h9-Rl for ged-emacs-devel@m.gmane.org; Tue, 15 Dec 2015 11:26:58 +0100 Original-Received: from localhost ([::1]:36090 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8moq-0001gF-Rd for ged-emacs-devel@m.gmane.org; Tue, 15 Dec 2015 05:26:57 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56596) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8mon-0001f3-IQ for emacs-devel@gnu.org; Tue, 15 Dec 2015 05:26:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a8mom-00041o-L6 for emacs-devel@gnu.org; Tue, 15 Dec 2015 05:26:53 -0500 Original-Received: from mail-lb0-x22b.google.com ([2a00:1450:4010:c04::22b]:36417) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8mok-00040a-Vf; Tue, 15 Dec 2015 05:26:51 -0500 Original-Received: by mail-lb0-x22b.google.com with SMTP id lt2so2676545lbb.3; Tue, 15 Dec 2015 02:26:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:content-transfer-encoding; bh=x67g/uJJwvvPaJTwjW3d2vIq3jVbvBkhSw5OKwY3YEU=; b=jXuHvtk2jp0bLCBV1uOTP13BBJIMPuOX503lYQ8uqT3E7F1OUqgXzMjBelvOKK6DXw l05LLJl4wzsA6ANwnp/WDkeYyopv4q0AP8Esuxwfz4drtxcqwf5xPvRL31WyJKIVcBLD +sda5fTYhnxBUJ35p/9MoA3yWKyL1mWj3xMcBdjB+H16BT2PaIJPA965OLcGgJcHif2R wCS8j2jtGI0GQvb/kcO8e8ZL9Dgpj/oW/1/IolQnxeazNiFHRxgk/Tx76ifCggPPqJov Y2QWmcM7OyTChivj8e6bGha1zow7PYZo8t45VGzk5+DncFIz5aAq4ApE81WGZEpwofxH zsiA== X-Received: by 10.112.161.33 with SMTP id xp1mr15176152lbb.141.1450175209618; Tue, 15 Dec 2015 02:26:49 -0800 (PST) Original-Received: by 10.112.202.99 with HTTP; Tue, 15 Dec 2015 02:26:49 -0800 (PST) In-Reply-To: <876100egi4.fsf@mail.linkov.net> X-Google-Sender-Auth: GtOJ_Ksycd_PthYWzOg4Tzmg1V0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c04::22b X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:196296 Archived-At: 2015-12-14 23:51 GMT+00:00 Juri Linkov : >>> Ohh, and I'd add also search-default-regexp-mode -> search-default-rege= xp-function >>> that currently causes confusion due to its similarity with isearch-rege= xp-function. >> >> The thing is that this variable is not necessarily a function, it can be >> nil or t too. I'd rather reserve the suffix "-function" for variables th= at >> necessarily hold a function. > > A variable with the suffix "-function" is allowed to have a nil value, > but not t, indeed. Not all do. None of the font-lock-*-function variables allow a nil value. And I'd rather push in that direction. One of the advantages of -function variables is that you can use `add-function' on them, which is a powerful and convenient interface. Allowing the -function variable to have a nil value prevents the easy use of `add-function'. > What about using a function instead of t, maybe =E2=80=98identity=E2=80= =99? I've mentioned here before that I'd like to obsolete `isearch-regexp' and simply use `identity' for the regexp-function in that case. However, the problem is that doing a regexp isearch is not exactly the same as doing an isearch with `identity' as the regexp function. Isearch has some special handlings for regexp input, that only kick in if `isearch-regexp' is non-nil. If we generalize these handlings a bit so they play nice with isearch-regexp-function, then we can obsolete isearch-regexp. If we go that route, then we might as well use `regexp-quote' instead of the nil value too.