From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Milan Zamazal Newsgroups: gmane.emacs.devel Subject: Re: No kill-ring-save region signalling in transient-mark-mode Date: Fri, 30 Apr 2004 11:44:24 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <87vfjhre9z.fsf@zamazal.org> References: <87brl9sy9v.fsf@zamazal.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1083319018 10133 80.91.224.253 (30 Apr 2004 09:56:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 30 Apr 2004 09:56:58 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Apr 30 11:56:49 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BJUlF-0000tV-00 for ; Fri, 30 Apr 2004 11:56:49 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BJUlF-0000OH-00 for ; Fri, 30 Apr 2004 11:56:49 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BJUdX-000406-58 for emacs-devel@quimby.gnus.org; Fri, 30 Apr 2004 05:48:51 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BJUd8-0003z6-IJ for emacs-devel@gnu.org; Fri, 30 Apr 2004 05:48:26 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BJUZj-00033g-EK for emacs-devel@gnu.org; Fri, 30 Apr 2004 05:45:26 -0400 Original-Received: from [62.24.64.34] (helo=smtp.dkm.cz) by monty-python.gnu.org with smtp (Exim 4.30) id 1BJUYw-0002n8-JG for emacs-devel@gnu.org; Fri, 30 Apr 2004 05:44:06 -0400 Original-Received: (qmail 87157 invoked by uid 0); 30 Apr 2004 09:44:05 -0000 Original-Received: from i110.brno.mistral.cz (HELO blackbird) (62.245.104.110) by smtp.dkm.cz with SMTP; 30 Apr 2004 09:44:05 -0000 Original-Received: from pdm by blackbird with local (Exim 4.31) id 1BJUZE-0006yZ-RY; Fri, 30 Apr 2004 11:44:24 +0200 Original-To: storm@cua.dk (Kim F. Storm) X-Face: >kl&pL}(a*u\BCj7Q, \Yoq35~, 4dAu"CPGaJ[ahMli9uu#aF7dWxc3L.eaK2RWRU|', E+. -':&gJ-JAZ/N$f^4-3?G7M&Knna[A=lJ$}^!%@vuvulVl6-)x.V8RZ7fW9< X-Payment: hashcash 1.2 0:040430:storm@cua.dk:b0570e49417b38e2 X-Hashcash: 0:040430:storm@cua.dk:b0570e49417b38e2 X-Payment: hashcash 1.2 0:040430:emacs-devel@gnu.org:7aa3577c683d4566 X-Hashcash: 0:040430:emacs-devel@gnu.org:7aa3577c683d4566 In-Reply-To: (Kim F. Storm's message of "30 Apr 2004 12:49:58 +0200") User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 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:22422 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:22422 >>>>> "KFS" == Kim F Storm writes: KFS> How do you disable highlighting? The simplest method is to customize the `region' face to become invisible. It has an important drawback that regions are invisible when selecting them with mouse. For this reason I use the following code to disable the highlighting: (defvar mtmm-highlighted-background "blue3") (defun mtmm-reset-background () (set-face-attribute 'region nil :background 'unspecified)) (defun mtmm-highlight-background () (add-hook 'pre-command-hook 'mtmm-reset-background) (set-face-attribute 'region (selected-frame) :background mtmm-highlighted-background)) (defmacro mtmm-advice (function) `(defadvice ,function (before mtmm-highlight-region activate) (mtmm-highlight-background))) (mtmm-advice mouse-drag-region) (mtmm-advice mouse-kill-ring-save) (mtmm-advice mouse-save-then-kill) (mtmm-advice mouse-set-region) (mtmm-reset-background) KFS> The proper fix would be to ammend the test for KFS> transient-mark-mode with a test to see if highlighting is KFS> enabled. Sure, but I think there is currently no good way to detect that a user has disabled region highlighting some way. Milan Zamazal -- When you're in a fight with an idiot, it's difficult for other people to tell which one the idiot is. -- Bruce Perens in debian-devel