aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/wid-edit.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/wid-edit.el')
-rw-r--r--lisp/wid-edit.el17
1 files changed, 10 insertions, 7 deletions
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
index dd55b35caac..e6ce5ae71db 100644
--- a/lisp/wid-edit.el
+++ b/lisp/wid-edit.el
@@ -382,10 +382,11 @@ new value.")
382 (setq help-echo 'widget-mouse-help)) 382 (setq help-echo 'widget-mouse-help))
383 (overlay-put overlay 'button widget) 383 (overlay-put overlay 'button widget)
384 (overlay-put overlay 'keymap (widget-get widget :keymap)) 384 (overlay-put overlay 'keymap (widget-get widget :keymap))
385 (overlay-put overlay 'evaporate t)
385 ;; We want to avoid the face with image buttons. 386 ;; We want to avoid the face with image buttons.
386 (unless (widget-get widget :suppress-face) 387 (unless (widget-get widget :suppress-face)
387 (overlay-put overlay 'face (widget-apply widget :button-face-get)) 388 (overlay-put overlay 'face (widget-apply widget :button-face-get)))
388 (overlay-put overlay 'mouse-face widget-mouse-face)) 389 (overlay-put overlay 'pointer 'hand)
389 (overlay-put overlay 'help-echo help-echo))) 390 (overlay-put overlay 'help-echo help-echo)))
390 391
391(defun widget-mouse-help (window overlay point) 392(defun widget-mouse-help (window overlay point)
@@ -401,6 +402,7 @@ new value.")
401 "Specify sample for WIDGET between FROM and TO." 402 "Specify sample for WIDGET between FROM and TO."
402 (let ((overlay (make-overlay from to nil t nil))) 403 (let ((overlay (make-overlay from to nil t nil)))
403 (overlay-put overlay 'face (widget-apply widget :sample-face-get)) 404 (overlay-put overlay 'face (widget-apply widget :sample-face-get))
405 (overlay-put overlay 'evaporate t)
404 (widget-put widget :sample-overlay overlay))) 406 (widget-put widget :sample-overlay overlay)))
405 407
406(defun widget-specify-doc (widget from to) 408(defun widget-specify-doc (widget from to)
@@ -408,6 +410,7 @@ new value.")
408 (let ((overlay (make-overlay from to nil t nil))) 410 (let ((overlay (make-overlay from to nil t nil)))
409 (overlay-put overlay 'widget-doc widget) 411 (overlay-put overlay 'widget-doc widget)
410 (overlay-put overlay 'face widget-documentation-face) 412 (overlay-put overlay 'face widget-documentation-face)
413 (overlay-put overlay 'evaporate t)
411 (widget-put widget :doc-overlay overlay))) 414 (widget-put widget :doc-overlay overlay)))
412 415
413(defmacro widget-specify-insert (&rest form) 416(defmacro widget-specify-insert (&rest form)
@@ -1286,8 +1289,8 @@ Store the newly created widget in the :children attribute.
1286The value of the :type attribute should be an unconverted widget type." 1289The value of the :type attribute should be an unconverted widget type."
1287 (let ((value (widget-get widget :value)) 1290 (let ((value (widget-get widget :value))
1288 (type (widget-get widget :type))) 1291 (type (widget-get widget :type)))
1289 (widget-put widget :children 1292 (widget-put widget :children
1290 (list (widget-create-child-value widget 1293 (list (widget-create-child-value widget
1291 (widget-convert type) 1294 (widget-convert type)
1292 value))))) 1295 value)))))
1293 1296
@@ -3343,8 +3346,8 @@ Here we attempt to define my-list as a choice of either the constant
3343nil, or a cons-cell containing a sexp and my-lisp. This will not work 3346nil, or a cons-cell containing a sexp and my-lisp. This will not work
3344because the `choice' widget does not allow recursion. 3347because the `choice' widget does not allow recursion.
3345 3348
3346Using the `lazy' widget you can overcome this problem, as in this 3349Using the `lazy' widget you can overcome this problem, as in this
3347example: 3350example:
3348 3351
3349 (define-widget 'sexp-list 'lazy 3352 (define-widget 'sexp-list 'lazy
3350 \"A list of sexps.\" 3353 \"A list of sexps.\"
@@ -3353,7 +3356,7 @@ example:
3353 :format "%{%t%}: %v" 3356 :format "%{%t%}: %v"
3354 ;; We don't convert :type because we want to allow recursive 3357 ;; We don't convert :type because we want to allow recursive
3355 ;; datastructures. This is slow, so we should not create speed 3358 ;; datastructures. This is slow, so we should not create speed
3356 ;; critical widgets by deriving from this. 3359 ;; critical widgets by deriving from this.
3357 :convert-widget 'widget-value-convert-widget 3360 :convert-widget 'widget-value-convert-widget
3358 :value-create 'widget-type-value-create 3361 :value-create 'widget-type-value-create
3359 :value-get 'widget-child-value-get 3362 :value-get 'widget-child-value-get