aboutsummaryrefslogtreecommitdiffstats
path: root/lispref
diff options
context:
space:
mode:
authorDave Love2000-09-13 18:00:34 +0000
committerDave Love2000-09-13 18:00:34 +0000
commitc26a99e8d9142ce29c85306331237e0dc8924370 (patch)
tree2eac977eab538e2c551d0e5306b37e589c368976 /lispref
parent5dd05f61abbefeb9dfab2afe024c0f02bd087f5f (diff)
downloademacs-c26a99e8d9142ce29c85306331237e0dc8924370.tar.gz
emacs-c26a99e8d9142ce29c85306331237e0dc8924370.zip
(Clickable Text): Fix example.
Diffstat (limited to 'lispref')
-rw-r--r--lispref/text.texi6
1 files changed, 3 insertions, 3 deletions
diff --git a/lispref/text.texi b/lispref/text.texi
index 2b2098666bb..dcafe0a6f18 100644
--- a/lispref/text.texi
+++ b/lispref/text.texi
@@ -3103,17 +3103,17 @@ Dired uses the function @code{dired-get-filename} to determine which
3103file to visit, based on the position found in the event. 3103file to visit, based on the position found in the event.
3104 3104
3105 Instead of defining a mouse command for the major mode, you can define 3105 Instead of defining a mouse command for the major mode, you can define
3106a key binding for the clickable text itself, using the @code{local-map} 3106a key binding for the clickable text itself, using the @code{keymap}
3107text property: 3107text property:
3108 3108
3109@example 3109@example
3110(let ((map (make-sparse-keymap))) 3110(let ((map (make-sparse-keymap)))
3111 (define-key-binding map [mouse-2] 'operate-this-button) 3111 (define-key map [mouse-2] 'operate-this-button)
3112 (put-text-property (point) 3112 (put-text-property (point)
3113 (save-excursion 3113 (save-excursion
3114 (dired-move-to-end-of-filename) 3114 (dired-move-to-end-of-filename)
3115 (point)) 3115 (point))
3116 'local-map map)) 3116 'keymap map))
3117@end example 3117@end example
3118 3118
3119@noindent 3119@noindent