;ELC ;;; compiled by kwzh@hal.gnu.ai.mit.edu on Fri Aug 26 23:31:46 1994 ;;; from file /gd/gnu/emacs/19.0/lisp/mouse-sel.el ;;; emacs version 19.25.94.8. ;;; 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"))) (error "`/gd/gnu/emacs/19.0/lisp/mouse-sel.el' was compiled for Emacs 19")) (byte-code "!!!" [provide mouse-sel require mouse thingatpt] 2) (defconst mouse-sel-version "2.1" "\ The version number of mouse-sel (as string).") (defvar mouse-sel-leave-point-near-mouse t "\ *Leave point near last mouse position. If non-nil, \\[mouse-select] and \\[mouse-extend] leave point at the end of the region nearest to where the mouse last was. If nil, point is always placed at the beginning of the region.") (defvar mouse-sel-retain-highlight nil "\ *Retain highlight after dragging is finished. If non-nil, regions selected using \\[mouse-select] and \\[mouse-extend] will remain highlighted. If nil, highlighting turns off when you release the mouse button.") (defvar mouse-sel-cycle-clicks t "\ *If non-nil, \\[mouse-select] cycles the click-counts after 3 clicks. Ie. 4 clicks = 1 click, 5 clicks = 2 clicks, etc.") (defvar mouse-sel-default-bindings t "\ Set to nil before loading `mouse-sel' to prevent default mouse bindings.") (defvar mouse-sel-selection-type nil "\ Type of current selection") (make-variable-buffer-local (quote mouse-sel-selection-type)) (defvar mouse-sel-selection "" "\ Store the selection value when using a window systems other than X.") (defvar mouse-sel-set-selection-function (byte-code "!‡Ç" [fboundp x-set-selection #[(s) "\n\"" [x-set-selection PRIMARY s] 3] #[(s) "" [s mouse-sel-selection] 2]] 2) "\ Function to call to set selection. Called with one argument, the text to select.") (defvar mouse-sel-get-selection-function (byte-code "!‡" [fboundp x-get-selection (lambda nil mouse-sel-selection)] 2) "\ Function to call to get the selection. Called with no argument.") (defvar mouse-sel-check-selection-function (byte-code "!" [fboundp x-selection-owner-p] 2) "\ Function to check whether Emacs still owns the selection. Called with no arguments.") (defalias 'mouse-sel-determine-selection-type #[(NCLICKS) "`f z\n SĦT U\"ǂQ Y,ȂQ >6ʂQ>@̂Q =J΂Q =Q+" [next-char char-syntax mouse-sel-cycle-clicks NCLICKS 3 nclicks 1 nil line (40 41 34 39) sexp (32 9 10) whitespace 95 symbol 119 word] 3 "\ Determine what \"thing\" `mouse-sel' should operate on. The first argument, NCLICKS, is the number of consecutive mouse clicks at the same position."]) (defalias 'mouse-select #[(EVENT) " !  8 8)!!4\n@bA!@\f@\n!) " [mouse-set-point EVENT mouse-sel-determine-selection-type event 2 1 mouse-sel-selection-type bounds-of-thing-at-point object-bounds t mark-active set-mark transient-mark-mode nil run-hooks deactivate-mark-hook mouse-extend] 4 "\ Set region/selection using the mouse. Clicking sets point to click position, and deactivates the mark if you are in Transient Mark mode. Dragging extends region/selection. 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. Clicking mouse-2 while selecting copies the region to the kill-ring. Clicking mouse-1 or mouse-3 kills the region. This should be bound to a down-mouse event." "e"]) (defalias 'mouse-extend #[(&optional EVENT) "\n8:Â\n8)@)!%'2 3`\n? @`\f !!A@!8 !\"A\n\fp$\"#! \" !!'&'=!*=&!'b'!&b,,&'{!-=&'\" >->$&'\"! >-=>&'\">!. " [EVENT select-window event 2 1 position transient-mark-mode mark-active use-region region-beginning min region-end max selected-window orig-window window-frame orig-window-frame window-edges top 3 bottom assoc cursor-type frame-parameters selected-frame orig-cursor-type nil direction move-overlay mouse-drag-overlay overlay-put face overlay-get fboundp modify-frame-parameters ((cursor-type . bar)) ((byte-code "! \fBC\" !" [fboundp modify-frame-parameters selected-frame cursor-type orig-cursor-type mouse-sel-retain-highlight delete-overlay mouse-drag-overlay] 4)) (lambda nil (track-mouse (byte-code "\f : @>  8:(ł) 8) = @)a @)\n\n!V\n!X\n) != @) = AAoW Z$mY ZT$) A@: A@@ A@)= $ A@: A@@ A@)b = `\\ťW؂E=4`X4E=E`YEt=XmXu`=jlbݏ*=`=`p$)" [EVENT event nil read-event (mouse-movement switch-frame) 2 1 end switch-frame position posn-w windowp window-frame orig-window mouse-position end-row top mouse-scroll-subr mouse-drag-overlay max bottom min mode-line direction -1 mouse-sel-selection-type last goal (byte-code " `Z_V` \"` [\" `Z_V,- b)‡" [direction goal 0 last forward-thing mouse-sel-selection-type end] 3) ((error)) move-overlay] 6))) overlay-start overlay-end run-hooks deactivate-mark-hook mouse-sel-leave-point-near-mouse set-mark mouse-sel-set-selection-function last-input-event down-mouse-2 copy-region-as-kill read-event (down-mouse-1 down-mouse-3) kill-region double-mouse-3] 7 "\ Extend region/selection using the mouse. See documentation for mouse-select for more details. This should be bound to a down-mouse event." "e"]) (defalias 'mouse-insert-selection #[(click) "\n! ! c" [mouse-yank-at-point mouse-set-point click transient-mark-mode nil mark-active run-hooks deactivate-mark-hook mouse-sel-get-selection-function ""] 2 "\ Insert the contents of the selection at mouse click. If `mouse-yank-at-point' is non-nil, insert at point instead." "e"]) (defalias 'mouse-sel-validate-selection #[nil "?  \n!" [mouse-sel-check-selection-function delete-overlay mouse-drag-overlay] 2 "\ Remove selection highlight if emacs no longer owns the primary selection."]) (byte-code "\" 0!!!\"\" =0\"Ї" [add-hook pre-command-hook mouse-sel-validate-selection 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 interprogram-cut-paste [mouse-2] mouse-insert-selection nil interprogram-cut-function interprogram-paste-function] 3)