%PDF- %PDF-
Direktori : /usr/local/share/emacs/27.2/lisp/obsolete/ |
Current File : //usr/local/share/emacs/27.2/lisp/obsolete/mouse-sel.elc |
;ELC ;;; Compiled ;;; in Emacs version 27.2 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\300\302!\210\303\304\305\306\307\301%\210\310\311\312\313\314\315\307\304&\210\310\316\312\317\314\315\307\304&\210\310\320\312\321\314\322\307\304&\207" [require mouse thingatpt custom-declare-group mouse-sel nil "Mouse selection enhancement." :group custom-declare-variable mouse-sel-leave-point-near-mouse t "Leave point near last mouse position.\nIf non-nil, \\[mouse-select] and \\[mouse-extend] will leave point at the end\nof the region nearest to where the mouse last was.\nIf nil, point will always be placed at the beginning of the region." :type boolean mouse-sel-cycle-clicks "If non-nil, \\[mouse-select] cycles the click-counts after 4 clicks." mouse-sel-default-bindings "Control mouse bindings." (choice (const :tag "none" nil) (const :tag "cut and paste" interprogram-cut-paste) (other :tag "default bindings" t))] 8) #@49 An alist of events that `mouse-sel-mode' binds. (defconst mouse-sel-bound-events '(([mouse-1] . ignore) ([drag-mouse-1] . ignore) ([mouse-3] . ignore) ([down-mouse-1] . mouse-select) ([down-mouse-3] . mouse-extend) ([mouse-2] . mouse-insert-selection) ([M-mouse-1] . ignore) ([M-drag-mouse-1] . ignore) ([M-mouse-3] . ignore) ([M-down-mouse-1] . mouse-select-secondary) ([M-mouse-2] . mouse-insert-secondary) ([M-down-mouse-3] . mouse-extend-secondary)) (#$ . 1272)) (defvar mouse-sel-original-bindings nil) (byte-code "\300\301\302\"\210\303\304\305\306\307\310\311\312\313\314\315\316&\207" [defalias mouse-sel--ignore ignore custom-declare-variable mouse-sel-mode nil "Non-nil if Mouse-Sel mode is enabled.\nSee the `mouse-sel-mode' command\nfor a description of this minor mode.\nSetting this variable directly does not take effect;\neither customize it (see the info node `Easy Customization')\nor call the function `mouse-sel-mode'." :set custom-set-minor-mode :initialize custom-initialize-default :group mouse-sel :type boolean] 12) #@1143 Toggle Mouse Sel mode. If called interactively, enable Mouse-Sel mode if ARG is positive, and disable it if ARG is zero or negative. If called from Lisp, also enable the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'; disable the mode otherwise. Mouse Sel mode is a global minor mode. When enabled, mouse selection is enhanced in various ways: - 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. - Selecting sets the region & X primary selection, but does NOT affect the `kill-ring', nor do the kill-ring functions change the X selection. Because the mouse handlers set the primary selection directly, mouse-sel sets the variables `interprogram-cut-function' and `interprogram-paste-function' to nil. - Clicking mouse-2 inserts the contents of the primary selection at the mouse position (or point, if `mouse-yank-at-point' is non-nil). - mouse-2 while selecting or extending copies selection to the kill ring; mouse-1 or mouse-3 kills it. (defalias 'mouse-sel-mode #[(&optional arg) "\306 \307\302 \310=\203 \311\302!?\202 \312 !\313V\"\210\n\203L \314\315\316\317#\210\320\321\322\"\210\203\241 \323\324\f\"\325=\204\241 \326\327\330\331B\332\333$\210\326\327\334\335B\332\333$\210\202\241 \336\321\322\"\210 \3330\2111\203r 1@0\3370@0A\"\2101A\2111\204[ *\340\311\341!\332\"\2112\311\341!=\204\211 \307\3412\"\210)\340\311\342!\332\"\2113\311\342!=\204\240 \307\3423\"\210)\343\344\311\302!\203\255 \345\202\256 \346\"\210\347\350!\203\333 \351\302!\210\306 \203\306 \306 \232\203\333 \3524\353\354\311\302!\203\325 \355\202\326 \3564#\210))\357 \210\311\302!\207" [#1=#:last-message arg mouse-sel-mode mouse-sel-default-bindings mouse-sel-bound-events mouse-sel-original-bindings current-message set-default toggle default-value prefix-numeric-value 0 put mouse-2 event-kind mouse-click add-hook x-lost-selection-functions mouse-sel-lost-selection-hook mapcar #[(binding) "@\211\303\n \"B\304 A\"\210)\207" [binding event global-map lookup-key global-set-key] 5] interprogram-cut-paste advice--add-function :override #[nil "\300\301!\207" [default-value interprogram-cut-function] 2] #[#2=(gv--val) "\301\302\"\207" [gv--val set-default interprogram-cut-function] 3] mouse-sel--ignore nil #[nil "\300\301!\207" [default-value interprogram-paste-function] 2] #[#2# "\301\302\"\207" [gv--val set-default interprogram-paste-function] 3] remove-hook global-set-key advice--remove-function interprogram-cut-function interprogram-paste-function run-hooks mouse-sel-mode-hook mouse-sel-mode-on-hook mouse-sel-mode-off-hook called-interactively-p any customize-mark-as-set "" message "Mouse-Sel mode %sabled%s" "en" "dis" force-mode-line-update binding --dolist-tail-- #3=#:new #4=#:new local] 6 (#$ . 2322) (list (or current-prefix-arg 'toggle))]) (defvar mouse-sel-mode-hook nil) (byte-code "\301\302N\204\f \303\301\302\304#\210\305\306\307\310\300!\205 \307\211%\210\311\306\312\313#\207" [mouse-sel-mode-map mouse-sel-mode-hook variable-documentation put "Hook run after entering or leaving `mouse-sel-mode'.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" add-minor-mode mouse-sel-mode nil boundp make-obsolete "use the normal mouse modes" "24.3"] 6) #@46 Type of PRIMARY selection in current buffer. (defvar mouse-sel-primary-thing nil (#$ . 5791)) (make-variable-buffer-local 'mouse-sel-primary-thing) #@48 Type of SECONDARY selection in current buffer. (defvar mouse-sel-secondary-thing nil (#$ . 5945)) (byte-code "\301\302!\210\303!\204 \304\305\211\"\306\307\310#\210\301\207" [mouse-secondary-overlay make-variable-buffer-local mouse-sel-secondary-thing overlayp make-overlay 1 overlay-put face secondary-selection] 4) #@94 An overlay which records the current primary selection. This is used by Mouse Sel mode only. (defconst mouse-sel-primary-overlay (byte-code "\301ee\"\302!\210\303\304\305#\210)\207" [ol make-overlay delete-overlay overlay-put face region] 4) (#$ . 6272)) #@385 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 '((PRIMARY mouse-sel-primary-overlay mouse-sel-primary-thing) (SECONDARY mouse-secondary-overlay mouse-sel-secondary-thing)) (#$ . 6538)) #@237 Function to call to set selection. Called with two arguments: SELECTION, the name of the selection concerned, and VALUE, the text to store. This sets the selection, unless `mouse-sel-default-bindings' is `interprogram-cut-paste'. (defvar mouse-sel-set-selection-function (byte-code "\301=\203 \302\207\303\207" [mouse-sel-default-bindings interprogram-cut-paste gui-set-selection #[(selection value) "\302=\203\n \303 !\207\304 \"\207" [selection value PRIMARY gui-select-text gui-set-selection] 3]] 2) (#$ . 7103)) #@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 #[(selection) "\303=\203 \304 \206 \305\301!\203 \206 \n\207\306!\207" [selection x-last-selected-text-primary gui--last-selected-text-primary PRIMARY gui-selection-value boundp gui-get-selection] 2] (#$ . 7636)) #@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\211\205 z\n\203 S\304\246T\305U\203 \306\202[ \307U\203( \310\202[ \304Y\2032 \311\202[ \312>\203<