[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: No kill-ring-save region signalling in transient-mark-mode
From: |
Milan Zamazal |
Subject: |
Re: No kill-ring-save region signalling in transient-mark-mode |
Date: |
Fri, 30 Apr 2004 11:44:24 +0200 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (gnu/linux) |
>>>>> "KFS" == Kim F Storm <address@hidden> 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
Re: No kill-ring-save region signalling in transient-mark-mode, Juri Linkov, 2004/04/30