/[emacs]/emacs/lisp/wid-edit.el
ViewVC logotype

Diff of /emacs/lisp/wid-edit.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.127 by jet, Wed May 19 02:16:56 2004 UTC revision 1.128 by kfstorm, Tue Jun 8 09:54:59 2004 UTC
# Line 385  new value.") Line 385  new value.")
385      (overlay-put overlay 'evaporate t)      (overlay-put overlay 'evaporate t)
386      ;; We want to avoid the face with image buttons.      ;; We want to avoid the face with image buttons.
387      (unless (widget-get widget :suppress-face)      (unless (widget-get widget :suppress-face)
388        (overlay-put overlay 'face (widget-apply widget :button-face-get))        (overlay-put overlay 'face (widget-apply widget :button-face-get)))
389        (overlay-put overlay 'mouse-face widget-mouse-face))      (overlay-put overlay 'pointer 'hand)
390      (overlay-put overlay 'help-echo help-echo)))      (overlay-put overlay 'help-echo help-echo)))
391    
392  (defun widget-mouse-help (window overlay point)  (defun widget-mouse-help (window overlay point)
# Line 1289  Store the newly created widget in the :c Line 1289  Store the newly created widget in the :c
1289  The value of the :type attribute should be an unconverted widget type."  The value of the :type attribute should be an unconverted widget type."
1290    (let ((value (widget-get widget :value))    (let ((value (widget-get widget :value))
1291          (type (widget-get widget :type)))          (type (widget-get widget :type)))
1292      (widget-put widget :children      (widget-put widget :children
1293                  (list (widget-create-child-value widget                  (list (widget-create-child-value widget
1294                                                   (widget-convert type)                                                   (widget-convert type)
1295                                                   value)))))                                                   value)))))
1296    
# Line 3312  Here we attempt to define my-list as a c Line 3312  Here we attempt to define my-list as a c
3312  nil, or a cons-cell containing a sexp and my-lisp.  This will not work  nil, or a cons-cell containing a sexp and my-lisp.  This will not work
3313  because the `choice' widget does not allow recursion.  because the `choice' widget does not allow recursion.
3314    
3315  Using the `lazy' widget you can overcome this problem, as in this  Using the `lazy' widget you can overcome this problem, as in this
3316  example:  example:
3317    
3318    (define-widget 'sexp-list 'lazy    (define-widget 'sexp-list 'lazy
3319      \"A list of sexps.\"      \"A list of sexps.\"
# Line 3322  example: Line 3322  example:
3322    :format "%{%t%}: %v"    :format "%{%t%}: %v"
3323    ;; We don't convert :type because we want to allow recursive    ;; We don't convert :type because we want to allow recursive
3324    ;; datastructures.  This is slow, so we should not create speed    ;; datastructures.  This is slow, so we should not create speed
3325    ;; critical widgets by deriving from this.    ;; critical widgets by deriving from this.
3326    :convert-widget 'widget-value-convert-widget    :convert-widget 'widget-value-convert-widget
3327    :value-create 'widget-type-value-create    :value-create 'widget-type-value-create
3328    :value-get 'widget-child-value-get    :value-get 'widget-child-value-get

Legend:
Removed from v.1.127  
changed lines
  Added in v.1.128

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26