emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/lisp ChangeLog xt-mouse.el


From: Dan Nicolaescu
Subject: [Emacs-diffs] emacs/lisp ChangeLog xt-mouse.el
Date: Thu, 05 Feb 2009 07:12:29 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Dan Nicolaescu <dann>   09/02/05 07:12:28

Modified files:
        lisp           : ChangeLog xt-mouse.el 

Log message:
        (turn-on-xterm-mouse-tracking-on-terminal)
        (turn-off-xterm-mouse-tracking-on-terminal): Do not turn on the
        mode on the initial terminal.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.15259&r2=1.15260
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/xt-mouse.el?cvsroot=emacs&r1=1.57&r2=1.58

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.15259
retrieving revision 1.15260
diff -u -b -r1.15259 -r1.15260
--- ChangeLog   5 Feb 2009 06:47:31 -0000       1.15259
+++ ChangeLog   5 Feb 2009 07:12:27 -0000       1.15260
@@ -1,3 +1,9 @@
+2009-02-05  Dan Nicolaescu  <address@hidden>
+
+       * xt-mouse.el (turn-on-xterm-mouse-tracking-on-terminal)
+       (turn-off-xterm-mouse-tracking-on-terminal): Do not turn on the
+       mode on the initial terminal.
+
 2009-02-05  Nick Roberts  <address@hidden>
 
        * vc-dir.el (vc-dir-find-file-other-window): Allow mouse events.

Index: xt-mouse.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/xt-mouse.el,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -b -r1.57 -r1.58
--- xt-mouse.el 5 Jan 2009 03:19:58 -0000       1.57
+++ xt-mouse.el 5 Feb 2009 07:12:28 -0000       1.58
@@ -236,7 +236,10 @@
 
 (defun turn-on-xterm-mouse-tracking-on-terminal (&optional terminal)
   "Enable xterm mouse tracking on TERMINAL."
-  (when (and xterm-mouse-mode (eq t (terminal-live-p terminal)))
+  (when (and xterm-mouse-mode (eq t (terminal-live-p terminal))
+            ;; Avoid the initial terminal which is not a termcap device.
+            ;; FIXME: is there more elegant way to detect the initial terminal?
+            (not (string= (terminal-name terminal) "initial_terminal")))
     (unless (terminal-parameter terminal 'xterm-mouse-mode)
       ;; Simulate selecting a terminal by selecting one of its frames ;-(
       (with-selected-frame (car (frames-on-display-list terminal))
@@ -249,7 +252,10 @@
   ;; Only send the disable command to those terminals to which we've already
   ;; sent the enable command.
   (when (and (terminal-parameter terminal 'xterm-mouse-mode)
-             (eq t (terminal-live-p terminal)))
+             (eq t (terminal-live-p terminal))
+            ;; Avoid the initial terminal which is not a termcap device.
+            ;; FIXME: is there more elegant way to detect the initial terminal?
+            (not (string= (terminal-name terminal) "initial_terminal")))
     ;; We could remove the key-binding and unset the `xterm-mouse-mode'
     ;; terminal parameter, but it seems less harmful to send this escape
     ;; command too many times (or to catch an unintended key sequence), than




reply via email to

[Prev in Thread] Current Thread [Next in Thread]