annotate lisp/emulation/viper-mous.el @ 14365:ef148b168aad

Support for buffer local fontification functions. Global Font Lock mode. Support for `eval' keywords.
author Simon Marshall <simon@gnu.org>
date Thu, 25 Jan 1996 10:38:39 +0000
parents 396316e5fbe6
children 854325337547
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13337
84acc3adcd63 Comment change.
Richard M. Stallman <rms@gnu.org>
parents: 13212
diff changeset
1 ;;; viper-mous.el --- mouse support for Viper
84acc3adcd63 Comment change.
Richard M. Stallman <rms@gnu.org>
parents: 13212
diff changeset
2
12140
75379a19c5d5 Changed vip-*-frame-* to *-frame-*, incorporated overlay strings,
Karl Heuer <kwzh@gnu.org>
parents: 11288
diff changeset
3 ;; Copyright (C) 1994, 1995 Free Software Foundation, Inc.
11288
d1f620273acb Add copyright.
Karl Heuer <kwzh@gnu.org>
parents: 10789
diff changeset
4
10789
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
5 ;; This file is part of GNU Emacs.
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
6
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
7 ;; GNU Emacs is free software; you can redistribute it and/or modify
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
8 ;; it under the terms of the GNU General Public License as published by
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
9 ;; the Free Software Foundation; either version 2, or (at your option)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
10 ;; any later version.
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
11
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
12 ;; GNU Emacs is distributed in the hope that it will be useful,
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
13 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
14 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
15 ;; GNU General Public License for more details.
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
16
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
17 ;; You should have received a copy of the GNU General Public License
14169
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13337
diff changeset
18 ;; along with GNU Emacs; see the file COPYING. If not, write to the
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13337
diff changeset
19 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13337
diff changeset
20 ;; Boston, MA 02111-1307, USA.
10789
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
21
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
22 (require 'viper-util)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
23
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
24
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
25 ;;; Variables
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
26
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
27 ;; Variable used for catching the switch-frame event.
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
28 ;; If non-nil, indicates that previous-frame should be the selected
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
29 ;; one. Used by vip-mouse-click-get-word. Not a user option.
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
30 (defvar vip-frame-of-focus nil)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
31
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
32 ;; Frame that was selected before the switch-frame event.
12140
75379a19c5d5 Changed vip-*-frame-* to *-frame-*, incorporated overlay strings,
Karl Heuer <kwzh@gnu.org>
parents: 11288
diff changeset
33 (defconst vip-current-frame-saved (selected-frame))
10789
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
34
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
35 (defvar vip-surrounding-word-function 'vip-surrounding-word
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
36 "*Function that determines what constitutes a word for clicking events.
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
37 Takes two parameters: a COUNT, indicating how many words to return,
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
38 and CLICK-COUNT, telling whether this is the first click, a double-click,
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
39 or a tripple-click.")
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
40
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
41 ;; time interval in millisecond within which successive clicks are
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
42 ;; considered related
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
43 (defconst vip-multiclick-timeout (if vip-xemacs-p
12694
9dedaee6ee1c (vip-multiclick-timeout): new default.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12140
diff changeset
44 mouse-track-multi-click-time
9dedaee6ee1c (vip-multiclick-timeout): new default.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12140
diff changeset
45 double-click-time)
10789
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
46 "*Time interval in millisecond within which successive clicks are
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
47 considered related.")
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
48
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
49 ;; current event click count; XEmacs only
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
50 (defvar vip-current-click-count 0)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
51 ;; time stamp of the last click event; XEmacs only
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
52 (defvar vip-last-click-event-timestamp 0)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
53
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
54 ;; Local variable used to toggle wraparound search on click.
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
55 (vip-deflocalvar vip-mouse-click-search-noerror t)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
56
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
57 ;; Local variable used to delimit search after wraparound.
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
58 (vip-deflocalvar vip-mouse-click-search-limit nil)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
59
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
60 ;; remembers prefix argument to pass along to commands invoked by second
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
61 ;; click.
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
62 ;; This is needed because in Emacs (not XEmacs), assigning to preix-arg
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
63 ;; causes Emacs to count the second click as if it was a single click
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
64 (defvar vip-global-prefix-argument nil)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
65
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
66
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
67
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
68 ;;; Code
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
69
12140
75379a19c5d5 Changed vip-*-frame-* to *-frame-*, incorporated overlay strings,
Karl Heuer <kwzh@gnu.org>
parents: 11288
diff changeset
70 (defsubst vip-multiclick-p ()
10789
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
71 (not (vip-sit-for-short vip-multiclick-timeout t)))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
72
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
73 (defun vip-surrounding-word (count click-count)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
74 "Returns word surrounding point according to a heuristic.
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
75 COUNT indicates how many regions to return.
12694
9dedaee6ee1c (vip-multiclick-timeout): new default.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12140
diff changeset
76 If CLICK-COUNT is 1, `word' is a word in Vi sense.
9dedaee6ee1c (vip-multiclick-timeout): new default.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12140
diff changeset
77 If CLICK-COUNT is 2,then `word' is a Word in Vi sense.
10789
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
78 If the character clicked on is a non-separator and is non-alphanumeric but
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
79 is adjacent to an alphanumeric symbol, then it is considered alphanumeric
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
80 for the purpose of this command. If this character has a matching
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
81 character, such as `\(' is a match for `\)', then the matching character is
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
82 also considered alphanumeric.
12694
9dedaee6ee1c (vip-multiclick-timeout): new default.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12140
diff changeset
83 For convenience, in Lisp modes, `-' is considered alphanumeric.
9dedaee6ee1c (vip-multiclick-timeout): new default.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12140
diff changeset
84
9dedaee6ee1c (vip-multiclick-timeout): new default.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12140
diff changeset
85 If CLICK-COUNT is 3 or more, returns the line clicked on with leading and
9dedaee6ee1c (vip-multiclick-timeout): new default.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12140
diff changeset
86 trailing space and tabs removed. In that case, the first argument, COUNT,
9dedaee6ee1c (vip-multiclick-timeout): new default.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12140
diff changeset
87 is ignored."
13212
73b3decace33 * viper-mous.el (vip-surrounding-word): modified to understand tripple clicks.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12898
diff changeset
88 (let ((modifiers "")
12898
e5d4ba91148f (vip-surrounding-word): modified to understand tripple clicks.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12694
diff changeset
89 beg skip-flag result
13212
73b3decace33 * viper-mous.el (vip-surrounding-word): modified to understand tripple clicks.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12898
diff changeset
90 word-beg)
12898
e5d4ba91148f (vip-surrounding-word): modified to understand tripple clicks.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12694
diff changeset
91 (if (> click-count 2)
12694
9dedaee6ee1c (vip-multiclick-timeout): new default.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12140
diff changeset
92 (save-excursion
9dedaee6ee1c (vip-multiclick-timeout): new default.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12140
diff changeset
93 (beginning-of-line)
13212
73b3decace33 * viper-mous.el (vip-surrounding-word): modified to understand tripple clicks.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12898
diff changeset
94 (vip-skip-all-separators-forward 'within-line)
12694
9dedaee6ee1c (vip-multiclick-timeout): new default.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12140
diff changeset
95 (setq beg (point))
9dedaee6ee1c (vip-multiclick-timeout): new default.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12140
diff changeset
96 (end-of-line)
12898
e5d4ba91148f (vip-surrounding-word): modified to understand tripple clicks.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12694
diff changeset
97 (setq result (buffer-substring beg (point))))
12694
9dedaee6ee1c (vip-multiclick-timeout): new default.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12140
diff changeset
98
13212
73b3decace33 * viper-mous.el (vip-surrounding-word): modified to understand tripple clicks.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12898
diff changeset
99 (if (and (not (vip-looking-at-alphasep))
12694
9dedaee6ee1c (vip-multiclick-timeout): new default.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12140
diff changeset
100 (or (save-excursion (vip-backward-char-carefully)
13212
73b3decace33 * viper-mous.el (vip-surrounding-word): modified to understand tripple clicks.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12898
diff changeset
101 (vip-looking-at-alpha))
12694
9dedaee6ee1c (vip-multiclick-timeout): new default.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12140
diff changeset
102 (save-excursion (vip-forward-char-carefully)
13212
73b3decace33 * viper-mous.el (vip-surrounding-word): modified to understand tripple clicks.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12898
diff changeset
103 (vip-looking-at-alpha))))
73b3decace33 * viper-mous.el (vip-surrounding-word): modified to understand tripple clicks.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12898
diff changeset
104 (setq modifiers
12694
9dedaee6ee1c (vip-multiclick-timeout): new default.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12140
diff changeset
105 (cond ((looking-at "\\\\") "\\\\")
13212
73b3decace33 * viper-mous.el (vip-surrounding-word): modified to understand tripple clicks.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12898
diff changeset
106 ((looking-at "-") "C-C-")
12694
9dedaee6ee1c (vip-multiclick-timeout): new default.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12140
diff changeset
107 ((looking-at "[][]") "][")
9dedaee6ee1c (vip-multiclick-timeout): new default.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12140
diff changeset
108 ((looking-at "[()]") ")(")
9dedaee6ee1c (vip-multiclick-timeout): new default.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12140
diff changeset
109 ((looking-at "[{}]") "{}")
9dedaee6ee1c (vip-multiclick-timeout): new default.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12140
diff changeset
110 ((looking-at "[<>]") "<>")
9dedaee6ee1c (vip-multiclick-timeout): new default.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12140
diff changeset
111 ((looking-at "[`']") "`'")
13212
73b3decace33 * viper-mous.el (vip-surrounding-word): modified to understand tripple clicks.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12898
diff changeset
112 ((looking-at "\\^") "\\^")
73b3decace33 * viper-mous.el (vip-surrounding-word): modified to understand tripple clicks.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12898
diff changeset
113 ((vip-looking-at-separator) "")
12694
9dedaee6ee1c (vip-multiclick-timeout): new default.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12140
diff changeset
114 (t (char-to-string (following-char))))
13212
73b3decace33 * viper-mous.el (vip-surrounding-word): modified to understand tripple clicks.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12898
diff changeset
115 ))
10789
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
116
13212
73b3decace33 * viper-mous.el (vip-surrounding-word): modified to understand tripple clicks.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12898
diff changeset
117 ;; Add `-' to alphanum, if it wasn't added and if we are in Lisp
12694
9dedaee6ee1c (vip-multiclick-timeout): new default.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12140
diff changeset
118 (or (looking-at "-")
9dedaee6ee1c (vip-multiclick-timeout): new default.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12140
diff changeset
119 (not (string-match "lisp" (symbol-name major-mode)))
13212
73b3decace33 * viper-mous.el (vip-surrounding-word): modified to understand tripple clicks.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12898
diff changeset
120 (setq modifiers (concat modifiers "C-C-")))
12694
9dedaee6ee1c (vip-multiclick-timeout): new default.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12140
diff changeset
121
9dedaee6ee1c (vip-multiclick-timeout): new default.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12140
diff changeset
122
9dedaee6ee1c (vip-multiclick-timeout): new default.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12140
diff changeset
123 (save-excursion
13212
73b3decace33 * viper-mous.el (vip-surrounding-word): modified to understand tripple clicks.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12898
diff changeset
124 (cond ((> click-count 1) (vip-skip-nonseparators 'backward))
73b3decace33 * viper-mous.el (vip-surrounding-word): modified to understand tripple clicks.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12898
diff changeset
125 ((vip-looking-at-alpha modifiers)
73b3decace33 * viper-mous.el (vip-surrounding-word): modified to understand tripple clicks.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12898
diff changeset
126 (vip-skip-alpha-backward modifiers))
73b3decace33 * viper-mous.el (vip-surrounding-word): modified to understand tripple clicks.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12898
diff changeset
127 ((not (vip-looking-at-alphasep modifiers))
73b3decace33 * viper-mous.el (vip-surrounding-word): modified to understand tripple clicks.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12898
diff changeset
128 (vip-skip-nonalphasep-backward))
73b3decace33 * viper-mous.el (vip-surrounding-word): modified to understand tripple clicks.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12898
diff changeset
129 (t (if (> click-count 1)
73b3decace33 * viper-mous.el (vip-surrounding-word): modified to understand tripple clicks.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12898
diff changeset
130 (vip-skip-nonseparators 'backward)
73b3decace33 * viper-mous.el (vip-surrounding-word): modified to understand tripple clicks.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12898
diff changeset
131 (vip-skip-alpha-backward modifiers))))
73b3decace33 * viper-mous.el (vip-surrounding-word): modified to understand tripple clicks.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12898
diff changeset
132
12694
9dedaee6ee1c (vip-multiclick-timeout): new default.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12140
diff changeset
133 (setq word-beg (point))
9dedaee6ee1c (vip-multiclick-timeout): new default.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12140
diff changeset
134
13212
73b3decace33 * viper-mous.el (vip-surrounding-word): modified to understand tripple clicks.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12898
diff changeset
135 (setq skip-flag nil) ; don't move 1 char forw the first time
12694
9dedaee6ee1c (vip-multiclick-timeout): new default.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12140
diff changeset
136 (while (> count 0)
13212
73b3decace33 * viper-mous.el (vip-surrounding-word): modified to understand tripple clicks.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12898
diff changeset
137 (if skip-flag (vip-forward-char-carefully 1))
73b3decace33 * viper-mous.el (vip-surrounding-word): modified to understand tripple clicks.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12898
diff changeset
138 (setq skip-flag t) ; now always move 1 char forward
73b3decace33 * viper-mous.el (vip-surrounding-word): modified to understand tripple clicks.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12898
diff changeset
139 (if (> click-count 1)
73b3decace33 * viper-mous.el (vip-surrounding-word): modified to understand tripple clicks.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12898
diff changeset
140 (vip-skip-nonseparators 'forward)
73b3decace33 * viper-mous.el (vip-surrounding-word): modified to understand tripple clicks.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12898
diff changeset
141 (vip-skip-alpha-forward modifiers))
12694
9dedaee6ee1c (vip-multiclick-timeout): new default.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12140
diff changeset
142 (setq count (1- count)))
13212
73b3decace33 * viper-mous.el (vip-surrounding-word): modified to understand tripple clicks.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12898
diff changeset
143
12898
e5d4ba91148f (vip-surrounding-word): modified to understand tripple clicks.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12694
diff changeset
144 (setq result (buffer-substring word-beg (point))))
e5d4ba91148f (vip-surrounding-word): modified to understand tripple clicks.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12694
diff changeset
145 ) ; if
13212
73b3decace33 * viper-mous.el (vip-surrounding-word): modified to understand tripple clicks.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12898
diff changeset
146 ;; XEmacs doesn't have set-text-properties, but there buffer-substring
12898
e5d4ba91148f (vip-surrounding-word): modified to understand tripple clicks.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12694
diff changeset
147 ;; doesn't return properties together with the string, so it's not needed.
e5d4ba91148f (vip-surrounding-word): modified to understand tripple clicks.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12694
diff changeset
148 (if vip-emacs-p
e5d4ba91148f (vip-surrounding-word): modified to understand tripple clicks.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12694
diff changeset
149 (set-text-properties 0 (length result) nil result))
e5d4ba91148f (vip-surrounding-word): modified to understand tripple clicks.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12694
diff changeset
150 result
e5d4ba91148f (vip-surrounding-word): modified to understand tripple clicks.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12694
diff changeset
151 ))
10789
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
152
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
153
12694
9dedaee6ee1c (vip-multiclick-timeout): new default.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12140
diff changeset
154 (defun vip-mouse-click-get-word (click count click-count)
10789
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
155 "Returns word surrounding the position of a mouse click.
12694
9dedaee6ee1c (vip-multiclick-timeout): new default.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12140
diff changeset
156 Click may be in another window. Current window and buffer isn't changed.
9dedaee6ee1c (vip-multiclick-timeout): new default.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12140
diff changeset
157 On single or double click, returns the word as determined by
9dedaee6ee1c (vip-multiclick-timeout): new default.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12140
diff changeset
158 `vip-surrounding-word-function'."
10789
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
159
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
160 (let ((click-word "")
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
161 (click-pos (vip-mouse-click-posn click))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
162 (click-buf (vip-mouse-click-window-buffer click)))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
163 (or (numberp count) (setq count 1))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
164 (or (numberp click-count) (setq click-count 1))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
165
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
166 (save-excursion
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
167 (save-window-excursion
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
168 (if click-pos
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
169 (progn
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
170 (set-buffer click-buf)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
171
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
172 (goto-char click-pos)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
173 (setq click-word
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
174 (funcall vip-surrounding-word-function count click-count)))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
175 (error "Click must be over a window."))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
176 click-word))))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
177
12140
75379a19c5d5 Changed vip-*-frame-* to *-frame-*, incorporated overlay strings,
Karl Heuer <kwzh@gnu.org>
parents: 11288
diff changeset
178 ;; Returns window where click occurs
75379a19c5d5 Changed vip-*-frame-* to *-frame-*, incorporated overlay strings,
Karl Heuer <kwzh@gnu.org>
parents: 11288
diff changeset
179 (defsubst vip-mouse-click-frame (click)
75379a19c5d5 Changed vip-*-frame-* to *-frame-*, incorporated overlay strings,
Karl Heuer <kwzh@gnu.org>
parents: 11288
diff changeset
180 (window-frame (vip-mouse-click-window click)))
10789
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
181
12140
75379a19c5d5 Changed vip-*-frame-* to *-frame-*, incorporated overlay strings,
Karl Heuer <kwzh@gnu.org>
parents: 11288
diff changeset
182 ;; Returns window where click occurs
75379a19c5d5 Changed vip-*-frame-* to *-frame-*, incorporated overlay strings,
Karl Heuer <kwzh@gnu.org>
parents: 11288
diff changeset
183 (defsubst vip-mouse-click-window (click)
10789
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
184 (if vip-xemacs-p
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
185 (event-window click)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
186 (posn-window (event-start click))))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
187
12140
75379a19c5d5 Changed vip-*-frame-* to *-frame-*, incorporated overlay strings,
Karl Heuer <kwzh@gnu.org>
parents: 11288
diff changeset
188 ;; Returns the buffer of the window where click occurs
75379a19c5d5 Changed vip-*-frame-* to *-frame-*, incorporated overlay strings,
Karl Heuer <kwzh@gnu.org>
parents: 11288
diff changeset
189 (defsubst vip-mouse-click-window-buffer (click)
10789
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
190 (window-buffer (vip-mouse-click-window click)))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
191
12140
75379a19c5d5 Changed vip-*-frame-* to *-frame-*, incorporated overlay strings,
Karl Heuer <kwzh@gnu.org>
parents: 11288
diff changeset
192 ;; Returns the name of the buffer in the window where click occurs
75379a19c5d5 Changed vip-*-frame-* to *-frame-*, incorporated overlay strings,
Karl Heuer <kwzh@gnu.org>
parents: 11288
diff changeset
193 (defsubst vip-mouse-click-window-buffer-name (click)
10789
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
194 (buffer-name (vip-mouse-click-window-buffer click)))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
195
12140
75379a19c5d5 Changed vip-*-frame-* to *-frame-*, incorporated overlay strings,
Karl Heuer <kwzh@gnu.org>
parents: 11288
diff changeset
196 ;; Returns position of a click
75379a19c5d5 Changed vip-*-frame-* to *-frame-*, incorporated overlay strings,
Karl Heuer <kwzh@gnu.org>
parents: 11288
diff changeset
197 (defsubst vip-mouse-click-posn (click)
10789
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
198 (if vip-xemacs-p
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
199 (event-point click)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
200 (posn-point (event-start click))))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
201
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
202 (defun vip-mouse-click-insert-word (click arg)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
203 "Insert word clicked or double-clicked on.
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
204 With prefix argument, N, insert that many words.
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
205 This command must be bound to a mouse click.
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
206 The double-click action of the same mouse button must not be bound
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
207 \(or it must be bound to the same function\).
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
208 See `vip-surrounding-word' for the definition of a word in this case."
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
209 (interactive "e\nP")
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
210 (if vip-frame-of-focus ;; to handle clicks in another frame
12140
75379a19c5d5 Changed vip-*-frame-* to *-frame-*, incorporated overlay strings,
Karl Heuer <kwzh@gnu.org>
parents: 11288
diff changeset
211 (select-frame vip-frame-of-focus))
10789
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
212
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
213 ;; turn arg into a number
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
214 (cond ((numberp arg) nil)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
215 ;; prefix arg is a list when one hits C-u then command
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
216 ((and (listp arg) (numberp (car arg)))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
217 (setq arg (car arg)))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
218 (t (setq arg 1)))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
219
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
220 (let (click-count interrupting-event)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
221 (if (and
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
222 (vip-multiclick-p)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
223 ;; This trick checks if there is a pending mouse event
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
224 ;; if so, we use this latter event and discard the current mouse click
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
225 ;; If the next panding event is not a mouse event, we execute
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
226 ;; the current mouse event
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
227 (progn
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
228 (setq interrupting-event (vip-read-event))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
229 (vip-mouse-event-p last-input-event)))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
230 (progn ;; interrupted wait
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
231 (setq vip-global-prefix-argument arg)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
232 ;; count this click for XEmacs
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
233 (vip-event-click-count click))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
234 ;; uninterrupted wait or the interrupting event wasn't a mouse event
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
235 (setq click-count (vip-event-click-count click))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
236 (if (> click-count 1)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
237 (setq arg vip-global-prefix-argument
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
238 vip-global-prefix-argument nil))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
239 (insert (vip-mouse-click-get-word click arg click-count))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
240 (if (and interrupting-event
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
241 (eventp interrupting-event)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
242 (not (vip-mouse-event-p interrupting-event)))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
243 (vip-set-unread-command-events interrupting-event))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
244 )))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
245
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
246 ;; arg is an event. accepts symbols and numbers, too
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
247 (defun vip-mouse-event-p (event)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
248 (if (eventp event)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
249 (string-match "\\(mouse-\\|frame\\|screen\\|track\\)"
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
250 (prin1-to-string (vip-event-key event)))))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
251
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
252 ;; XEmacs has no double-click events. So, we must simulate.
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
253 ;; So, we have to simulate event-click-count.
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
254 (defun vip-event-click-count (click)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
255 (if vip-xemacs-p
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
256 (progn
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
257 ;; if more than 1 second
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
258 (if (> (- (event-timestamp click) vip-last-click-event-timestamp)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
259 vip-multiclick-timeout)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
260 (setq vip-current-click-count 0))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
261 (setq vip-last-click-event-timestamp (event-timestamp click)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
262 vip-current-click-count (1+ vip-current-click-count)))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
263 (event-click-count click)))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
264
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
265
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
266
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
267 (defun vip-mouse-click-search-word (click arg)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
268 "Find the word clicked or double-clicked on. Word may be in another window.
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
269 With prefix argument, N, search for N-th occurrence.
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
270 This command must be bound to a mouse click. The double-click action of the
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
271 same button must not be bound \(or it must be bound to the same function\).
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
272 See `vip-surrounding-word' for the details on what constitutes a word for
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
273 this command."
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
274 (interactive "e\nP")
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
275 (if vip-frame-of-focus ;; to handle clicks in another frame
12140
75379a19c5d5 Changed vip-*-frame-* to *-frame-*, incorporated overlay strings,
Karl Heuer <kwzh@gnu.org>
parents: 11288
diff changeset
276 (select-frame vip-frame-of-focus))
10789
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
277 (let (click-word click-count
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
278 (previous-search-string vip-s-string))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
279
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
280 (if (and
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
281 (vip-multiclick-p)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
282 ;; This trick checks if there is a pending mouse event
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
283 ;; if so, we use this latter event and discard the current mouse click
12694
9dedaee6ee1c (vip-multiclick-timeout): new default.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12140
diff changeset
284 ;; If the next pending event is not a mouse event, we execute
10789
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
285 ;; the current mouse event
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
286 (progn
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
287 (vip-read-event)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
288 (vip-mouse-event-p last-input-event)))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
289 (progn ;; interrupted wait
12694
9dedaee6ee1c (vip-multiclick-timeout): new default.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12140
diff changeset
290 (setq vip-global-prefix-argument
9dedaee6ee1c (vip-multiclick-timeout): new default.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12140
diff changeset
291 (or vip-global-prefix-argument arg))
10789
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
292 ;; remember command that was before the multiclick
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
293 (setq this-command last-command)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
294 ;; make sure we counted this event---needed for XEmacs only
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
295 (vip-event-click-count click))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
296 ;; uninterrupted wait
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
297 (setq click-count (vip-event-click-count click))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
298 (setq click-word (vip-mouse-click-get-word click nil click-count))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
299
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
300 (if (> click-count 1)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
301 (setq arg vip-global-prefix-argument
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
302 vip-global-prefix-argument nil))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
303 (setq arg (or arg 1))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
304
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
305 (vip-deactivate-mark)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
306 (if (or (not (string= click-word vip-s-string))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
307 (not (markerp vip-search-start-marker))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
308 (not (equal (marker-buffer vip-search-start-marker)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
309 (current-buffer)))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
310 (not (eq last-command 'vip-mouse-click-search-word)))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
311 (progn
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
312 (setq vip-search-start-marker (point-marker)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
313 vip-local-search-start-marker vip-search-start-marker
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
314 vip-mouse-click-search-noerror t
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
315 vip-mouse-click-search-limit nil)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
316
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
317 ;; make search string known to Viper
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
318 (setq vip-s-string (if vip-re-search
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
319 (regexp-quote click-word)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
320 click-word))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
321 (if (not (string= vip-s-string (car vip-search-history)))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
322 (setq vip-search-history
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
323 (cons vip-s-string vip-search-history)))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
324 ))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
325
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
326 (push-mark nil t)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
327 (while (> arg 0)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
328 (vip-forward-word 1)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
329 (condition-case nil
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
330 (progn
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
331 (if (not (search-forward click-word vip-mouse-click-search-limit
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
332 vip-mouse-click-search-noerror))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
333 (progn
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
334 (setq vip-mouse-click-search-noerror nil)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
335 (setq vip-mouse-click-search-limit
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
336 (save-excursion
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
337 (if (and
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
338 (markerp vip-local-search-start-marker)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
339 (marker-buffer vip-local-search-start-marker))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
340 (goto-char vip-local-search-start-marker))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
341 (vip-line-pos 'end)))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
342
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
343 (goto-char (point-min))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
344 (search-forward click-word
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
345 vip-mouse-click-search-limit nil)))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
346 (goto-char (match-beginning 0))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
347 (message "Searching for: %s" vip-s-string)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
348 (if (<= arg 1)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
349 (vip-flash-search-pattern))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
350 )
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
351 (error (beep 1)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
352 (if (or (not (string= click-word previous-search-string))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
353 (not (eq last-command 'vip-mouse-click-search-word)))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
354 (message "`%s': String not found in %s"
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
355 vip-s-string (buffer-name (current-buffer)))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
356 (message
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
357 "`%s': Last occurrence in %s. Back to beginning of search"
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
358 click-word (buffer-name (current-buffer)))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
359 (setq arg 1) ;; to terminate the loop
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
360 (sit-for 2))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
361 (setq vip-mouse-click-search-noerror t)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
362 (setq vip-mouse-click-search-limit nil)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
363 (if (and (markerp vip-local-search-start-marker)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
364 (marker-buffer vip-local-search-start-marker))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
365 (goto-char vip-local-search-start-marker))))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
366 (setq arg (1- arg)))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
367 )))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
368
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
369 (defun vip-mouse-catch-frame-switch (event arg)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
370 "Catch the event of switching frame.
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
371 Usually is bound to a 'down-mouse' event to work properly. See sample
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
372 bindings in viper.el and in the Viper manual."
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
373 (interactive "e\nP")
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
374 (setq vip-frame-of-focus nil)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
375 ;; pass prefix arg along to vip-mouse-click-search/insert-word
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
376 (setq prefix-arg arg)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
377 (if (eq last-command 'handle-switch-frame)
12140
75379a19c5d5 Changed vip-*-frame-* to *-frame-*, incorporated overlay strings,
Karl Heuer <kwzh@gnu.org>
parents: 11288
diff changeset
378 (setq vip-frame-of-focus vip-current-frame-saved))
10789
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
379 ;; make Emacs forget that it executed vip-mouse-catch-frame-switch
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
380 (setq this-command last-command))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
381
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
382 ;; Called just before switching frames. Saves the old selected frame.
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
383 ;; Sets last-command to handle-switch-frame (this is done automatically in
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
384 ;; Emacs.
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
385 ;; The semantics of switching frames is different in Emacs and XEmacs.
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
386 ;; In Emacs, if you select-frame A while mouse is over frame B and then
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
387 ;; start typing, input goes to frame B, which becomes selected.
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
388 ;; In XEmacs, input will go to frame A. This may be a bug in one of the
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
389 ;; Emacsen, but also may be a design decision.
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
390 ;; Also, in Emacs sending input to frame B generates handle-switch-frame
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
391 ;; event, while in XEmacs it doesn't.
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
392 ;; All this accounts for the difference in the behavior of
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
393 ;; vip-mouse-click-* commands when you click in a frame other than the one
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
394 ;; that was the last to receive input. In Emacs, focus will be in frame A
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
395 ;; until you do something other than vip-mouse-click-* command.
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
396 ;; In XEmacs, you have to manually select frame B (with the mouse click) in
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
397 ;; order to shift focus to frame B.
12140
75379a19c5d5 Changed vip-*-frame-* to *-frame-*, incorporated overlay strings,
Karl Heuer <kwzh@gnu.org>
parents: 11288
diff changeset
398 (defsubst vip-remember-current-frame (frame)
75379a19c5d5 Changed vip-*-frame-* to *-frame-*, incorporated overlay strings,
Karl Heuer <kwzh@gnu.org>
parents: 11288
diff changeset
399 (setq last-command 'handle-switch-frame
75379a19c5d5 Changed vip-*-frame-* to *-frame-*, incorporated overlay strings,
Karl Heuer <kwzh@gnu.org>
parents: 11288
diff changeset
400 vip-current-frame-saved (selected-frame)))
10789
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
401
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
402
12140
75379a19c5d5 Changed vip-*-frame-* to *-frame-*, incorporated overlay strings,
Karl Heuer <kwzh@gnu.org>
parents: 11288
diff changeset
403 (cond ((vip-window-display-p)
13212
73b3decace33 * viper-mous.el (vip-surrounding-word): modified to understand tripple clicks.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12898
diff changeset
404 (let* ((search-key (if vip-xemacs-p
14233
396316e5fbe6 *** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 14169
diff changeset
405 [(meta shift button1up)] [M-S-mouse-1]))
10789
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
406 (search-key-catch (if vip-xemacs-p
14233
396316e5fbe6 *** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 14169
diff changeset
407 [(meta shift button1)] [M-S-down-mouse-1]))
13212
73b3decace33 * viper-mous.el (vip-surrounding-word): modified to understand tripple clicks.
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 12898
diff changeset
408 (insert-key (if vip-xemacs-p
14233
396316e5fbe6 *** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 14169
diff changeset
409 [(meta shift button2up)] [M-S-mouse-2]))
10789
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
410 (insert-key-catch (if vip-xemacs-p
14233
396316e5fbe6 *** empty log message ***
Michael Kifer <kifer@cs.stonybrook.edu>
parents: 14169
diff changeset
411 [(meta shift button2)] [M-S-down-mouse-2]))
10789
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
412 (search-key-unbound (and (not (key-binding search-key))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
413 (not (key-binding search-key-catch))))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
414 (insert-key-unbound (and (not (key-binding insert-key))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
415 (not (key-binding insert-key-catch))))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
416 )
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
417
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
418 (if search-key-unbound
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
419 (global-set-key search-key 'vip-mouse-click-search-word))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
420 (if insert-key-unbound
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
421 (global-set-key insert-key 'vip-mouse-click-insert-word))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
422
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
423 ;; The following would be needed if you want to use the above two
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
424 ;; while clicking in another frame. If you only want to use them
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
425 ;; by clicking in another window, not frame, the bindings below
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
426 ;; aren't necessary.
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
427
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
428 ;; These must be bound to mouse-down event for the same mouse
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
429 ;; buttons as 'vip-mouse-click-search-word and
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
430 ;; 'vip-mouse-click-insert-word
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
431 (if search-key-unbound
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
432 (global-set-key search-key-catch 'vip-mouse-catch-frame-switch))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
433 (if insert-key-unbound
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
434 (global-set-key insert-key-catch 'vip-mouse-catch-frame-switch))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
435
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
436 (if vip-xemacs-p
12140
75379a19c5d5 Changed vip-*-frame-* to *-frame-*, incorporated overlay strings,
Karl Heuer <kwzh@gnu.org>
parents: 11288
diff changeset
437 (add-hook 'mouse-leave-frame-hook
75379a19c5d5 Changed vip-*-frame-* to *-frame-*, incorporated overlay strings,
Karl Heuer <kwzh@gnu.org>
parents: 11288
diff changeset
438 'vip-remember-current-frame)
10789
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
439 (defadvice handle-switch-frame (before vip-frame-advice activate)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
440 "Remember the selected frame before the switch-frame event."
12140
75379a19c5d5 Changed vip-*-frame-* to *-frame-*, incorporated overlay strings,
Karl Heuer <kwzh@gnu.org>
parents: 11288
diff changeset
441 (vip-remember-current-frame (selected-frame))))
10789
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
442 )))
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
443
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
444
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
445
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
446 (provide 'viper-mous)
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
447
af7c0bb1059f Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
448 ;;; viper-mous.el ends here