From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jambunathan K Newsgroups: gmane.emacs.bugs Subject: bug#13687: /srv/bzr/emacs/trunk r111878: * lisp/replace.el(read-regexp): Let-bind `default' to the first Date: Sat, 09 Mar 2013 00:00:11 +0530 Message-ID: <8738w5n3rg.fsf@gmail.com> References: <877glsyecw.fsf@gmail.com> <87621cfhff.fsf@mail.jurta.org> <87zjykygjk.fsf@mail.jurta.org> <87vc92gi37.fsf@gmail.com> <1751CEB23B214A3AADCCFD9F007425DE@us.oracle.com> <87li9xer9u.fsf@mail.jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1362767503 9221 80.91.229.3 (8 Mar 2013 18:31:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 8 Mar 2013 18:31:43 +0000 (UTC) Cc: 13687@debbugs.gnu.org To: "Drew Adams" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 08 19:32:05 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1UE25N-0007Xe-1O for geb-bug-gnu-emacs@m.gmane.org; Fri, 08 Mar 2013 19:32:05 +0100 Original-Received: from localhost ([::1]:55358 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UE251-00026T-6U for geb-bug-gnu-emacs@m.gmane.org; Fri, 08 Mar 2013 13:31:43 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:54556) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UE24m-0001sB-QA for bug-gnu-emacs@gnu.org; Fri, 08 Mar 2013 13:31:34 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UE24h-0007EQ-Np for bug-gnu-emacs@gnu.org; Fri, 08 Mar 2013 13:31:28 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35738) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UE24h-0007Do-L1 for bug-gnu-emacs@gnu.org; Fri, 08 Mar 2013 13:31:23 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UE25J-00065E-MR for bug-gnu-emacs@gnu.org; Fri, 08 Mar 2013 13:32:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jambunathan K Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 08 Mar 2013 18:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13687 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13687-submit@debbugs.gnu.org id=B13687.136276746823320 (code B ref 13687); Fri, 08 Mar 2013 18:32:01 +0000 Original-Received: (at 13687) by debbugs.gnu.org; 8 Mar 2013 18:31:08 +0000 Original-Received: from localhost ([127.0.0.1]:39847 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UE24M-00063z-Jx for submit@debbugs.gnu.org; Fri, 08 Mar 2013 13:31:06 -0500 Original-Received: from mail-pb0-f50.google.com ([209.85.160.50]:39267) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UE24H-00063S-2q for 13687@debbugs.gnu.org; Fri, 08 Mar 2013 13:31:01 -0500 Original-Received: by mail-pb0-f50.google.com with SMTP id up1so1450913pbc.37 for <13687@debbugs.gnu.org>; Fri, 08 Mar 2013 10:30:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=DGIAlKiFay5zbJmomyBbU6GRXDl6Fsk6hAOt56d4FTE=; b=xj26/Q18k6LM+0W9gHUI9y7OAaZuuIdiEKc7hJaCZLVOa7Oy4qgaa+FFep605c9eKA J7LJltZdfW2M6VYgf/nK55kcdYu9xweR71X+xi2WGvgU6p/xpY2MkkbahtFB6MHvbXxe uvVA9bS6IJI1tWNZ+pnJuGGaOoJdN38P1ZE/hZ9gdfIQ6P2B6qvLmaTXXESv3pGyGNV/ gEcsPS8Z81xaEK4t1KpNqQkB1y5APQmjsGpx8DSgasyFTQT7BFeeV+nyyYqF8AB9Gc9o 0jrSPopoftBc8TC0+doKNZtEAAWf78XofQBz0DKvzIhEW0xHDnKXurn9xvX29haYVI06 tmPQ== X-Received: by 10.68.195.33 with SMTP id ib1mr4864360pbc.105.1362767412283; Fri, 08 Mar 2013 10:30:12 -0800 (PST) Original-Received: from debian-6.05 ([115.241.18.198]) by mx.google.com with ESMTPS id ri1sm6365698pbc.16.2013.03.08.10.30.08 (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Fri, 08 Mar 2013 10:30:11 -0800 (PST) In-Reply-To: (Drew Adams's message of "Fri, 8 Mar 2013 10:16:14 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:72237 Archived-At: "Drew Adams" writes: > E.g., in the code I cited, if a user does not want the same defaulting > behavior for commands `occur', `how-many', etc., she can set option > `search/replace-default-fn' to a function that distinguishes them > (e.g., using `this-command', as Jambunathan suggested). Interesting suggestion there. This makes me think that there is no need for multiple `hi-lock-read-regexp-defaults-function' and a separate `occur-read-regexp-defaults-function' etc. But a single `read-regexp-defaults-function' that cases on `this-command'. The function can return a symbol token like `t' for `this-command's which it doesn't want to meddle with but return nil or a regexp or list of regexps for commands it wants to insinuate. Is there any problem with this `read-regexp-defaults-function' approach?