From e1ec62a59692221b5979d5238272c1fbec31ed06 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 14 Feb 2006 20:16:04 +0000 Subject: [PATCH] * 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. --- lisp/ChangeLog | 7 +++++++ lisp/cus-edit.el | 8 ++++++-- lisp/wid-edit.el | 16 ++++++---------- 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d5f95771d20..45cdfeb2f4c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,12 @@ 2006-02-14 Chong Yidong + * 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. + * files.el (hack-local-variables): Remove ignored variables before checking if any variables need setting. diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 763b4b8c57f..0595336c3ed 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -1720,6 +1720,7 @@ item in another window.\n\n")) :help-echo "Read the manual entry for this option." :button-face 'custom-link :mouse-face 'highlight + :pressed-face 'highlight :tag "Manual") ;;; The `custom-magic' Widget. @@ -2201,7 +2202,8 @@ Insert PREFIX first if non-nil." (push (widget-create-child-and-convert widget (car links) :button-face 'custom-link - :mouse-face 'highlight) + :mouse-face 'highlight + :pressed-face 'highlight) buttons) (setq links (cdr links)) (cond ((null links) @@ -2247,7 +2249,8 @@ If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"." (push (widget-create-child-and-convert widget (car links) :button-face 'custom-link - :mouse-face 'highlight) + :mouse-face 'highlight + :pressed-face 'highlight) buttons) (setq links (cdr links)) (cond ((null links) @@ -3590,6 +3593,7 @@ restoring it to the state of a face that has never been customized." "Show parent in other window when activated." :button-face 'custom-link :mouse-face 'highlight + :pressed-face 'highlight :help-echo "Create customization buffer for this group." :action 'custom-group-link-action) 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)))))