X-Git-Url: https://git.hcoop.net/bpt/emacs.git/blobdiff_plain/a74b0a725ac1699b1cb0e2b11dc782ff68d9364f..b14e3e21ec6702d27257a1400681fc36ee10282f:/lisp/term/sup-mouse.el diff --git a/lisp/term/sup-mouse.el b/lisp/term/sup-mouse.el index 13fb796e39..6d77241008 100644 --- a/lisp/term/sup-mouse.el +++ b/lisp/term/sup-mouse.el @@ -1,6 +1,6 @@ ;;; sup-mouse.el --- supdup mouse support for lisp machines -;; Copyright (C) Free Software Foundation 1985, 1986 +;; Copyright (C) 1985-1986, 2001-2011 Free Software Foundation, Inc. ;; Author: Wolfgang Rupprecht ;; Maintainer: FSF @@ -11,10 +11,10 @@ ;; This file is part of GNU Emacs. -;; GNU Emacs is free software; you can redistribute it and/or modify +;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -22,16 +22,19 @@ ;; GNU General Public License for more details. ;; 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. +;; along with GNU Emacs. If not, see . + +;;; Commentary: ;;; Code: ;;; User customization option: -(defvar sup-mouse-fast-select-window nil - "*Non-nil for mouse hits to select new window, then execute; else just select.") +(defcustom sup-mouse-fast-select-window nil + "Non-nil means mouse hits select new window, then execute. +Otherwise just select." + :type 'boolean + :group 'mouse) (defconst mouse-left 0) (defconst mouse-center 1) @@ -64,7 +67,7 @@ on modeline on \"scroll bar\" in minibuffer L scroll-up line to top execute-extended-command C proportional goto-char line to middle mouse-help R scroll-down line to bottom eval-expression" - + (interactive) (let* ;; expect a string of :;;c @@ -148,7 +151,7 @@ on modeline on \"scroll bar\" in minibuffer ((= buttons mouse-left) (call-interactively 'execute-extended-command)) ((= buttons mouse-center) - (describe-function 'sup-mouse-report)); silly self help + (describe-function 'sup-mouse-report)); silly self help )) (t ;in another window (select-window window) @@ -191,6 +194,7 @@ X and Y are 0-based character positions in the window." (defun sup-pos-to-window (x y) "Find window corresponding to frame coordinates. X and Y are 0-based character positions on the frame." - (some-window (lambda (w) (coordinates-in-window-p (cons x y) w)))) + (get-window-with-predicate (lambda (w) + (coordinates-in-window-p (cons x y) w)))) ;;; sup-mouse.el ends here