From: Patrick Gundlach <geh1.10.randomuser@spamgourmet.com>
Subject: Re: how to highlight the mark
Date: Tue, 11 Nov 2003 13:30:34 +0100 [thread overview]
Message-ID: <m2vfprozo5.fsf@levana.de> (raw)
In-Reply-To: mailman.140.1068544686.2005.help-gnu-emacs@gnu.org
Wim Yedema <yedema@natlab.research.philips.com> writes:
> Subject says it all really. I want to highlight the mark kind of like
> the cursor.
thats what I use:
;; nice mark - shows mark as a highlighted 'cursor' so user 'always'
;; sees where the mark is. Especially nice for killing a region.
(defvar pg-mark-overlay nil
"Overlay to show the position where the mark is")
(make-variable-buffer-local 'pg-mark-overlay)
(put 'pg-mark-mark 'face 'secondary-selection)
(defvar pg-mark-old-position nil
"The position the mark was at. To be able to compare with the
current position")
(defun pg-show-mark ()
"Display an overlay where the mark is at. Should be hooked into
activate-mark-hook"
(unless pg-mark-overlay
(setq pg-mark-overlay (make-overlay 0 0))
(overlay-put pg-mark-overlay 'category 'pg-mark-mark))
(let ((here (mark t)))
(when here
(move-overlay pg-mark-overlay here (1+ here)))))
(defadvice exchange-point-and-mark (after pg-mark-exchange-point-and-mark)
"Show visual marker"
(pg-show-mark))
(ad-activate 'exchange-point-and-mark)
(add-hook 'activate-mark-hook 'pg-show-mark)
Patrick
--
You are your own rainbow!
next prev parent reply other threads:[~2003-11-11 12:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.140.1068544686.2005.help-gnu-emacs@gnu.org>
2003-11-11 9:11 ` how to highlight the mark roodwriter
2003-11-11 10:43 ` Oliver Scholz
2003-11-11 12:30 ` Patrick Gundlach [this message]
2003-11-11 8:55 Wim Yedema
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2vfprozo5.fsf@levana.de \
--to=geh1.10.randomuser@spamgourmet.com \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).