From e006fe5ab6b8dc6a7fe7ffb3b45d253baaa31581 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Tue, 9 Nov 1999 13:43:40 +0000 Subject: [PATCH] (widget-button-click): Wrap with save-excursion to restore track-mouse in the correct buffer. --- lisp/ChangeLog | 15 +++++++++++++++ lisp/wid-edit.el | 47 ++++++++++++++++++++++++----------------------- 2 files changed, 39 insertions(+), 23 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 74a33ce2a0e..51f5a1344a3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,18 @@ +1999-11-08 Markus Rost + + * wid-edit.el (widget-button-click): Wrap with save-excursion + to restore track-mouse in the correct buffer. + +1999-11-08 Gerd Moellmann + + * mail/mh-e.el: Changed maintainer to billcurtis@hotmail.com. + +1999-11-08 Peter Kleiweg + + * progmodes/ps-mode.el (ps-mode-print-function): Changed default + lpr-command to "lp" for some system-types. (copied from lpr.el + Emacs version 20.2.1). + 1999-11-04 Markus Rost * simple.el (comment-region): Strip off white space at end of diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index 4ac7da42efe..c8d46533d43 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -928,29 +928,30 @@ This exists as a variable so it can be set locally in certain buffers.") (mouse-face (overlay-get overlay 'mouse-face))) (unwind-protect (let ((track-mouse t)) - (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) - (while (not (button-release-event-p event)) - (setq event (widget-read-event) - pos (widget-event-point event)) - (if (and pos - (eq (get-char-property pos 'button) - button)) - (progn - (overlay-put overlay - 'face - widget-button-pressed-face) - (overlay-put overlay - 'mouse-face - widget-button-pressed-face)) - (overlay-put overlay 'face face) - (overlay-put overlay 'mouse-face mouse-face)))) - (when (and pos - (eq (get-char-property pos 'button) button)) - (widget-apply-action button event))) + (save-excursion + (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) + (while (not (button-release-event-p event)) + (setq event (widget-read-event) + pos (widget-event-point event)) + (if (and pos + (eq (get-char-property pos 'button) + button)) + (progn + (overlay-put overlay + 'face + widget-button-pressed-face) + (overlay-put overlay + 'mouse-face + widget-button-pressed-face)) + (overlay-put overlay 'face face) + (overlay-put overlay 'mouse-face mouse-face)))) + (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))) (let ((up t) -- 2.39.5