From: Milan Zamazal <pdm@zamazal.org>
Cc: emacs-devel@gnu.org
Subject: Re: No kill-ring-save region signalling in transient-mark-mode
Date: Fri, 30 Apr 2004 11:44:24 +0200 [thread overview]
Message-ID: <87vfjhre9z.fsf@zamazal.org> (raw)
In-Reply-To: <m3u0z1hh9l.fsf@kfs-l.imdomain.dk> (Kim F. Storm's message of "30 Apr 2004 12:49:58 +0200")
>>>>> "KFS" == Kim F Storm <storm@cua.dk> 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
next prev parent reply other threads:[~2004-04-30 9:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-30 7:47 No kill-ring-save region signalling in transient-mark-mode Milan Zamazal
2004-04-30 9:27 ` Juri Linkov
2004-04-30 10:49 ` Kim F. Storm
2004-04-30 9:44 ` Milan Zamazal [this message]
2004-04-30 12:18 ` Kim F. Storm
2004-04-30 10:37 ` Milan Zamazal
2004-04-30 19:59 ` Kim F. Storm
2004-05-01 17:50 ` Richard Stallman
2004-05-01 9:44 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87vfjhre9z.fsf@zamazal.org \
--to=pdm@zamazal.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.