;ELC   
;;; compiled by rms@mole.gnu.ai.mit.edu on Wed Nov 15 13:03:32 1995
;;; from file /home/fsf/rms/e19/lisp/mouse-sel.el
;;; emacs version 19.29.91.3.
;;; bytecomp version FSF 2.10
;;; optimization is on.
;;; this file uses opcodes which do not exist in Emacs 18.

(if (and (boundp 'emacs-version)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`mouse-sel.el' was compiled for Emacs 19.29 or later"))


(byte-code "ÀÁ!ˆÂÃ!ˆÂÄ!‡" [provide mouse-sel require mouse thingatpt] 2)
#@235 *Leave point near last mouse position.
If non-nil, \[mouse-select] and \[mouse-extend] will leave point at the end
of the region nearest to where the mouse last was.
If nil, point will always be placed at the beginning of the region.
(defvar mouse-sel-leave-point-near-mouse t (#$ . -550))
#@70 *If non-nil, \[mouse-select] cycles the click-counts after 4 clicks.
(defvar mouse-sel-cycle-clicks t (#$ . -846))
#@74 Set to nil before loading `mouse-sel' to prevent default mouse bindings.
(defvar mouse-sel-default-bindings t (#$ . 967))
#@46 Type of PRIMARY selection in current buffer.
(defvar mouse-sel-primary-thing nil (#$ . 1095))
(make-variable-buffer-local (quote mouse-sel-primary-thing))
#@48 Type of SECONDARY selection in current buffer.
(defvar mouse-sel-secondary-thing nil (#$ . 1256))
(byte-code "ÀÁ!ˆÂ!„ ÄÅ‰\"ÆÇÈ#ˆÀ‡" [make-variable-buffer-local mouse-sel-secondary-thing overlayp mouse-secondary-overlay make-overlay 1 overlay-put face secondary-selection] 4)
#@386 Alist associating selections with variables.  Each element is of
the form:

   (SELECTION-NAME OVERLAY-SYMBOL SELECTION-THING-SYMBOL)

where   SELECTION-NAME          = name of selection
        OVERLAY-SYMBOL          = name of variable containing overlay to use
	SELECTION-THING-SYMBOL 	= name of variable where the current selection
 				  type for this selection should be stored.
(defconst mouse-sel-selection-alist (quote ((PRIMARY mouse-drag-overlay mouse-sel-primary-thing) (SECONDARY mouse-secondary-overlay mouse-sel-secondary-thing))) (#$ . 1542))
#@146 Function to call to set selection.
Called with two arguments:

  SELECTION, the name of the selection concerned, and
  VALUE, the text to store.
(defvar mouse-sel-set-selection-function (byte-code "ÀÁ!… Á‡" [fboundp x-set-selection] 2) (#$ . 2108))
#@118 Function to call to get the selection.
Called with one argument:

   SELECTION: the name of the selection concerned.
(defvar mouse-sel-get-selection-function (byte-code "ÀÁ!… Á‡" [fboundp x-get-selection] 2) (#$ . 2365))
#@519 Determine what `thing' `mouse-sel' should operate on.
The first argument is NCLICKS, is the number of consecutive
mouse clicks at the same position.

Double-clicking on word constituents selects words.
Double-clicking on symbol constituents selects symbols.
Double-clicking on quotes or parentheses selects sexps.
Double-clicking on whitespace selects whitespace.
Triple-clicking selects lines.
Quad-clicking selects paragraphs.

Feel free to re-define this function to support your own desired
multi-click semantics.
(defalias 'mouse-sel-determine-selection-thing #[(nclicks) "`f‰…	 z\nƒ SÄ¦TÅUƒ Æ‚W ÇUƒ( È‚W ÄYƒ2 É‚W 	Ê>ƒ< Ë‚W Ì>ƒF Í‚W 	Î=ƒP Ï‚W 	Ð=…W Ñ*‡" [next-char char-syntax mouse-sel-cycle-clicks nclicks 4 1 nil 3 line paragraph (40 41 34 39) sexp (32 9 10) whitespace 95 symbol 119 word] 3 (#$ . 2594)])
#@39 Set the specified SELECTION to VALUE.
(defalias 'mouse-sel-set-selection #[(selection value) "ƒ	 	\n\"‡ÃÄ	\n#‡" [mouse-sel-set-selection-function selection value put mouse-sel-internal-selection] 4 (#$ . 3425)])
#@43 Get the value of the specified SELECTION.
(defalias 'mouse-sel-get-selection #[(selection) "ƒ 	!‡Â	N‡" [mouse-sel-get-selection-function selection mouse-sel-internal-selection] 2 (#$ . 3645)])
#@44 Return overlay corresponding to SELECTION.
(defalias 'mouse-sel-selection-overlay #[(selection) "À	\n\"A@‰„ ÄÅ	\"ˆJ)‡" [assoc selection mouse-sel-selection-alist symbol error "No overlay corresponding to %s selection"] 4 (#$ . 3847)])
#@44 Return overlay corresponding to SELECTION.
(defalias 'mouse-sel-selection-thing #[(selection) "ÀÁ\n\"8‰„ ÅÆ\n\"ˆ\f)‡" [2 assoc selection mouse-sel-selection-alist symbol error "No symbol corresponding to %s selection"] 5 (#$ . 4091)])
#@225 Convert region to PRIMARY overlay and deactivate region.
Argument ORIG-WINDOW specifies the window the cursor was in when the 
originating command was issued, and is used to determine whether the 
region was visible or not.
(defalias 'mouse-sel-region-to-primary #[(orig-window) "…> ÁÂ!\fƒ$ „ Ç =ƒ$ ÈÉ Ê p$ˆ‚: Ç =ƒ6 È``p$ˆ‚: Ë!ˆÌ‰)‡" [transient-mark-mode mouse-sel-selection-overlay PRIMARY overlay mark-active highlight-nonselected-windows orig-window selected-window move-overlay region-beginning region-end delete-overlay nil] 5 (#$ . 4336)])
#@205 Convert PRIMARY overlay to region.
Optional argument DIRECTION specifies the mouse drag direction: a value of
1 indicates that the mouse was dragged left-to-right, otherwise it was
dragged right-to-left.
(defalias 'mouse-sel-primary-to-region #[(&optional direction) "ÀÁ!Ã\n!Å\n!\f=ƒ* \fƒ \fbˆƒM È	ÊË!ˆ‚M \fƒC Î=ƒC bˆÏ\fÐÑ#ˆ‚M \fbˆÏÐÑ#ˆ…U Ò\n!+‡" [mouse-sel-selection-overlay PRIMARY overlay overlay-start start overlay-end end transient-mark-mode nil mark-active run-hooks deactivate-mark-hook mouse-sel-leave-point-near-mouse direction 1 push-mark nomsg active delete-overlay] 4 (#$ . 4901)])
#@124 Evaluate forms at mouse position.
Move to the end position of EVENT, execute FORMS, and restore original
point and window.
(defalias 'mouse-sel-eval-at-event-end '(macro . #[(event &rest forms) "ÀÁÂDDCÄÁÅDEÆÀÇÈÉÊËÌÍBÏBB¯¯‡" [let posn event-end event if mouse-minibuffer-check (if (and posn (not (windowp (posn-window posn)))) (error "Cursor not in text area of window")) (orig-window orig-point-marker) (setq orig-window (selected-window)) (if posn (select-window (posn-window posn))) (setq orig-point-marker (point-marker)) (if (and posn (numberp (posn-point posn))) (goto-char (posn-point posn))) unwind-protect progn forms ((goto-char (marker-position orig-point-marker)) (move-marker orig-point-marker nil) (select-window orig-window))] 13 (#$ . 5522)]))
(put (quote mouse-sel-eval-at-event-end) (quote lisp-indent-hook) 1)
#@392 Set region/selection using the mouse.

Click sets point & mark to click position.
Dragging extends region/selection.

Multi-clicking selects word/lines/paragraphs, as determined by 
'mouse-sel-determine-selection-thing.

Clicking mouse-2 while selecting copies selected text to the kill-ring.
Clicking mouse-1 or mouse-3 kills the selected text.

This should be bound to a down-mouse event.
(defalias 'mouse-select #[(event) "ÀÂŽÃÄ\"‰*‡" [nil direction ((mouse-sel-primary-to-region direction)) mouse-select-internal PRIMARY event] 3 (#$ . 6363) "@e"])
#@426 Set secondary selection using the mouse.

Click sets the start of the secondary selection to click position.
Dragging extends the secondary selection.

Multi-clicking selects word/lines/paragraphs, as determined by 
'mouse-sel-determine-selection-thing.

Clicking mouse-2 while selecting copies selected text to the kill-ring.
Clicking mouse-1 or mouse-3 kills the selected text.

This should be bound to a down-mouse event.
(defalias 'mouse-select-secondary #[(event) "ÀÁ\n\"‡" [mouse-select-internal SECONDARY event] 3 (#$ . 6926) "e"])
#@32 Set SELECTION using the mouse.
(defalias 'mouse-select-internal #[(selection event) "Á8:ƒ Á‚ Â8)‰ƒ Ä!ˆƒ- Å‰@)!„- ÇÈ!ˆÉ‰\nÌ ƒD Í‰@)!ˆÎ \nƒ€ ‰A@:ƒ^ A@@‚b A@)§ƒ€ ‰A@:ƒy A@@‚} A@)bˆÏŽÐ!Ò!‰ÕÁ8¨ƒŸ Á8‚  Â)!LˆÖJ!‰ƒ¾ Ø@Ap$ˆ‚Æ Ø``p$ˆ+Ù!,‡" [event 2 1 posn mouse-minibuffer-check windowp position error "Cursor not in text area of window" nil orig-point-marker orig-window selected-window select-window point-marker ((byte-code "À	!bˆ	Â‰“ˆÃ\f!‡" [marker-position orig-point-marker nil select-window orig-window] 3)) mouse-sel-selection-thing selection mouse-sel-selection-overlay overlay thing-symbol mouse-sel-determine-selection-thing bounds-of-thing-at-point object-bounds move-overlay mouse-extend-internal] 6 (#$ . 7471)])
#@42 Extend region/selection using the mouse.
(defalias 'mouse-extend #[(event) "À ÁÄÆ8:ƒ Æ‚ Ç8)‰@)!ˆÉŽÊ!ˆËÌ\"‰+‡" [selected-window nil direction orig-window select-window event 2 1 position ((mouse-sel-primary-to-region direction)) mouse-sel-region-to-primary mouse-extend-internal PRIMARY] 4 (#$ . 8258) "e"])
#@45 Extend secondary selection using the mouse.
(defalias 'mouse-extend-secondary #[(event) "À‹‡" [((byte-code "ÀÁ\n\"‡" [mouse-extend-internal SECONDARY event] 3))] 1 (#$ . 8584) "e"])
#@258 Extend specified SELECTION using the mouse.
Track mouse-motion events, adjusting the SELECTION appropriately.
Optional argument INITIAL-EVENT specifies an initial down-mouse event to 
process. 

See documentation for mouse-select-internal for more details.
(defalias 'mouse-extend-internal #[(selection &optional initial-event) "Â	8:ƒ Â‚ Ã	8)‰ƒ Å!ˆ\fƒ- Æ\f‰@)!„- ÈÉ!ˆÊ‰\fÍ \f\fƒD Î\f‰@)!ˆÏ \fƒ€ \f‰A@:ƒ^ A@@‚b A@)§ƒ€ \f‰A@:ƒy A@@‚} A@)bˆÐŽÑÒÓÔ !\"AÖŽ×!Ú!Í \fÜ\f!Þ\f!A@àÞ\f!8!Ê\"ã$Ê%Ê&Ê'Êè!p=ƒÝ é!%ê!&‚è `‰%&ÊLˆëì!ƒô ìÔ í\"ˆî ˆé!ê!*‰)*=„ï)*{\"ˆÊ0ñ2!ó=ƒ0ô)*\"ˆõ ˆõ ˆ‚{ñ2!ö>ƒZ÷ø2!>ƒZù)*\"ˆú)‰#ˆõ ˆõ ˆ‚{ñ2!û=ƒ{üø2!>ƒ{ù)*\"ˆú)‰#ˆ+'.‡" [initial-event event 2 1 posn mouse-minibuffer-check windowp position error "Cursor not in text area of window" nil orig-point-marker orig-window selected-window select-window point-marker ((byte-code "À	!bˆ	Â‰“ˆÃ\f!‡" [marker-position orig-point-marker nil select-window orig-window] 3)) assoc cursor-type frame-parameters selected-frame orig-cursor-type ((byte-code "ÀÁ!ƒ ÁÂ Ã\fBC\"ˆÀ‡" [fboundp modify-frame-parameters selected-frame cursor-type orig-cursor-type] 4)) mouse-sel-selection-thing selection thing-symbol mouse-sel-selection-overlay overlay window-frame orig-window-frame window-edges top 3 bottom mark-active 0 echo-keystrokes min max direction overlay-buffer overlay-start overlay-end fboundp modify-frame-parameters ((cursor-type . bar)) (lambda nil (track-mouse (byte-code "ƒ\f ‰Â‚ Ã ‰:…™	@Ä>…™J	Æ	8:ƒ* Æ‚+ Ç	8)		¢Ê=„‰@)ƒe ‰@)\fÍ\f!ƒZ Î\f!‚\\ \f)Î!=ƒ‰@)=„½ Ð AA‰ƒ™ o„™ Wƒ™ ÓZ$ˆ‚¹ ƒ¹ m„¹ Yƒ¹ ÓZT$ˆ)‚‰A@:ƒÐ A@@‚Ô A@)Ø=ƒç ÓÇ$ˆ‚‰A@:ƒú A@@‚þ A@)bˆ„$=„$`\\Æ¥WƒÚ‚Ç‚IÚ=„8`Xƒ8Ú‚IÇ=„I`YƒIÇ	ƒuÇ=ƒ\\m„\\Çuˆ`Ç=ƒk‚mbˆÂÜÝ�ˆ)ÞÇ=ƒ„‚…`Ú=ƒ‘‚’`p$ˆ*‚  ‡" [initial-event event nil read-event (mouse-movement switch-frame) thing-symbol 2 1 end selection-thing switch-frame position posn-w windowp window-frame orig-window mouse-position end-row top mouse-scroll-subr overlay max bottom min mode-line direction -1 goal (byte-code "	`Z_ÂVƒ Ã\f\"ˆ‚  `Ã\f[\"ˆ	`Z_ÂVƒ( ‚) `bˆ)Â‡" [direction goal 0 forward-thing selection-thing end] 3) ((error)) move-overlay] 6))) mouse-sel-set-selection this-command event-basic-type last-input-event mouse-2 copy-region-as-kill read-event (mouse-1 mouse-3) down event-modifiers kill-region move-overlay mouse-3 double] 5 (#$ . 8773)])
#@124 Insert the contents of the PRIMARY selection at mouse click.
If `mouse-yank-at-point' is non-nil, insert at point instead.
(defalias 'mouse-insert-selection #[(event) "ÀÁ\n\"‡" [mouse-insert-selection-internal PRIMARY event] 3 (#$ . 11347) "e"])
#@126 Insert the contents of the SECONDARY selection at mouse click.
If `mouse-yank-at-point' is non-nil, insert at point instead.
(defalias 'mouse-insert-secondary #[(event) "ÀÁ\n\"‡" [mouse-insert-selection-internal SECONDARY event] 3 (#$ . 11600) "e"])
#@122 Insert the contents of the named SELECTION at mouse click.
If `mouse-yank-at-point' is non-nil, insert at point instead.
(defalias 'mouse-insert-selection-internal #[(selection event) "„ Á\n!ˆ… Ä`Å\"ˆ!† Çc‡" [mouse-yank-at-point mouse-set-point event mouse-sel-get-selection-function push-mark nomsg selection ""] 3 (#$ . 11857)])
#@42 Remove the overlay for a lost selection.
(defalias 'mouse-sel-lost-selection-hook #[(selection) "À	!Ã\n!)‡" [mouse-sel-selection-overlay selection overlay delete-overlay] 2 (#$ . 12202)])
(byte-code "ÀÁÂ\"ˆƒK ÄÅ!ˆÄÆ!ˆÄÇ!ˆÈÉÊ\"ˆÈËÌ\"ˆÄÍ!ˆÄÎ!ˆÄÏ!ˆÈÐÑ\"ˆÈÒÓ\"ˆÔ=„F ÈÕÖ\"ˆ××ÈÚÛ\"ˆÜÝB×‡" [add-hook x-lost-selection-hooks mouse-sel-lost-selection-hook mouse-sel-default-bindings global-unset-key [mouse-1] [drag-mouse-1] [mouse-3] global-set-key [down-mouse-1] mouse-select [down-mouse-3] mouse-extend [M-mouse-1] [M-drag-mouse-1] [M-mouse-3] [M-down-mouse-1] mouse-select-secondary [M-down-mouse-3] mouse-extend-secondary interprogram-cut-paste [mouse-2] mouse-insert-selection nil interprogram-cut-function interprogram-paste-function [M-mouse-2] mouse-insert-secondary "mikew@gopher.dosli.govt.nz" mouse-sel-maintainer-address current-load-list] 3)
#@47 Submit a bug report on mouse-sel.el via mail.
(defalias 'mouse-sel-submit-bug-report #[nil "ÀÁ!ˆÂÄÅÆÇ�† ÈPÉÊËÌÍÎÏÐÑ¯	#‡" [require reporter reporter-submit-bug-report mouse-sel-maintainer-address "mouse-sel.el " nil mouse-sel-version ((error)) "(distributed with Emacs)" transient-mark-mode delete-selection-mode mouse-sel-default-bindings mouse-sel-leave-point-near-mouse mouse-sel-cycle-clicks mouse-sel-selection-alist mouse-sel-set-selection-function mouse-sel-get-selection-function mouse-yank-at-point] 12 (#$ . 13067) nil])
