comparison lisp/wid-edit.el @ 85114:5039706521c9

Merge from emacs--rel--22 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-875
author Miles Bader <miles@gnu.org>
date Tue, 09 Oct 2007 08:52:57 +0000
parents e5a68f18fcb9 a577ac572c4b
children 38f922ac20ce 14c4a6aac623
comparison
equal deleted inserted replaced
85113:82b4a12fd080 85114:5039706521c9
403 (overlay-put overlay 'evaporate t) 403 (overlay-put overlay 'evaporate t)
404 ;; We want to avoid the face with image buttons. 404 ;; We want to avoid the face with image buttons.
405 (unless (widget-get widget :suppress-face) 405 (unless (widget-get widget :suppress-face)
406 (overlay-put overlay 'face (widget-apply widget :button-face-get)) 406 (overlay-put overlay 'face (widget-apply widget :button-face-get))
407 (overlay-put overlay 'mouse-face 407 (overlay-put overlay 'mouse-face
408 (widget-apply widget :mouse-face-get))) 408 ;; Make new list structure for the mouse-face value
409 ;; so that different widgets will have
410 ;; different `mouse-face' property values
411 ;; and will highlight separately.
412 (let ((mouse-face-value
413 (widget-apply widget :mouse-face-get)))
414 ;; If it's a list, copy it.
415 (if (listp mouse-face-value)
416 (copy-sequence mouse-face-value)
417 ;; If it's a symbol, put it in a list.
418 (list mouse-face-value)))))
409 (overlay-put overlay 'pointer 'hand) 419 (overlay-put overlay 'pointer 'hand)
410 (overlay-put overlay 'follow-link follow-link) 420 (overlay-put overlay 'follow-link follow-link)
411 (overlay-put overlay 'help-echo help-echo))) 421 (overlay-put overlay 'help-echo help-echo)))
412 422
413 (defun widget-mouse-help (window overlay point) 423 (defun widget-mouse-help (window overlay point)
654 (if (and (display-graphic-p) 664 (if (and (display-graphic-p)
655 (setq image (widget-image-find image))) 665 (setq image (widget-image-find image)))
656 (progn (widget-put widget :suppress-face t) 666 (progn (widget-put widget :suppress-face t)
657 (insert-image image 667 (insert-image image
658 (propertize 668 (propertize
659 tag 'mouse-face widget-button-pressed-face))) 669 ;; Use a `list' so it's unique and won't get
670 ;; accidentally merged with neighbouring images.
671 tag 'mouse-face (list widget-button-pressed-face))))
660 (insert tag))) 672 (insert tag)))
661 673
662 (defun widget-move-and-invoke (event) 674 (defun widget-move-and-invoke (event)
663 "Move to where you click, and if it is an active field, invoke it." 675 "Move to where you click, and if it is an active field, invoke it."
664 (interactive "e") 676 (interactive "e")