|
From: | Perry Smith |
Subject: | Re: How to programmatically highlight region? |
Date: | Wed, 15 Nov 2006 18:50:22 -0600 |
On Nov 15, 2006, at 4:48 PM, David Abrahams wrote:
I felt challenged :-) You make a face. Put the attributes that you want in it. Then use put-text-property to apply that face to the region. (make-face 'my-blue-face) (set-face-attribute 'my-blue-face nil :background "blue") (defun dog-test3 () (interactive) (put-text-property (point) (mark) 'face 'my-blue-face)) Set your mark and point, then do M-x dog-test3 There is something I don't understand though. If you have font-lock-mode set, then it does not work. I'm not sure what is happening in that case. I'm curious to see if others reply. Hope this help... Perry Smith Ease Software, Inc. |
[Prev in Thread] | Current Thread | [Next in Thread] |