[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Highlighting a region as you type
From: |
Scott Goldstein |
Subject: |
Highlighting a region as you type |
Date: |
Mon, 25 Feb 2002 18:01:34 -0800 (PST) |
I've come up with a rather naive way of highlighting a
region as I type (i.e. between the mark and point) and
then copying the region to the kill-ring.
;; hihglight start
(defun myTestOn ()
(interactive)
(transient-mark-mode 1)
(set-mark (point))
)
;; copy and end highlighting
(defun myTestOff ()
(interactive)
(copy-region-as-kill (mark) (point))
(transient-mark-mode -1)
)
I don't want transient mark mode on at all times, but
it seems that there's a better way to do this than
toggling it on and off.
Can anyone give me suggestions of a better method?
Thanks.
Scott
__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Highlighting a region as you type,
Scott Goldstein <=