comparison lispref/text.texi @ 72110:d64250333611

(Clickable Text): Clarify.
author Richard M. Stallman <rms@gnu.org>
date Mon, 24 Jul 2006 23:06:04 +0000
parents 5d973bcbba35
children bbb689ae03ca
comparison
equal deleted inserted replaced
72109:f6cd6558bd8e 72110:d64250333611
3477 3477
3478 @node Clickable Text 3478 @node Clickable Text
3479 @subsection Defining Clickable Text 3479 @subsection Defining Clickable Text
3480 @cindex clickable text 3480 @cindex clickable text
3481 3481
3482 There are two ways to set up @dfn{clickable text} in a buffer. 3482 There are two parts of setting up @dfn{clickable text} in a buffer:
3483 There are typically two parts of this: to make the text highlight 3483 (1) to make that text highlight when the mouse moves over it, and (2)
3484 when the mouse is over it, and to make a mouse button do something 3484 to make a mouse button do something when you click on that text.
3485 when you click it on that part of the text. 3485
3486 3486 For highlighting, use the @code{mouse-face} text property. Here is
3487 Highlighting is done with the @code{mouse-face} text property. 3487 an example of how Dired does it:
3488 Here is an example of how Dired does it:
3489 3488
3490 @smallexample 3489 @smallexample
3491 (condition-case nil 3490 (condition-case nil
3492 (if (dired-move-to-filename) 3491 (if (dired-move-to-filename)
3493 (put-text-property (point) 3492 (put-text-property (point)