summaryrefslogtreecommitdiff
path: root/lisp/wid-edit.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2006-02-14 20:16:04 +0000
committerChong Yidong <cyd@stupidchicken.com>2006-02-14 20:16:04 +0000
commitef303706fcd7bdba92963ad6648291f36c729409 (patch)
tree5e64a4261c0b999b948f957e60e37876ce17649d /lisp/wid-edit.el
parenta059ae58834258aee4529c0eb2865d83944eccd4 (diff)
downloademacs-ef303706fcd7bdba92963ad6648291f36c729409.tar.gz
* wid-edit.el (widget-button-click): Use :pressed-face property
for overlay face, if it exists. * cus-edit.el (custom-manual, custom-add-see-also) (custom-add-parent-links, custom-group-link): Add :pressed-face property to links.
Diffstat (limited to 'lisp/wid-edit.el')
-rw-r--r--lisp/wid-edit.el16
1 files changed, 6 insertions, 10 deletions
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
index 720fb9929e4..52bf3a212be 100644
--- a/lisp/wid-edit.el
+++ b/lisp/wid-edit.el
@@ -929,6 +929,8 @@ Recommended as a parent keymap for modes using widgets.")
(save-excursion
(goto-char (posn-point (event-start event)))
(let* ((overlay (widget-get button :button-overlay))
+ (pressed-face (or (widget-get button :pressed-face)
+ widget-button-pressed-face))
(face (overlay-get overlay 'face))
(mouse-face (overlay-get overlay 'mouse-face)))
(unwind-protect
@@ -938,10 +940,8 @@ Recommended as a parent keymap for modes using widgets.")
;; on when we move over it.
(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))
+ (overlay-put overlay 'face pressed-face)
+ (overlay-put overlay 'mouse-face pressed-face))
(unless (widget-apply button :mouse-down-action event)
(let ((track-mouse t))
(while (not (widget-button-release-event-p event))
@@ -951,12 +951,8 @@ Recommended as a parent keymap for modes using widgets.")
(eq (get-char-property pos 'button)
button))
(when face
- (overlay-put overlay
- 'face
- widget-button-pressed-face)
- (overlay-put overlay
- 'mouse-face
- widget-button-pressed-face))
+ (overlay-put overlay 'face pressed-face)
+ (overlay-put overlay 'mouse-face pressed-face))
(overlay-put overlay 'face face)
(overlay-put overlay 'mouse-face mouse-face)))))