comparison lisp/wid-edit.el @ 444:576fb035e263 r21-2-37

Import from CVS: tag r21-2-37
author cvs
date Mon, 13 Aug 2007 11:36:19 +0200
parents abe6d1db359e
children 1ccc32a20af4
comparison
equal deleted inserted replaced
443:a8296e22da4e 444:576fb035e263
510 (map-extents 'widget-activation-glyph-mapper 510 (map-extents 'widget-activation-glyph-mapper
511 nil from to :deactivate nil 'glyph-widget))) 511 nil from to :deactivate nil 'glyph-widget)))
512 512
513 (defun widget-specify-active (widget) 513 (defun widget-specify-active (widget)
514 "Make WIDGET active for user modifications." 514 "Make WIDGET active for user modifications."
515 (let ((inactive (widget-get widget :inactive))) 515 (let ((inactive (widget-get widget :inactive))
516 (from (widget-get widget :from))
517 (to (widget-get widget :to)))
516 (when (and inactive (not (extent-detached-p inactive))) 518 (when (and inactive (not (extent-detached-p inactive)))
517 ;; Reactivate the buttons and fields covered by the extent. 519 ;; Reactivate the buttons and fields covered by the extent.
518 (map-extents 'widget-activation-widget-mapper 520 (map-extents 'widget-activation-widget-mapper
519 inactive nil nil :activate nil 'button-or-field) 521 nil from to :activate nil 'button-or-field)
520 ;; Reactivate the glyphs. 522 ;; Reactivate the glyphs.
521 (map-extents 'widget-activation-glyph-mapper 523 (map-extents 'widget-activation-glyph-mapper
522 inactive nil nil :activate nil 'end-glyph) 524 nil from to :activate nil 'end-glyph)
523 (delete-extent inactive) 525 (delete-extent inactive)
524 (widget-put widget :inactive nil)))) 526 (widget-put widget :inactive nil))))
525 527
526 528
527 ;;; Widget Properties. 529 ;;; Widget Properties.
564 (if (symbolp value) 566 (if (symbolp value)
565 (symbol-value value) 567 (symbol-value value)
566 value))) 568 value)))
567 569
568 (defun widget-member (widget property) 570 (defun widget-member (widget property)
569 "Non-nil iff there is a definition in WIDGET for PROPERTY." 571 "Return t if there is a definition in WIDGET for PROPERTY."
570 (cond ((widget-plist-member (cdr widget) property) 572 (cond ((widget-plist-member (cdr widget) property)
571 t) 573 t)
572 ((car widget) 574 ((car widget)
573 (widget-member (get (car widget) 'widget-type) property)) 575 (widget-member (get (car widget) 'widget-type) property))
574 (t nil))) 576 (t nil)))