aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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