From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: Make highlight-symbol.el perfect? Date: Thu, 11 Apr 2013 11:45:29 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1365701899 25060 80.91.229.3 (11 Apr 2013 17:38:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 11 Apr 2013 17:38:19 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Apr 11 19:38:23 2013 Return-path: Envelope-to: geh-help-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 1UQLRz-0001t8-Uj for geh-help-gnu-emacs@m.gmane.org; Thu, 11 Apr 2013 19:38:20 +0200 Original-Received: from localhost ([::1]:49243 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQK8I-00037P-6Q for geh-help-gnu-emacs@m.gmane.org; Thu, 11 Apr 2013 12:13:54 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35693) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQJgz-0004Pz-3o for help-gnu-emacs@gnu.org; Thu, 11 Apr 2013 11:45:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UQJgw-0002qO-8t for help-gnu-emacs@gnu.org; Thu, 11 Apr 2013 11:45:41 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:42899) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQJgw-0002q9-1j for help-gnu-emacs@gnu.org; Thu, 11 Apr 2013 11:45:38 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UQJgu-0000yJ-72 for help-gnu-emacs@gnu.org; Thu, 11 Apr 2013 17:45:36 +0200 Original-Received: from 69-196-129-29.dsl.teksavvy.com ([69.196.129.29]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 11 Apr 2013 17:45:36 +0200 Original-Received: from monnier by 69-196-129-29.dsl.teksavvy.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 11 Apr 2013 17:45:36 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 13 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 69-196-129-29.dsl.teksavvy.com User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:b0yRoh5o2Xa0BpozVGl4TSnERr4= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:90105 Archived-At: > face on matched regions of the buffer. It should just add overlays. The > code should get simpler, including removing the overlays when you > un-highlight matches, because that's just `(mapcat #'delete-overlay > existing-overlays)`. Better would be to add "text-property planes". So font-lock could add&remove its `face' property and highlight-symbol could add&remove its own `face' property without conflict. I think this would make a nice GSoC project. Stefan