/[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.113 by abraham, Thu Oct 3 13:46:24 2002 UTC revision 1.114 by lektu, Thu Oct 17 16:46:28 2002 UTC
# Line 202  nil means read a single character." Line 202  nil means read a single character."
202    "Choose an item from a list.    "Choose an item from a list.
203    
204  First argument TITLE is the name of the list.  First argument TITLE is the name of the list.
205  Second argument ITEMS is an list whose members are either  Second argument ITEMS is a list whose members are either
206   (NAME . VALUE), to indicate selectable items, or just strings to   (NAME . VALUE), to indicate selectable items, or just strings to
207   indicate unselectable items.   indicate unselectable items.
208  Optional third argument EVENT is an input event.  Optional third argument EVENT is an input event.
# Line 301  minibuffer." Line 301  minibuffer."
301      (nreverse result)))      (nreverse result)))
302    
303  ;;; Widget text specifications.  ;;; Widget text specifications.
304  ;;  ;;
305  ;; These functions are for specifying text properties.  ;; These functions are for specifying text properties.
306    
307  (defvar widget-field-add-space t  (defvar widget-field-add-space t
# Line 333  new value.") Line 333  new value.")
333          (rear-sticky          (rear-sticky
334           (or (not widget-field-add-space) (widget-get widget :size))))           (or (not widget-field-add-space) (widget-get widget :size))))
335      (if (functionp help-echo)      (if (functionp help-echo)
336        (setq help-echo 'widget-mouse-help))            (setq help-echo 'widget-mouse-help))
337      (when (= (char-before to) ?\n)      (when (= (char-before to) ?\n)
338        ;; When the last character in the field is a newline, we want to        ;; When the last character in the field is a newline, we want to
339        ;; give it a `field' char-property of `boundary', which helps the        ;; give it a `field' char-property of `boundary', which helps the
# Line 509  Otherwise, just return the value." Line 509  Otherwise, just return the value."
509    
510  (defun widget-default-get (widget)  (defun widget-default-get (widget)
511    "Extract the default external value of WIDGET."    "Extract the default external value of WIDGET."
512    (widget-apply widget :value-to-external    (widget-apply widget :value-to-external
513                  (or (widget-get widget :value)                  (or (widget-get widget :value)
514                      (widget-apply widget :default-get))))                      (widget-apply widget :default-get))))
515    
# Line 892  Recommended as a parent keymap for modes Line 892  Recommended as a parent keymap for modes
892    (if (widget-event-point event)    (if (widget-event-point event)
893        (let* ((pos (widget-event-point event))        (let* ((pos (widget-event-point event))
894               (start (event-start event))               (start (event-start event))
895               (button (get-char-property               (button (get-char-property
896                        pos 'button (and (windowp (posn-window start))                        pos 'button (and (windowp (posn-window start))
897                                         (window-buffer (posn-window start))))))                                         (window-buffer (posn-window start))))))
898          (if button          (if button
# Line 1315  Optional EVENT is the event that trigger Line 1315  Optional EVENT is the event that trigger
1315    :indent nil    :indent nil
1316    :offset 0    :offset 0
1317    :format-handler 'widget-default-format-handler    :format-handler 'widget-default-format-handler
1318    :button-face-get 'widget-default-button-face-get    :button-face-get 'widget-default-button-face-get
1319    :sample-face-get 'widget-default-sample-face-get    :sample-face-get 'widget-default-sample-face-get
1320    :delete 'widget-default-delete    :delete 'widget-default-delete
1321    :copy 'identity    :copy 'identity
1322    :value-set 'widget-default-value-set    :value-set 'widget-default-value-set
# Line 1532  If that does not exists, call the value Line 1532  If that does not exists, call the value
1532    (or (widget-get widget :always-active)    (or (widget-get widget :always-active)
1533        (and (not (widget-get widget :inactive))        (and (not (widget-get widget :inactive))
1534             (let ((parent (widget-get widget :parent)))             (let ((parent (widget-get widget :parent)))
1535               (or (null parent)               (or (null parent)
1536                   (widget-apply parent :active))))))                   (widget-apply parent :active))))))
1537    
1538  (defun widget-default-deactivate (widget)  (defun widget-default-deactivate (widget)
# Line 1726  If END is omitted, it defaults to the le Line 1726  If END is omitted, it defaults to the le
1726    (find-file (locate-library (widget-value widget))))    (find-file (locate-library (widget-value widget))))
1727    
1728  ;;; The `emacs-commentary-link' Widget.  ;;; The `emacs-commentary-link' Widget.
1729        
1730  (define-widget 'emacs-commentary-link 'link  (define-widget 'emacs-commentary-link 'link
1731    "A link to Commentary in an Emacs Lisp library file."    "A link to Commentary in an Emacs Lisp library file."
1732    :action 'widget-emacs-commentary-link-action)    :action 'widget-emacs-commentary-link-action)
1733        
1734  (defun widget-emacs-commentary-link-action (widget &optional event)  (defun widget-emacs-commentary-link-action (widget &optional event)
1735    "Find the Commentary section of the Emacs file specified by WIDGET."    "Find the Commentary section of the Emacs file specified by WIDGET."
1736    (finder-commentary (widget-value widget)))    (finder-commentary (widget-value widget)))
# Line 3057  It will read a directory name from the m Line 3057  It will read a directory name from the m
3057    
3058  (defvar widget-coding-system-prompt-value-history nil  (defvar widget-coding-system-prompt-value-history nil
3059    "History of input to `widget-coding-system-prompt-value'.")    "History of input to `widget-coding-system-prompt-value'.")
3060      
3061  (define-widget 'coding-system 'symbol  (define-widget 'coding-system 'symbol
3062    "A MULE coding-system."    "A MULE coding-system."
3063    :format "%{%t%}: %v"    :format "%{%t%}: %v"
# Line 3422  To use this type, you must define :match Line 3422  To use this type, you must define :match
3422    
3423  ;;; The `color' Widget.  ;;; The `color' Widget.
3424    
3425  ;; Fixme: match  ;; Fixme: match
3426  (define-widget 'color 'editable-field  (define-widget 'color 'editable-field
3427    "Choose a color name (with sample)."    "Choose a color name (with sample)."
3428    :format "%t: %v (%{sample%})\n"    :format "%t: %v (%{sample%})\n"

Legend:
Removed from v.1.113  
changed lines
  Added in v.1.114

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