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: Combining (and obsoleting) isearch-regexp and isearch-word into a new var Date: Wed, 29 Jul 2015 00:48:16 +0100 Message-ID: Reply-To: bruce.connor.am@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1438127314 16120 80.91.229.3 (28 Jul 2015 23:48:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Jul 2015 23:48:34 +0000 (UTC) To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 29 01:48:33 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 1ZKEbn-0001Tn-QH for ged-emacs-devel@m.gmane.org; Wed, 29 Jul 2015 01:48:31 +0200 Original-Received: from localhost ([::1]:32841 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKEbn-0001gy-14 for ged-emacs-devel@m.gmane.org; Tue, 28 Jul 2015 19:48:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57757) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKEba-0001fi-PZ for emacs-devel@gnu.org; Tue, 28 Jul 2015 19:48:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZKEbZ-0003iv-Ko for emacs-devel@gnu.org; Tue, 28 Jul 2015 19:48:18 -0400 Original-Received: from mail-la0-x234.google.com ([2a00:1450:4010:c03::234]:35387) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKEbZ-0003ii-CD for emacs-devel@gnu.org; Tue, 28 Jul 2015 19:48:17 -0400 Original-Received: by lahh5 with SMTP id h5so78037937lah.2 for ; Tue, 28 Jul 2015 16:48:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:date:message-id:subject:from:to :content-type; bh=0OvNGCYlJtvEB/5/3uHGZEK2aXWXkuJd6i1GNxkx5CY=; b=lirm6OSufZl2AE8dcKSw4A+tisqWWYJMjeZrXS4/zKONEXiAPsaXTxN78eQYXxfeaD T3JQVj4emgvkInkVjA4ae9HehyeeJjOVm9EkRToLagWJ2SGPtBGLnQJY9HjDe+8hv8cx lV2b9Q5IfgZ7Upc3SXEA/I7FEQAQqGVWaviq3WhUMCp3gRZBdtYhCjNK9bwgP/eg02C7 B+7bFFVyqr2CfpR34vj5Q/u3T6ffxaDAgUL19f2dzZ4pnaP8C4Eeq/60erSkPdX8f/aJ 44A2z/rNqm9FB5yXwsohZp2tq12sy6maQfMb7fNZMATYYrTutwCxZSHarzvcdfP2NCpB HsGg== X-Received: by 10.112.126.101 with SMTP id mx5mr36284850lbb.35.1438127296499; Tue, 28 Jul 2015 16:48:16 -0700 (PDT) Original-Received: by 10.25.134.139 with HTTP; Tue, 28 Jul 2015 16:48:16 -0700 (PDT) X-Google-Sender-Auth: Cy-chlVgLYV5A9w58iYE2KOrTGI X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::234 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:188143 Archived-At: Currently `isearch-word' is a variable that can be a boolean (indicating if word searching is on or off) or it can hold a function (which is called on the search string before passing it to a regexp search). Both symbol-searching and char-folding are implemented as function values of this variable, while word-searching is implemented as a boolean value even though it could just as well be another function value. In addition to that, we also have regexp-searching, which *could* be just another function value for that variable (the #'identity), but instead it's implemented as a whole new boolean variable (`isearch-regexp'). All of these 4 functionalities are mutually exclusive, so it makes sense for them to be implemented as different values of a single variable in a consisten manner (all functions). I'd like to propose that the `isearch-word' variable be aliased to `isearch-special' (or something like this), and that its use as a boolean also be obsoleted. Then also obsolete `isearch-regexp', which is just a special case of `isearch-special'. If we don't want an extra var, then we can just use one of the existing vars for this purpose and obsolete the other. I'd just like to condense it all in a single variable and obsolete the boolean usage.