From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: can we please define a face for compile.el mouseover? Date: Tue, 15 Feb 2011 14:43:49 -0800 Message-ID: References: <834o85f5jv.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1297809919 7201 80.91.229.12 (15 Feb 2011 22:45:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 15 Feb 2011 22:45:19 +0000 (UTC) Cc: emacs-devel@gnu.org To: "'Eli Zaretskii'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 15 23:45:15 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PpTdw-0001CG-EU for ged-emacs-devel@m.gmane.org; Tue, 15 Feb 2011 23:45:12 +0100 Original-Received: from localhost ([127.0.0.1]:38134 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PpTdv-0001Wh-Kh for ged-emacs-devel@m.gmane.org; Tue, 15 Feb 2011 17:45:11 -0500 Original-Received: from [140.186.70.92] (port=56017 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PpTdo-0001WN-2j for emacs-devel@gnu.org; Tue, 15 Feb 2011 17:45:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PpTdl-0005yT-Er for emacs-devel@gnu.org; Tue, 15 Feb 2011 17:45:03 -0500 Original-Received: from rcsinet10.oracle.com ([148.87.113.121]:56470) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PpTdl-0005wc-9q; Tue, 15 Feb 2011 17:45:01 -0500 Original-Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p1FMivjA009107 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 15 Feb 2011 22:44:59 GMT Original-Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id p1FKgb44006990; Tue, 15 Feb 2011 22:44:53 GMT Original-Received: from abhmt010.oracle.com by acsmt354.oracle.com with ESMTP id 1057517501297809830; Tue, 15 Feb 2011 14:43:50 -0800 Original-Received: from dradamslap1 (/10.159.58.105) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 15 Feb 2011 14:43:50 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <834o85f5jv.fsf@gnu.org> Thread-Index: AcvNSH92c7GksPrnQ+qtvtmDREnT7AAEUU0Q X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994 X-Source-IP: acsmt355.oracle.com [141.146.40.155] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090205.4D5B01E8.007A:SCFMA4539814,ss=1,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 148.87.113.121 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:136079 Archived-At: > Is there any code in Emacs that does _not_ use `highlight' for > mouse-face? Yes. Didn't I mention face `mode-line-highlight' explicitly? > If not (or if the other cases are a very small minority), this should > probably be fixed for Emacs in general, not just in compile.el. IMO, it should not be fixed by imposing one single mouseover face for all of Emacs. That would only let you customize it one way for all contexts. That would make it impossible to customize different faces for the different contexts (duh). Why force users to use the same face for mode-line and grep mouseover highlighting? Most mouseover highlighting is for short sections of text such as names. Some mouseover highlighting is for things like buttons - and Emacs already uses different faces here (in some cases hard-coded - see `mpc-volume-widget' for instance; in other cases, such as the mode line, customizable). And some mouseover is for a whole text line or table row (I use that for grep, for instance). Those are different highlighting contexts and can reasonably call for different highlighting appearances. At least users can be given the possibility. There is nothing wrong with defining one face for mouseover for compilation/grep and another face for mouseover on the mode line, and having them both inherit from the same face (or not). Attempting to boil all mouseover highlighting down to the same face would be misguided - only one step above hard-coding `highlight' all over the place. In my case, speaking as one user, I want most mouseover to use `highlight', but for the mode line I want it to use `mode-line-highlight' (which it does), and for compilation/grep I want it to use another highlighting style altogether (in my case it just underlines). I've grepped for `mouse-face' in the Emacs source code, and those three are the only contexts that I use where I would want to customize the face used for mouseover. But other people use libraries that I don't use, and perhaps they would suggest additional places to define a new face. If not, then let's just add a mouseover face for compile.el. > Also, someone should perhaps see if using arbitrary faces for mouse > highlight will not be too dangerous (given how this is implemented in > the display engine), before we allow to customize it. Dangerous? I've been customizing it exactly the way I said for decades (using face `compilation-mouseover'). Not only that, I put the `mouse-face' property on the whole grep line, not just on the file name+lineno part. And I have never seen any problem, display or otherwise (even with huge grep buffers).