From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#11095: [PATCH] Re: bug#11095: 24.0.94; hi-lock-face-buffer/unhighlight-regexp': Augment? Date: Tue, 04 Dec 2012 16:14:41 -0500 Message-ID: References: <81d37z271c.fsf@gmail.com> <87626i2i4r.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1354655702 13063 80.91.229.3 (4 Dec 2012 21:15:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Dec 2012 21:15:02 +0000 (UTC) Cc: 11095@debbugs.gnu.org To: Jambunathan K Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Dec 04 22:15:15 2012 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 1Tfzpj-0000Lu-22 for geb-bug-gnu-emacs@m.gmane.org; Tue, 04 Dec 2012 22:15:15 +0100 Original-Received: from localhost ([::1]:58242 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TfzpX-0005zt-5c for geb-bug-gnu-emacs@m.gmane.org; Tue, 04 Dec 2012 16:15:03 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:33908) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TfzpU-0005zc-Dm for bug-gnu-emacs@gnu.org; Tue, 04 Dec 2012 16:15:01 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TfzpT-0007nb-6m for bug-gnu-emacs@gnu.org; Tue, 04 Dec 2012 16:15:00 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43438) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TfzpT-0007nQ-3b for bug-gnu-emacs@gnu.org; Tue, 04 Dec 2012 16:14:59 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TfzpW-0004qn-0i for bug-gnu-emacs@gnu.org; Tue, 04 Dec 2012 16:15:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 04 Dec 2012 21:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11095 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 11095-submit@debbugs.gnu.org id=B11095.135465568918618 (code B ref 11095); Tue, 04 Dec 2012 21:15:01 +0000 Original-Received: (at 11095) by debbugs.gnu.org; 4 Dec 2012 21:14:49 +0000 Original-Received: from localhost ([127.0.0.1]:53689 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TfzpI-0004qF-K2 for submit@debbugs.gnu.org; Tue, 04 Dec 2012 16:14:49 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:3540) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TfzpG-0004q7-KS for 11095@debbugs.gnu.org; Tue, 04 Dec 2012 16:14:47 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0FAG6Zu09soXOY/2dsb2JhbABEsEiDSYEIghYBBVYjEAs0EhQYDSQuh3O6CZBEA4hCmnGBWIMH X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="209083699" Original-Received: from 108-161-115-152.dsl.teksavvy.com (HELO pastel.home) ([108.161.115.152]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 04 Dec 2012 16:14:42 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 0D4D158C73; Tue, 4 Dec 2012 16:14:42 -0500 (EST) In-Reply-To: <87626i2i4r.fsf@gmail.com> (Jambunathan K.'s message of "Thu, 11 Oct 2012 01:51:08 +0530") 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:67920 Archived-At: > -(defface hi-yellow > +(defface hi-lock-1 I'm not sure it's an improvement. When choosing a face in hi-lock-face-buffer, "hi-lock-1" doesn't speak much to me contrary to "hi-yellow". So, could you expand on your motivations for this change, so we can find another solution that satisfies your use case and mine? I've installed your second patch (the hi-lock-auto-select-face, tho using `pop' to simplify the code), but when hi-lock-auto-select-face is t the user can't specify a face any more, which I think is too drastic, which should provide a C-u override or something. I also installed the 4th patch (the defaults for unhighlight), tho I removed the docstring change (we usually don't document which default is used in minibuffer arguments). Also I moved your code to a separate function, to clarify the code. Furthermore I did not install your change to the completion table so only the regexps that match at point get completed. Instead the list of regexps is passed as a list of defaults. BTW the hi-lock-auto-select-face should be fixed to just hash-cons (aka uniquify) regexps, so you don't need your maphash loop to recover the regexp from the unique "serialized" number. I also installed the 5th patch (the "unhighlight all") tho I'm not yet sure this is the right interface. OT1H I think it would be nicer to provide this "all" as one of the choices in the minibuffer, but OTOH I can't think of any way to do that which is not hideously hackish. As for the 3rd patch, I haven't installed it yet because I'm worried that (format "\\_<%s\\_>" (regexp-quote tag)) may sometimes fail to match `tag', so I think it needs some additional sanity check. Stefan