Mercurial > hg > xemacs-beta
comparison lisp/w3/w3-mouse.el @ 70:131b0175ea99 r20-0b30
Import from CVS: tag r20-0b30
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:02:59 +0200 |
parents | 8d2a9b52c682 |
children | 1ce6082ce73f |
comparison
equal
deleted
inserted
replaced
69:804d1389bcd6 | 70:131b0175ea99 |
---|---|
1 ;;; w3-menu.el --- Mouse specific functions for emacs-w3 | 1 ;;; w3-xemac.el --- XEmacs specific functions for emacs-w3 |
2 ;; Author: wmperry | 2 ;; Author: wmperry |
3 ;; Created: 1997/03/23 03:08:58 | 3 ;; Created: 1996/06/30 18:09:28 |
4 ;; Version: 1.8 | 4 ;; Version: 1.2 |
5 ;; Keywords: mouse, hypermedia | 5 ;; Keywords: mouse, hypermedia |
6 | 6 |
7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
8 ;;; Copyright (c) 1996 by William M. Perry (wmperry@cs.indiana.edu) | 8 ;;; Copyright (c) 1996 by William M. Perry (wmperry@cs.indiana.edu) |
9 ;;; Copyright (c) 1996, 1997 Free Software Foundation, Inc. | |
10 ;;; | 9 ;;; |
11 ;;; This file is part of GNU Emacs. | 10 ;;; This file is part of GNU Emacs. |
12 ;;; | 11 ;;; |
13 ;;; GNU Emacs is free software; you can redistribute it and/or modify | 12 ;;; GNU Emacs is free software; you can redistribute it and/or modify |
14 ;;; it under the terms of the GNU General Public License as published by | 13 ;;; it under the terms of the GNU General Public License as published by |
19 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of | 18 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 19 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
21 ;;; GNU General Public License for more details. | 20 ;;; GNU General Public License for more details. |
22 ;;; | 21 ;;; |
23 ;;; You should have received a copy of the GNU General Public License | 22 ;;; You should have received a copy of the GNU General Public License |
24 ;;; along with GNU Emacs; see the file COPYING. If not, write to the | 23 ;;; along with GNU Emacs; see the file COPYING. If not, write to |
25 ;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 24 ;;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
26 ;;; Boston, MA 02111-1307, USA. | |
27 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 25 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
28 (require 'w3-vars) | 26 (require 'w3-vars) |
29 | 27 |
30 (defun w3-follow-mouse-other-frame (e) | 28 (defun w3-follow-mouse-other-frame (e) |
31 "Function suitable to being bound to a mouse key. Follows the link under | 29 "Function suitable to being bound to a mouse key. Follows the link under |
53 (and (widget-get widget 'src) | 51 (and (widget-get widget 'src) |
54 (w3-fetch (widget-get widget 'src))))) | 52 (w3-fetch (widget-get widget 'src))))) |
55 | 53 |
56 (defvar w3-mouse-button1 (cond | 54 (defvar w3-mouse-button1 (cond |
57 ((and w3-running-xemacs (featurep 'mouse)) 'button1) | 55 ((and w3-running-xemacs (featurep 'mouse)) 'button1) |
58 (w3-running-xemacs nil) | 56 (w3-running-xemacs 'return) |
59 (t 'mouse-1))) | 57 (t 'mouse-1))) |
60 (defvar w3-mouse-button2 (cond | 58 (defvar w3-mouse-button2 (cond |
61 ((and w3-running-xemacs (featurep 'mouse)) 'button2) | 59 ((and w3-running-xemacs (featurep 'mouse)) 'button2) |
62 (w3-running-xemacs nil) | 60 (w3-running-xemacs 'return) |
63 (t 'mouse-2))) | 61 (t 'mouse-2))) |
64 (defvar w3-mouse-button3 (cond | 62 (defvar w3-mouse-button3 (cond |
65 ((and w3-running-xemacs (featurep 'mouse)) 'button3) | 63 ((and w3-running-xemacs (featurep 'mouse)) 'button3) |
66 (w3-running-xemacs nil) | 64 (w3-running-xemacs (list 'meta ?`)) |
67 (t 'mouse-3))) | 65 (t 'mouse-3))) |
68 | 66 |
69 (if w3-mouse-button2 | 67 (define-key w3-mode-map (vector w3-mouse-button2) 'w3-widget-button-click) |
70 (define-key w3-mode-map (vector w3-mouse-button2) 'w3-widget-button-click)) | 68 (define-key w3-mode-map (vector w3-mouse-button3) 'w3-popup-menu) |
71 (if w3-mouse-button3 | 69 (define-key w3-mode-map (vector (list 'shift w3-mouse-button2)) |
72 (define-key w3-mode-map (vector w3-mouse-button3) 'w3-popup-menu)) | 70 'w3-follow-mouse-other-frame) |
73 (if w3-mouse-button2 | |
74 (define-key w3-mode-map (vector (list 'shift w3-mouse-button2)) | |
75 'w3-follow-mouse-other-frame)) | |
76 | 71 |
77 (define-key w3-netscape-emulation-minor-mode-map (vector w3-mouse-button1) | 72 (define-key w3-netscape-emulation-minor-mode-map (vector w3-mouse-button1) |
78 'w3-widget-button-click) | 73 'w3-widget-button-click) |
79 (define-key w3-netscape-emulation-minor-mode-map (vector w3-mouse-button2) | 74 (define-key w3-netscape-emulation-minor-mode-map (vector w3-mouse-button2) |
80 'w3-follow-mouse-other-frame) | 75 'w3-follow-mouse-other-frame) |
81 | 76 |
82 (if w3-running-FSF19 | 77 (if w3-running-FSF19 |
83 (progn | 78 (progn |
84 (define-key w3-mode-map [mouse-movement] 'w3-mouse-handler) | 79 (define-key w3-mode-map [down-mouse-3] 'w3-popup-menu) |
85 (if w3-popup-menu-on-mouse-3 | 80 (define-key w3-mode-map [mouse-movement] 'w3-mouse-handler))) |
86 (define-key w3-mode-map [down-mouse-3] 'w3-popup-menu)))) | |
87 | |
88 | 81 |
89 (provide 'w3-mouse) | 82 (provide 'w3-mouse) |