From: Glenn Morris <rgm@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: emacs-24 r117258: * lisp/xt-mouse.el (xterm-mouse-translate-1): Fix last change.
Date: Sat, 21 Jun 2014 15:54:02 -0400 [thread overview]
Message-ID: <3nbntmjaxx.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <E1WxNvx-0000Xo-GX@vcs.savannah.gnu.org> (Stefan Monnier's message of "Wed, 18 Jun 2014 22:02:21 +0000")
I had trouble merging this to trunk; please check the result.
In particular I just dropped the first hunk.
Stefan Monnier wrote:
> revno: 117258
> revision-id: monnier@iro.umontreal.ca-20140618220215-085wg9620hrgpor1
> parent: eliz@gnu.org-20140618165726-eivjwux3p3x0m8qc
> fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17776
> committer: Stefan Monnier <monnier@iro.umontreal.ca>
> branch nick: emacs-24
> timestamp: Wed 2014-06-18 18:02:15 -0400
> message:
> * lisp/xt-mouse.el (xterm-mouse-translate-1): Fix last change.
> (xterm-mouse--read-event-sequence-1000): Drop unknown events instead of
> burping.
> modified:
> lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
> lisp/xt-mouse.el xtmouse.el-20091113204419-o5vbwnq5f7feedwu-905
>
> === modified file 'lisp/ChangeLog'
> --- a/lisp/ChangeLog 2014-06-18 15:15:52 +0000
> +++ b/lisp/ChangeLog 2014-06-18 22:02:15 +0000
> @@ -1,3 +1,9 @@
> +2014-06-18 Stefan Monnier <monnier@iro.umontreal.ca>
> +
> + * xt-mouse.el (xterm-mouse-translate-1): Fix last change (bug#17776).
> + (xterm-mouse--read-event-sequence-1000): Drop unknown events instead of
> + burping.
> +
> 2014-06-18 Eli Zaretskii <eliz@gnu.org>
>
> * term/w32-win.el (dynamic-library-alist): Support giflib 5.1.0
>
> === modified file 'lisp/xt-mouse.el'
> --- a/lisp/xt-mouse.el 2014-05-08 01:46:15 +0000
> +++ b/lisp/xt-mouse.el 2014-06-18 22:02:15 +0000
> @@ -76,7 +76,7 @@
> (is-down (string-match "down" (symbol-name (car down)))))
>
> ;; Retrieve the expected preface for the up-event.
> - (unless is-down
> + (when is-down
> (unless (cond ((null extension)
> (and (eq (read-event) ?\e)
> (eq (read-event) ?\[)
> @@ -158,28 +158,27 @@
> (defun xterm-mouse--read-event-sequence-1000 ()
> (let* ((code (- (read-event) 32))
> (type
> - (intern
> - ;; For buttons > 3, the release-event looks differently
> - ;; (see xc/programs/xterm/button.c, function EditorButton),
> - ;; and come in a release-event only, no down-event.
> - (cond ((>= code 64)
> - (format "mouse-%d" (- code 60)))
> - ((memq code '(8 9 10))
> - (setq xterm-mouse-last (- code 8))
> - (format "M-down-mouse-%d" (- code 7)))
> - ((and (= code 11) xterm-mouse-last)
> - (format "M-mouse-%d" (1+ xterm-mouse-last)))
> - ((and (= code 3) xterm-mouse-last)
> - ;; For buttons > 5 xterm only reports a button-release event.
> - ;; Drop them since they're not usable and can be spurious.
> - (format "mouse-%d" (1+ xterm-mouse-last)))
> - ((memq code '(0 1 2))
> - (setq xterm-mouse-last code)
> - (format "down-mouse-%d" (+ 1 code))))))
> + ;; For buttons > 3, the release-event looks differently
> + ;; (see xc/programs/xterm/button.c, function EditorButton),
> + ;; and come in a release-event only, no down-event.
> + (cond ((>= code 64)
> + (format "mouse-%d" (- code 60)))
> + ((memq code '(8 9 10))
> + (setq xterm-mouse-last (- code 8))
> + (format "M-down-mouse-%d" (- code 7)))
> + ((and (= code 11) xterm-mouse-last)
> + (format "M-mouse-%d" (1+ xterm-mouse-last)))
> + ((and (= code 3) xterm-mouse-last)
> + ;; For buttons > 5 xterm only reports a button-release event.
> + ;; Drop them since they're not usable and can be spurious.
> + (format "mouse-%d" (1+ xterm-mouse-last)))
> + ((memq code '(0 1 2))
> + (setq xterm-mouse-last code)
> + (format "down-mouse-%d" (+ 1 code)))))
> (x (- (read-event) 33))
> (y (- (read-event) 33)))
> (and type (wholenump x) (wholenump y)
> - (list type x y))))
> + (list (intern type) x y))))
>
> ;; XTerm's 1006-mode terminal mouse click reporting has the form
> ;; <BUTTON> ; <X> ; <Y> <M or m>, where the button and ordinates are
next parent reply other threads:[~2014-06-21 19:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1WxNvx-0000Xo-GX@vcs.savannah.gnu.org>
2014-06-21 19:54 ` Glenn Morris [this message]
2014-06-22 12:16 ` emacs-24 r117258: * lisp/xt-mouse.el (xterm-mouse-translate-1): Fix last change Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3nbntmjaxx.fsf@fencepost.gnu.org \
--to=rgm@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).