From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: Reducing mouse-dependency In Emacs. Date: Sun, 10 Aug 2003 23:05:08 -0500 (CDT) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200308110405.h7B458f20601@raven.dms.auburn.edu> References: <200308100342.h7A3gXV19877@raven.dms.auburn.edu> <200308101650.h7AGovxS005131@rum.cs.yale.edu> <200308102309.h7AN9O420410@raven.dms.auburn.edu> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1060574978 998 80.91.224.253 (11 Aug 2003 04:09:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 11 Aug 2003 04:09:38 +0000 (UTC) Cc: monnier+gnu/emacs@cs.yale.edu, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Aug 11 06:09:37 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19m401-0003sT-00 for ; Mon, 11 Aug 2003 06:09:37 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19m476-0002Fu-00 for ; Mon, 11 Aug 2003 06:16:56 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19m3zL-0005CM-UF for emacs-devel@quimby.gnus.org; Mon, 11 Aug 2003 00:08:55 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19m3zA-00051y-I8 for emacs-devel@gnu.org; Mon, 11 Aug 2003 00:08:44 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19m3yd-0003yu-Mb for emacs-devel@gnu.org; Mon, 11 Aug 2003 00:08:42 -0400 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.20) id 19m3xQ-0002d1-Pw for emacs-devel@gnu.org; Mon, 11 Aug 2003 00:06:56 -0400 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.12.9/8.12.9) with ESMTP id h7B46peQ007783; Sun, 10 Aug 2003 23:06:52 -0500 (CDT) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.6+Sun/8.11.6) id h7B458f20601; Sun, 10 Aug 2003 23:05:08 -0500 (CDT) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: teirllm@dms.auburn.edu In-reply-to: <200308102309.h7AN9O420410@raven.dms.auburn.edu> (message from Luc Teirlinck on Sun, 10 Aug 2003 18:09:24 -0500 (CDT)) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:15874 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:15874 I have implemented a function: (defun highlight-text-property-regions (prop &optional face1 face2) ... It takes any text property PROP and highlights all regions with non-nil text or overlay property PROP. Two faces face1 and face2 are needed to be able to distinguish adjacent regions with non-nil but different values for PROP. This could be used not just for `help-echo' but for also to recognize regions with `keymap' and `local-map' properties and so on. (I personally believe that regions with local keymaps should be already highlighted anyway, but that is definitely not always the case in practice.) The function is mainly useful for temporary highlighting, as it might conceal other highlighting. To remove the highlighting, one just uses nil for face1, that is, give no optional arguments. Seems to work well and be useful after some experimentation. I am still thinking about some additional user interface functions and will send some code later. Sincerely, Luc.