]> code.delx.au - gnu-emacs/blobdiff - lisp/xt-mouse.el
(normal-splash-screen, fancy-splash-screens-1): Add a reference to the Lisp
[gnu-emacs] / lisp / xt-mouse.el
index 90e127487f559d884defd7bde6e6349cf14f9acc..96990ee8ebebddf367c68c501536907a047f648a 100644 (file)
@@ -1,6 +1,7 @@
 ;;; xt-mouse.el --- support the mouse when emacs run in an xterm
 
-;; Copyright (C) 1994, 2000, 2001, 2005 Free Software Foundation
+;; Copyright (C) 1994, 2000, 2001, 2002, 2003,
+;;   2004, 2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
 ;; Keywords: mouse, terminals
@@ -19,8 +20,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
@@ -38,9 +39,6 @@
 
 ;;; Todo:
 
-;; The xterm mouse escape codes are supposedly also supported by the
-;; Linux console, but I have not been able to verify this.
-
 ;; Support multi-click -- somehow.
 
 ;;; Code:
 
     (setq xterm-mouse-x x
          xterm-mouse-y y)
-    (if w
-       (list mouse (posn-at-x-y (- x left) (- y top) w t))
-      (list mouse
-           (append (list nil 'menu-bar) (nthcdr 2 (posn-at-x-y x y w t)))))))
+    (setq
+     last-input-event
+     (if w
+        (list mouse (posn-at-x-y (- x left) (- y top) w t))
+       (list mouse
+            (append (list nil 'menu-bar) (nthcdr 2 (posn-at-x-y x y w t))))))))
 
 ;;;###autoload
 (define-minor-mode xterm-mouse-mode
@@ -162,27 +162,6 @@ single clicks are supported.  When turned on, the normal xterm
 mouse functionality for such clicks is still available by holding
 down the SHIFT key while pressing the mouse button."
   :global t :group 'mouse
-  ;; Do not change the :init-value below, without corresponding
-  ;; changes in the related code in startup.el.
-  :init-value (unless (or noninteractive
-                         window-system
-                         (null term-file-prefix))
-               (let ((term (getenv "TERM"))
-                     hyphend)
-                 (while
-                     (and term
-                          (not (load (concat term-file-prefix term) t t)))
-                   ;; Strip off last hyphen and what follows, then
-                   ;; try again
-                   (setq term
-                         (if (setq hyphend
-                                   (string-match "[-_][^-_]+$" term))
-                             (substring term 0 hyphend)
-                           nil)))
-                 (and term
-                      (string-match "^\\(xterm\\|rxvt\\|dtterm\\|eterm\\)"
-                                    term)
-                      t)))
   (if xterm-mouse-mode
       ;; Turn it on
       (unless window-system