From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#11095: 24.0.94; hi-lock-face-buffer/unhighlight-regexp': Augment? Date: Fri, 12 Oct 2012 01:41:04 +0300 Organization: JURTA Message-ID: <87zk3s1vjz.fsf@mail.jurta.org> References: <81d37z271c.fsf@gmail.com> <87y5jcvjsx.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1349995463 2838 80.91.229.3 (11 Oct 2012 22:44:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 11 Oct 2012 22:44:23 +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 Fri Oct 12 00:44:30 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 1TMRUP-0001pf-RU for geb-bug-gnu-emacs@m.gmane.org; Fri, 12 Oct 2012 00:44:25 +0200 Original-Received: from localhost ([::1]:47278 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TMRUJ-0000tp-GQ for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 Oct 2012 18:44:19 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:41070) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TMRUG-0000tj-R1 for bug-gnu-emacs@gnu.org; Thu, 11 Oct 2012 18:44:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TMRUF-0007aF-NJ for bug-gnu-emacs@gnu.org; Thu, 11 Oct 2012 18:44:16 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58002) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TMRUF-0007a9-K4 for bug-gnu-emacs@gnu.org; Thu, 11 Oct 2012 18:44:15 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TMRUz-00073e-Mw for bug-gnu-emacs@gnu.org; Thu, 11 Oct 2012 18:45:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 Oct 2012 22:45: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: Original-Received: via spool by 11095-submit@debbugs.gnu.org id=B11095.134999548527096 (code B ref 11095); Thu, 11 Oct 2012 22:45:01 +0000 Original-Received: (at 11095) by debbugs.gnu.org; 11 Oct 2012 22:44:45 +0000 Original-Received: from localhost ([127.0.0.1]:40020 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TMRUh-00072y-Ql for submit@debbugs.gnu.org; Thu, 11 Oct 2012 18:44:44 -0400 Original-Received: from ps18281.dreamhost.com ([69.163.218.105]:44786 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TMRUe-00072q-LV for 11095@debbugs.gnu.org; Thu, 11 Oct 2012 18:44:42 -0400 Original-Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 52B666FA02D; Thu, 11 Oct 2012 15:43:52 -0700 (PDT) In-Reply-To: <87y5jcvjsx.fsf@gmail.com> (Jambunathan K.'s message of "Fri, 12 Oct 2012 01:54:30 +0530") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (x86_64-pc-linux-gnu) 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 (newer, 2) 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:65501 Archived-At: > The patch allows highlighting of tag at point. (Note that for all > practical purposes, tag at point is the symbol at point.) See > Part_I/Item-2 below for a usecase. > [...] > + (cond ((not tag) "") > + ((eq tagf 'find-tag-default) > + (format "\\_<%s\\_>" (regexp-quote tag))) > [...] >> As a programmer, I use highlighting to trace variable dependencies >> within a function. For example, in the example below, after >> highlighting the variables in __different__ faces, I will come to the >> conclusion that "a" depends on "d" and "tmp". >> >> c = d; >> b = c + tmp; >> a = b; >> >> And I use this very often to track variables and how they get their >> values from. >> >> If I were to use the default Emacs provided behaviour then I would >> have to press M-n multiple times as I highlight more and more >> symbols. (Typically I have 3-5 symbols highlighted before I turn off >> highlighting.) Would you agree that a better way to implement your proposal is to add a new command to hi-lock.el with a name like `highlight-symbol'? I mean there are already such hi-lock commands as: 1. highlight-lines-matching-regexp (that corresponds to occur) 2. highlight-regexp (that corresponds to isearch-forward-regexp) 3. highlight-phrase (that corresponds to isearch-forward-word) what is currently missing is this command: 4. highlight-symbol (that corresponds to isearch-forward-symbol) Then both highlight-phrase and highlight-symbol could use internally isearch functions that turn words and symbols into regexps and that will do the right thing using search-upper-case and search-whitespace-regexp.