;ELC   
;;; Compiled by pot@pot.cnuce.cnr.it on Tue Mar 18 15:39:50 2003
;;; from file /home/pot/gnu/emacs-pretest.new/lisp/emulation/viper-mous.el
;;; in Emacs version 21.3
;;; with bytecomp version 2.85.4.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.
(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`viper-mous.el' was compiled for Emacs 19.29 or later"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\304\305!\210\306B\307B\310B\311B\312B\313B\314B	\210\315\316!\210\317\320\321\322\323\324\325\326&\210\302B\327\302!\204= \321\303B\330 \321\207" [current-load-list noninteractive viper-frame-of-focus viper-current-frame-saved provide viper-mous double-click-time mouse-track-multi-click-time viper-search-start-marker viper-local-search-start-marker viper-search-history viper-s-string viper-re-search require viper-util custom-declare-group viper-mouse nil "Support for Viper special mouse-bound commands" :prefix "viper-" :group viper boundp selected-frame] 8)
#@235 *Function that determines what constitutes a word for clicking events.
Takes two parameters: a COUNT, indicating how many words to return, 
and CLICK-COUNT, telling whether this is the first click, a double-click,
or a tripple-click.
(custom-declare-variable 'viper-surrounding-word-function ''viper-surrounding-word '(#$ . -1231) :type 'symbol :group 'viper-mouse)
#@92 *Time interval in millisecond within which successive mouse clicks are
considered related.
(custom-declare-variable 'viper-multiclick-timeout '(if (viper-window-display-p) (if viper-xemacs-p mouse-track-multi-click-time double-click-time) 500) '(#$ . -1603) :type 'integer :group 'viper-mouse)
(byte-code "\301B\303\301!\204\f \304\302B\303\302!\204 \304\301\207" [current-load-list viper-current-click-count viper-last-click-event-timestamp boundp 0] 2)
#@20 nil
(buffer local)
(defvar viper-mouse-click-search-noerror t (#$ . 2071))
(make-variable-buffer-local 'viper-mouse-click-search-noerror)
#@20 nil
(buffer local)
(defvar viper-mouse-click-search-limit nil (#$ . 2215))
(byte-code "\306\307!\210\301B\310\301!\204 \311\302B\310\302!\204 \311\303B\310\303!\204( \311\304B\310\304!\2044 \311\305B\310\305!\204@ \311\311\207" [current-load-list viper-global-prefix-argument viper-mouse-up-search-key-parsed viper-mouse-down-search-key-parsed viper-mouse-up-insert-key-parsed viper-mouse-down-insert-key-parsed make-variable-buffer-local viper-mouse-click-search-limit boundp nil] 2)
(defalias 'viper-multiclick-p #[nil "\304\203 \305\n\306\245	\"\202 \305\307\n	#*?\207" [viper-multiclick-timeout nodisp val viper-xemacs-p t sit-for 1000.0 0] 4])
(put 'viper-multiclick-p 'byte-optimizer 'byte-compile-inline-expand)
(defalias 'viper-mouse-click-window #[(click) "\203\n \305	!\202 	\306\n8)\3078)\310\f!\203  \f\202# \311\312!)\207" [viper-xemacs-p click event position win event-window 1 0 window-live-p error "Click was not over a live window"] 2])
(defalias 'viper-mouse-click-frame #[(click) "\301\302!!\207" [click window-frame viper-mouse-click-window] 3])
(put 'viper-mouse-click-frame 'byte-optimizer 'byte-compile-inline-expand)
(defalias 'viper-mouse-click-window-buffer #[(click) "\301\302!!\207" [click window-buffer viper-mouse-click-window] 3])
(put 'viper-mouse-click-window-buffer 'byte-optimizer 'byte-compile-inline-expand)
(defalias 'viper-mouse-click-window-buffer-name #[(click) "\301\302\303!!)!\207" [click buffer-name window-buffer viper-mouse-click-window] 4])
(put 'viper-mouse-click-window-buffer-name 'byte-optimizer 'byte-compile-inline-expand)
(defalias 'viper-mouse-click-posn #[(click) "\203 \304	!\207	\305\n8)\3058:\203 \3058@\202  \3058)\207" [viper-xemacs-p click event position event-point 1] 2])
(put 'viper-mouse-click-posn 'byte-optimizer 'byte-compile-inline-expand)
#@754 Returns word surrounding point according to a heuristic.
COUNT indicates how many regions to return.
If CLICK-COUNT is 1, `word' is a word in Vi sense.
If CLICK-COUNT is 2,then `word' is a Word in Vi sense.
If the character clicked on is a non-separator and is non-alphanumeric but
is adjacent to an alphanumeric symbol, then it is considered alphanumeric
for the purpose of this command.  If this character has a matching
character, such as `(' is a match for `)', then the matching character is
also considered alphanumeric.
For convenience, in Lisp modes, `-' is considered alphanumeric.

If CLICK-COUNT is 3 or more, returns the line clicked on with leading and
trailing space and tabs removed.  In that case, the first argument, COUNT,
is ignored.
(defalias 'viper-surrounding-word #[(count click-count) "\306\307\211\211\211\310V\203U \212\311 \210\312\n2\313=\2033 \n\203+ 3\307w\210\202G 4\307w\210\202G \314\3155\n\206= \316\n\205E \317\320!$\210)`\307\210`{)\202b\3076\321 \206a \3226!)\204\330 \212\323 \210\322 )\204y \212\324 \210\322 )\203\330 \f\325\326!\203\204 \326\202\326 \325\327!\203\216 \330\202\326 \325\331!\203\230 \332\202\326 \325\333!\203\242 \334\202\326 \325\335!\203\254 \336\202\326 \325\337!\203\266 \340\202\326 \325\341!\203\300 \342\202\326 \325\343!\203\312 \343\202\326 \321 \203\323 \344\202\326 \345g!P\325\327!\204\354 \346\347\3507!\"\203\354 \f\330P\212\351V\203\372 \352\353!\210\202.\322\f!\203\354\f!\210\202.\f6\321 \206\3226!)\204\355 \210\202.\351V\203*\352\353!\210\202.\354\f!\210`\3078\356V\203]\n\203A\324\351!\210\357\351V\203P\352\315!\210\202T\360\f!\2108S\2118\2024`{)9\203o\361\356	G\307	$\210	-\207" [word-beg result skip-flag beg modifiers click-count "_" nil 2 beginning-of-line within-line strict-vi viper-skip-syntax forward "\n" viper-line-pos end viper-looking-at-separator viper-looking-at-alpha viper-backward-char-carefully viper-forward-char-carefully looking-at "\\\\" "-" "C-C-" "[][]" "][" "[()]" ")(" "[{}]" "{}" "[<>]" "<>" "[`']" "`'" "\\^" "" char-to-string string-match "lisp" symbol-name 1 viper-skip-nonseparators backward viper-skip-alpha-backward viper-skip-nonalphasep-backward 0 t viper-skip-alpha-forward set-text-properties viper-syntax-preference viper-strict-SEP-chars-sans-newline viper-strict-SEP-chars viper-SEP-char-class addl-chars major-mode count viper-emacs-p] 7 (#$ . 4075)])
#@227 Returns word surrounding the position of a mouse click.
Click may be in another window.  Current window and buffer isn't changed.
On single or double click, returns the word as determined by
`viper-surrounding-word-function'.
(defalias 'viper-mouse-click-get-word #[(click count click-count) "\306	\203 \307!\202& \310\n8)\3108:\203\" \3108@\202% \3108))\311\312!!)\313!\204= \310\313!\204G \310\212\314\213,\207" [click viper-xemacs-p event position click-buf click-pos "" event-point 1 window-buffer viper-mouse-click-window natnump ((byte-code "\203 	q\210b\210\n\f\"\202 \306\307!\210\207" [click-pos click-buf viper-surrounding-word-function count click-count click-word error "Click must be over a window"] 3)) click-word count click-count] 5 (#$ . 6509)])
#@320 Insert word clicked or double-clicked on.
With prefix argument, N, insert that many words.
This command must be bound to a mouse click.
The double-click action of the same mouse button must not be bound
(or it must be bound to the same function).
See `viper-surrounding-word' for the definition of a word in this case.
(defalias 'viper-mouse-click-insert-word #[(click arg) "\203 \306!\210\212\307	!\310=?\206# \307\n!\311=?\206# \205# \312\f!?)?\205\332 \250\204@ <\203> @\250\203> @\202@ \313\307	!\310=\205\332 \314\211\315\203d \316\317\245\"\202k \316\320#*\204\203 \321 \322!\203\203 \323\f!\202\331 \323\f!\211\313V\203\224 \314\324\f#c\210\205\331 \211\250\206\311 9\203\267 \325N\206\311 :\205\311 @9\205\311 @\325N)\205\331 \322!?\205\331 \326!*\207" [viper-frame-of-focus viper-mouse-down-insert-key-parsed viper-mouse-up-insert-key-parsed viper-xemacs-p click arg select-frame key-binding viper-mouse-catch-frame-switch viper-mouse-click-insert-word event-over-text-area-p 1 nil t sit-for 1000.0 0 viper-read-event viper-mouse-event-p viper-event-click-count viper-mouse-click-get-word event-symbol-elements viper-set-unread-command-events interrupting-event click-count viper-multiclick-timeout nodisp val last-input-event viper-global-prefix-argument obj] 5 (#$ . 7311) "e\nP"])
(defalias 'viper-mouse-event-p #[(event) "\211\250\206! 	9\203 	\302N\206! 	:\205! 	@9\205! 	@\302N)\205- \303\304\305\306!!\"\207" [event obj event-symbol-elements string-match "\\(mouse-\\|frame\\|screen\\|track\\)" prin1-to-string viper-event-key] 6])
(defalias 'viper-event-click-count #[(click) "\203 \303	!\207	\304\n8\250\203 \304\n8\202 \305)\207" [viper-xemacs-p click event viper-event-click-count-xemacs 2 1] 2])
(byte-code "\301B\302\301!\204\f \303\303\207" [current-load-list viper-counting-clicks-p boundp nil] 2)
(defalias 'viper-event-click-count-xemacs #[(click) "\306!	Z\307\f\203 \310 \210\202 \311V\203 \312\313 \210T\306!\307\311\203A \314\315\245\"\202H \314\312#*\203Q \202R \312*\207" [click viper-last-click-event-timestamp inhibit-quit time-delta viper-counting-clicks-p viper-multiclick-timeout event-timestamp nil ignore t 0 discard-input sit-for 1000.0 viper-current-click-count nodisp val viper-xemacs-p] 4])
#@371 Find the word clicked or double-clicked on.  Word may be in another window.
With prefix argument, N, search for N-th occurrence.
This command must be bound to a mouse click.  The double-click action of the
same button must not be bound (or it must be bound to the same function).
See `viper-surrounding-word' for the details on what constitutes a word for
this command.
(defalias 'viper-mouse-click-search-word #[(click arg) "\203 \306!\210\212\307	!\310=?\206# \307\n!\311=?\206# \205# \312\f!?)?\205\374 \313\211 !\314\"#\203G \315#\316\245\"\"\202N \315\317#\"#*\204o \320 \210\321$!\203o %\206c &%'(\322\f!\202\373 \322\f!\323\f\313#\324V\203\212 %&\313%&\206\220 \324&\325 \210\230\203\263 \326)!\203\263 \327)!p\232\203\263 '\311=\204\335 \330 \211)*\314+\313,-\203\314 \331!\202\316 \211.@\230\204\335 .B.\332\313\314\"\210&\317V\205\373 \333\324!\210\313\334\335\217\210&S\211&\202\344 +\207" [viper-frame-of-focus viper-mouse-down-search-key-parsed viper-mouse-up-search-key-parsed viper-xemacs-p click viper-s-string select-frame key-binding viper-mouse-catch-frame-switch viper-mouse-click-search-word event-over-text-area-p nil t sit-for 1000.0 0 viper-read-event viper-mouse-event-p viper-event-click-count viper-mouse-click-get-word 1 viper-deactivate-mark markerp marker-buffer point-marker regexp-quote push-mark viper-forward-word (byte-code "\306	\n#\204( \307\212\310!\203 \311!\203 b\210\312\313!)eb\210\306	\307#\210\314\224b\210\315\316\f\"\210\317X\203= \320 \210\321 \210\307\207" [click-word viper-mouse-click-search-limit viper-mouse-click-search-noerror viper-local-search-start-marker viper-s-string arg search-forward nil markerp marker-buffer viper-line-pos end 0 message "Searching for: %s" 1 viper-adjust-window viper-flash-search-pattern] 4) ((error (byte-code "\306\307!\210	\230\203 \n\310=\204 \311\312\313p!#\210\202) \311\314\313p!#\210\307\315\316!\210\317\320\321!\203@ \322!\203@ b\210\320\207" [click-word previous-search-string last-command viper-s-string arg viper-mouse-click-search-noerror beep 1 viper-mouse-click-search-word message "`%s': String not found in %s" buffer-name "`%s': Last occurrence in %s.  Back to beginning of search" sit-for 2 t nil markerp marker-buffer viper-mouse-click-search-limit viper-local-search-start-marker] 5))) click-count click-word previous-search-string viper-multiclick-timeout nodisp val last-input-event viper-global-prefix-argument arg last-command this-command viper-search-start-marker viper-local-search-start-marker viper-mouse-click-search-noerror viper-mouse-click-search-limit viper-re-search viper-search-history] 5 (#$ . 9664) "e\nP"])
#@138 Catch the event of switching frame.
Usually is bound to a `down-mouse' event to work properly.  See sample
bindings in the Viper manual.
(defalias 'viper-mouse-catch-frame-switch #[(event arg) "\306	\307=\203\f \f\211\207" [viper-frame-of-focus arg prefix-arg last-command viper-current-frame-saved this-command nil handle-switch-frame] 2 (#$ . 12388) "e\nP"])
(defalias 'viper-remember-current-frame #[(frame) "\302\303 \211\207" [last-command viper-current-frame-saved handle-switch-frame selected-frame] 2])
(put 'viper-remember-current-frame 'byte-optimizer 'byte-compile-inline-expand)
(defalias 'viper-parse-mouse-key #[(key-var event-type) "\306!\307\211\211\211\211\211$\205\310$>\203= %\203. &\311=\203* \312\202\227 \313\202\227 &\311=\2039 \314\202\227 \315\202\227 \316$>\203g %\203X &\311=\203T \317\202\227 \320\202\227 &\311=\203c \321\202\227 \322\202\227 \323$>\203\221 %\203\202 &\311=\203~ \324\202\227 \325\202\227 &\311=\203\215 \326\202\227 \327\202\227 \330\331$#\332$>\203\254 %\203\250 \333\202\262 \332\202\262 %\205\262 \334\335$>\203\307 %\203\303 \336\202\315 \335\202\315 %\205\315 \334\337$>\203\342 %\203\336 \340\202\350 \337\202\350 %\205\350 \334%\203\372 \341\342\n\fR!!\202\341\343\307\n\fF\"!\211.\207" [key-var key-spec control-spec shift-spec meta-spec button-spec eval nil 1 up "mouse-1" "down-mouse-1" button1up button1 2 "mouse-2" "down-mouse-2" button2up button2 3 "mouse-3" "down-mouse-3" button3up button3 error "%S: invalid button number, %S" meta "M-" "" shift "S-" control "C-" vector intern delq key viper-emacs-p event-type] 8])
(defalias 'viper-unbind-mouse-search-key #[nil "\203 \302!\210	\203 \302	!\210\303\303\211\207" [viper-mouse-up-search-key-parsed viper-mouse-down-search-key-parsed global-unset-key nil] 2])
(defalias 'viper-unbind-mouse-insert-key #[nil "\203 \302!\210	\203 \302	!\210\303\303\211\207" [viper-mouse-up-insert-key-parsed viper-mouse-down-insert-key-parsed global-unset-key nil] 2])
(defalias 'viper-bind-mouse-search-key #[(&optional force) "\303\304\305\"\303\304\306\"\203 	\204 \307\207\n\204+ \310!\203+ \310!\311=\204+ \312\313\"\207\n\204B \310	!\203B \310	!\314=\204B \312\313	\"\207\315\311\"\210\315	\314\"\207" [viper-mouse-up-search-key-parsed viper-mouse-down-search-key-parsed force viper-parse-mouse-key viper-mouse-search-key up down nil key-binding viper-mouse-click-search-word message "%S already bound to a mouse event.  Viper mouse-search feature disabled" viper-mouse-catch-frame-switch global-set-key] 3])
(defalias 'viper-bind-mouse-insert-key #[(&optional force) "\303\304\305\"\303\304\306\"\203 	\204 \307\207\n\204+ \310!\203+ \310!\311=\204+ \312\313\"\207\n\204B \310	!\203B \310	!\314=\204B \312\313	\"\207\315\311\"\210\315	\314\"\207" [viper-mouse-up-insert-key-parsed viper-mouse-down-insert-key-parsed force viper-parse-mouse-key viper-mouse-insert-key up down nil key-binding viper-mouse-click-insert-word message "%S already bound to a mouse event.  Viper mouse-insert feature disabled" viper-mouse-catch-frame-switch global-set-key] 3])
(defalias 'viper-reset-mouse-search-key #[(symb val) "\302 \210	L\210\303\304!\207" [symb val viper-unbind-mouse-search-key viper-bind-mouse-search-key force] 2])
(defalias 'viper-reset-mouse-insert-key #[(symb val) "\302 \210	L\210\303\304!\207" [symb val viper-unbind-mouse-insert-key viper-bind-mouse-insert-key force] 2])
#@429 *Key used to click-search in Viper.
This must be a list that specifies the mouse button and modifiers.
The supported modifiers are `meta', `shift', and `control'.
For instance, `(meta shift 1)' means that holding the meta and shift
keys down and clicking on a word with mouse button 1
will search for that word in the buffer that was current before the click.
This buffer may be different from the one where the click occurred.
(custom-declare-variable 'viper-mouse-search-key ''(meta shift 1) '(#$ . -15860) :type '(list (set :inline t :tag "Modifiers" :format "%t: %v" (const :format "%v " meta) (const :format "%v " shift) (const control)) (integer :tag "Button")) :set 'viper-reset-mouse-search-key :group 'viper-mouse)
#@441 *Key used to click-insert in Viper.
Must be a list that specifies the mouse button and modifiers.
The supported modifiers are `meta', `shift', and `control'.
For instance, `(meta shift 2)' means that holding the meta and shift keys
down, and clicking on a word with mouse button 2, will insert that word
at the cursor in the buffer that was current just before the click.
This buffer may be different from the one where the click occurred.
(custom-declare-variable 'viper-mouse-insert-key ''(meta shift 2) '(#$ . -16591) :type '(list (set :inline t :tag "Modifiers" :format "%t: %v" (const :format "%v " meta) (const :format "%v " shift) (const control)) (integer :tag "Button")) :set 'viper-reset-mouse-insert-key :group 'viper-mouse)
