diff options
| author | Richard M. Stallman | 1996-01-02 16:35:13 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1996-01-02 16:35:13 +0000 |
| commit | 599431abfb98d3b33b08d33625f7cc52a6e125f6 (patch) | |
| tree | bd2c66de8b10c3b460907dc74d27689af6892c5a | |
| parent | 5411544782cf59fe135eff3732952f16e06c5a06 (diff) | |
| download | emacs-599431abfb98d3b33b08d33625f7cc52a6e125f6.tar.gz emacs-599431abfb98d3b33b08d33625f7cc52a6e125f6.zip | |
(xterm-mouse-translate, xterm-mouse-event):
Variable `last' renamed to `xterm-mouse-last'.
(xterm-mouse-last): Add defvar.
| -rw-r--r-- | lisp/xt-mouse.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el index f7f0aaa4633..07211b08af3 100644 --- a/lisp/xt-mouse.el +++ b/lisp/xt-mouse.el | |||
| @@ -38,12 +38,14 @@ | |||
| 38 | 38 | ||
| 39 | (define-key function-key-map "\e[M" 'xterm-mouse-translate) | 39 | (define-key function-key-map "\e[M" 'xterm-mouse-translate) |
| 40 | 40 | ||
| 41 | (defvar xterm-mouse-last) | ||
| 42 | |||
| 41 | (defun xterm-mouse-translate (event) | 43 | (defun xterm-mouse-translate (event) |
| 42 | ;; Read a click and release event from XTerm. | 44 | ;; Read a click and release event from XTerm. |
| 43 | (save-excursion | 45 | (save-excursion |
| 44 | (save-window-excursion | 46 | (save-window-excursion |
| 45 | (deactivate-mark) | 47 | (deactivate-mark) |
| 46 | (let* ((last) | 48 | (let* ((xterm-mouse-last) |
| 47 | (down (xterm-mouse-event)) | 49 | (down (xterm-mouse-event)) |
| 48 | (down-command (nth 0 down)) | 50 | (down-command (nth 0 down)) |
| 49 | (down-data (nth 1 down)) | 51 | (down-data (nth 1 down)) |
| @@ -73,7 +75,7 @@ | |||
| 73 | ;; Generate a drag event. | 75 | ;; Generate a drag event. |
| 74 | (if (symbolp down-where) | 76 | (if (symbolp down-where) |
| 75 | 0 | 77 | 0 |
| 76 | (list (intern (concat "drag-mouse-" (+ 1 last))) | 78 | (list (intern (concat "drag-mouse-" (+ 1 xterm-mouse-last))) |
| 77 | down-data click-data)) | 79 | down-data click-data)) |
| 78 | ))) | 80 | ))) |
| 79 | (if (and (symbolp down-where) | 81 | (if (and (symbolp down-where) |
| @@ -115,8 +117,8 @@ | |||
| 115 | (point)) | 117 | (point)) |
| 116 | where)) | 118 | where)) |
| 117 | (mouse (intern (if (eq type 3) | 119 | (mouse (intern (if (eq type 3) |
| 118 | (concat "mouse-" (+ 1 last)) | 120 | (concat "mouse-" (+ 1 xterm-mouse-last)) |
| 119 | (setq last type) | 121 | (setq xterm-mouse-last type) |
| 120 | (concat "down-mouse-" (+ 1 type)))))) | 122 | (concat "down-mouse-" (+ 1 type)))))) |
| 121 | (setq xterm-mouse-x x | 123 | (setq xterm-mouse-x x |
| 122 | xterm-mouse-y y) | 124 | xterm-mouse-y y) |