diff options
| author | Gerd Moellmann | 1999-11-09 13:43:40 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 1999-11-09 13:43:40 +0000 |
| commit | e006fe5ab6b8dc6a7fe7ffb3b45d253baaa31581 (patch) | |
| tree | 3120ff19b5351ce63217902dde406d6c58b00a02 | |
| parent | 3e9f8311f9858cb2fd07e495f025bcc42fcf24fc (diff) | |
| download | emacs-e006fe5ab6b8dc6a7fe7ffb3b45d253baaa31581.tar.gz emacs-e006fe5ab6b8dc6a7fe7ffb3b45d253baaa31581.zip | |
(widget-button-click): Wrap with save-excursion
to restore track-mouse in the correct buffer.
| -rw-r--r-- | lisp/ChangeLog | 15 | ||||
| -rw-r--r-- | 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 @@ | |||
| 1 | 1999-11-08 Markus Rost <rost@ias.edu> | ||
| 2 | |||
| 3 | * wid-edit.el (widget-button-click): Wrap with save-excursion | ||
| 4 | to restore track-mouse in the correct buffer. | ||
| 5 | |||
| 6 | 1999-11-08 Gerd Moellmann <gerd@gnu.org> | ||
| 7 | |||
| 8 | * mail/mh-e.el: Changed maintainer to billcurtis@hotmail.com. | ||
| 9 | |||
| 10 | 1999-11-08 Peter Kleiweg <kleiweg@let.rug.nl> | ||
| 11 | |||
| 12 | * progmodes/ps-mode.el (ps-mode-print-function): Changed default | ||
| 13 | lpr-command to "lp" for some system-types. (copied from lpr.el | ||
| 14 | Emacs version 20.2.1). | ||
| 15 | |||
| 1 | 1999-11-04 Markus Rost <rost@ias.edu> | 16 | 1999-11-04 Markus Rost <rost@ias.edu> |
| 2 | 17 | ||
| 3 | * simple.el (comment-region): Strip off white space at end of | 18 | * 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.") | |||
| 928 | (mouse-face (overlay-get overlay 'mouse-face))) | 928 | (mouse-face (overlay-get overlay 'mouse-face))) |
| 929 | (unwind-protect | 929 | (unwind-protect |
| 930 | (let ((track-mouse t)) | 930 | (let ((track-mouse t)) |
| 931 | (overlay-put overlay | 931 | (save-excursion |
| 932 | 'face widget-button-pressed-face) | 932 | (overlay-put overlay |
| 933 | (overlay-put overlay | 933 | 'face widget-button-pressed-face) |
| 934 | 'mouse-face widget-button-pressed-face) | 934 | (overlay-put overlay |
| 935 | (unless (widget-apply button :mouse-down-action event) | 935 | 'mouse-face widget-button-pressed-face) |
| 936 | (while (not (button-release-event-p event)) | 936 | (unless (widget-apply button :mouse-down-action event) |
| 937 | (setq event (widget-read-event) | 937 | (while (not (button-release-event-p event)) |
| 938 | pos (widget-event-point event)) | 938 | (setq event (widget-read-event) |
| 939 | (if (and pos | 939 | pos (widget-event-point event)) |
| 940 | (eq (get-char-property pos 'button) | 940 | (if (and pos |
| 941 | button)) | 941 | (eq (get-char-property pos 'button) |
| 942 | (progn | 942 | button)) |
| 943 | (overlay-put overlay | 943 | (progn |
| 944 | 'face | 944 | (overlay-put overlay |
| 945 | widget-button-pressed-face) | 945 | 'face |
| 946 | (overlay-put overlay | 946 | widget-button-pressed-face) |
| 947 | 'mouse-face | 947 | (overlay-put overlay |
| 948 | widget-button-pressed-face)) | 948 | 'mouse-face |
| 949 | (overlay-put overlay 'face face) | 949 | widget-button-pressed-face)) |
| 950 | (overlay-put overlay 'mouse-face mouse-face)))) | 950 | (overlay-put overlay 'face face) |
| 951 | (when (and pos | 951 | (overlay-put overlay 'mouse-face mouse-face)))) |
| 952 | (eq (get-char-property pos 'button) button)) | 952 | (when (and pos |
| 953 | (widget-apply-action button event))) | 953 | (eq (get-char-property pos 'button) button)) |
| 954 | (widget-apply-action button event)))) | ||
| 954 | (overlay-put overlay 'face face) | 955 | (overlay-put overlay 'face face) |
| 955 | (overlay-put overlay 'mouse-face mouse-face))) | 956 | (overlay-put overlay 'mouse-face mouse-face))) |
| 956 | (let ((up t) | 957 | (let ((up t) |