comparison lisp/wid-edit.el @ 380:8626e4521993 r21-2-5

Import from CVS: tag r21-2-5
author cvs
date Mon, 13 Aug 2007 11:07:10 +0200
parents d883f39b8495
children 064ab7fed2e0
comparison
equal deleted inserted replaced
379:76b7d63099ad 380:8626e4521993
531 531
532 (when (or (not (fboundp 'widget-put)) 532 (when (or (not (fboundp 'widget-put))
533 widget-shadow-subrs) 533 widget-shadow-subrs)
534 (defun widget-put (widget property value) 534 (defun widget-put (widget property value)
535 "In WIDGET set PROPERTY to VALUE. 535 "In WIDGET set PROPERTY to VALUE.
536 The value can later be retrived with `widget-get'." 536 The value can later be retrieved with `widget-get'."
537 (setcdr widget (plist-put (cdr widget) property value)))) 537 (setcdr widget (plist-put (cdr widget) property value))))
538 538
539 ;; Recoded in C, for efficiency: 539 ;; Recoded in C, for efficiency:
540 (when (or (not (fboundp 'widget-get)) 540 (when (or (not (fboundp 'widget-get))
541 widget-shadow-subrs) 541 widget-shadow-subrs)
728 ;; This dance is necessary, because XEmacs signals an 728 ;; This dance is necessary, because XEmacs signals an
729 ;; error when it encounters an unrecognized image 729 ;; error when it encounters an unrecognized image
730 ;; format. 730 ;; format.
731 (when (valid-image-instantiator-format-p (caar formats)) 731 (when (valid-image-instantiator-format-p (caar formats))
732 (setq file (locate-file image dirlist 732 (setq file (locate-file image dirlist
733 (mapconcat 'identity (cdar formats) 733 (mapconcat #'identity (cdar formats)
734 ":")))) 734 ":"))))
735 (unless file 735 (unless file
736 (pop formats))) 736 (pop formats)))
737 (when file 737 (when file
738 ;; We create a glyph with the file as the default image 738 ;; We create a glyph with the file as the default image
1127 (last event)) 1127 (last event))
1128 (unless (widget-apply widget :active) 1128 (unless (widget-apply widget :active)
1129 (error "This widget is inactive")) 1129 (error "This widget is inactive"))
1130 (let ((current-glyph 'down)) 1130 (let ((current-glyph 'down))
1131 ;; We always know what glyph is drawn currently, to avoid 1131 ;; We always know what glyph is drawn currently, to avoid
1132 ;; unnecessary extent changes. Is this any noticable gain? 1132 ;; unnecessary extent changes. Is this any noticeable gain?
1133 (unwind-protect 1133 (unwind-protect
1134 (progn 1134 (progn
1135 ;; Press the glyph. 1135 ;; Press the glyph.
1136 (set-extent-end-glyph extent down-glyph) 1136 (set-extent-end-glyph extent down-glyph)
1137 ;; Redisplay (shouldn't be needed, but...) 1137 ;; Redisplay (shouldn't be needed, but...)