Mercurial > emacs
diff lisp/wid-edit.el @ 90099:fa9654493afb
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-10
Merge from emacs--cvs-trunk--0
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-59
- miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-68
Update from CVS
author | Miles Bader <miles@gnu.org> |
---|---|
date | Wed, 02 Feb 2005 01:54:00 +0000 |
parents | 95879cc1ed20 b302445f7b00 |
children | 02f1dbc4a199 |
line wrap: on
line diff
--- a/lisp/wid-edit.el Mon Jan 31 01:41:13 2005 +0000 +++ b/lisp/wid-edit.el Wed Feb 02 01:54:00 2005 +0000 @@ -391,7 +391,11 @@ (overlay-put overlay 'evaporate t) ;; We want to avoid the face with image buttons. (unless (widget-get widget :suppress-face) - (overlay-put overlay 'face (widget-apply widget :button-face-get))) + (overlay-put overlay 'face (widget-apply widget :button-face-get)) + ; Text terminals cannot change mouse pointer shape, so use mouse + ; face instead. + (or (display-graphic-p) + (overlay-put overlay 'mouse-face widget-mouse-face))) (overlay-put overlay 'pointer 'hand) (overlay-put overlay 'follow-link follow-link) (overlay-put overlay 'help-echo help-echo))) @@ -911,14 +915,14 @@ ;; until we receive a release event. Highlight/ ;; unhighlight the button the mouse was initially ;; on when we move over it. - (let ((track-mouse t)) - (save-excursion - (when face ; avoid changing around image - (overlay-put overlay - 'face widget-button-pressed-face) - (overlay-put overlay - 'mouse-face widget-button-pressed-face)) - (unless (widget-apply button :mouse-down-action event) + (save-excursion + (when face ; avoid changing around image + (overlay-put overlay + 'face widget-button-pressed-face) + (overlay-put overlay + 'mouse-face widget-button-pressed-face)) + (unless (widget-apply button :mouse-down-action event) + (let ((track-mouse t)) (while (not (widget-button-release-event-p event)) (setq event (read-event) pos (widget-event-point event)) @@ -933,13 +937,13 @@ 'mouse-face widget-button-pressed-face)) (overlay-put overlay 'face face) - (overlay-put overlay 'mouse-face mouse-face)))) - - ;; When mouse is released over the button, run - ;; its action function. - (when (and pos - (eq (get-char-property pos 'button) button)) - (widget-apply-action button event)))) + (overlay-put overlay 'mouse-face mouse-face))))) + + ;; When mouse is released over the button, run + ;; its action function. + (when (and pos + (eq (get-char-property pos 'button) button)) + (widget-apply-action button event))) (overlay-put overlay 'face face) (overlay-put overlay 'mouse-face mouse-face))))