OK, to set the scene, I have the following in a buffer:
online
away
occ
dnd
ffc
na
What I want to do is make each one of those an extent and when I click
mouse-2 on one it will parse the text as an argument to a function.
The manual seems a little confusing to me, can anyone point me in the
right direction?
Thanks.
--
|---<Steve Youngs>---------------<GnuPG KeyID: 9E7E2820>---|
| XEmacs - It's not just an editor. |
| It's a way of life. |
|------------------------------------<youngs(a)xemacs.org>---|
Show replies by date
Steve,
Here is a simple little function that takes all the lines in a buffer
(starting at the point) and creates an extent around them. It also
sets the face to blue and the mouse face to highlight.
Hope this helps,
Sean
(defun extent-it ()
(interactive)
(let (extent)
(while (re-search-forward "^[a-z]+$" nil t)
(setq extent
(make-extent (match-beginning 0) (match-end 0)))
(set-extent-face extent 'blue)
(set-extent-mouse-face extent 'highlight))))
|--==> "SM" == Sean MacLennan <seanm(a)storm.ca> writes:
SM> Steve,
SM> Here is a simple little function that takes all the lines in a buffer
SM> (starting at the point) and creates an extent around them. It also
SM> sets the face to blue and the mouse face to highlight.
Thanks for the help, Sean. I ended up using widgets to get the job
done in this case.
--
|---<Steve Youngs>---------------<GnuPG KeyID: 9E7E2820>---|
| XEmacs - It's not just an editor. |
| It's a way of life. |
|------------------------------------<youngs(a)xemacs.org>---|