%PDF- %PDF-
Direktori : /usr/local/share/emacs/27.2/lisp/emulation/ |
Current File : //usr/local/share/emacs/27.2/lisp/emulation/viper-mous.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\302\303!\210\304\305\306\307\310\311\312\313&\207" [provide viper-mous require viper-util custom-declare-group viper-mouse nil "Support for Viper special mouse-bound commands." :prefix "viper-" :group viper] 8) (defvar viper-frame-of-focus nil) (defvar viper-current-frame-saved (selected-frame)) (byte-code "\300\301\302\303\304\305\306\307&\210\300\310\311\312\304\313\306\307&\207" [custom-declare-variable viper-surrounding-word-function 'viper-surrounding-word "Function that determines what constitutes a word for clicking events.\nTakes two parameters: a COUNT, indicating how many words to return,\nand CLICK-COUNT, telling whether this is the first click, a double-click,\nor a triple-click." :type symbol :group viper-mouse viper-multiclick-timeout (if (viper-window-display-p) (if (featurep 'xemacs) mouse-track-multi-click-time double-click-time) 500) "Time interval in millisecond within which successive mouse clicks are\nconsidered related." integer] 8) (defvar viper-current-click-count 0) (defvar viper-last-click-event-timestamp 0) #@20 nil (buffer local) (defvar viper-mouse-click-search-noerror t (#$ . 1487)) (make-variable-buffer-local 'viper-mouse-click-search-noerror) #@20 nil (buffer local) (defvar viper-mouse-click-search-limit nil (#$ . 1631)) (make-variable-buffer-local 'viper-mouse-click-search-limit) (defvar viper-global-prefix-argument nil) (defvar viper-mouse-up-search-key-parsed nil) (defvar viper-mouse-down-search-key-parsed nil) (defvar viper-mouse-up-insert-key-parsed nil) (defvar viper-mouse-down-insert-key-parsed nil) (defalias 'viper-multiclick-p #[nil "\301\302\303\245\"\266\202?\207" [viper-multiclick-timeout t sit-for 1000.0] 5]) (put 'viper-multiclick-p 'byte-optimizer 'byte-compile-inline-expand) (defalias 'viper-mouse-click-window #[(click) "\302!\211@\262\303 !\203 \202 \304\305!)\207" [click win event-start 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) #@30 Returns position of a click. (defalias 'viper-mouse-click-posn #[(click) "\301\302!!\207" [click posn-point event-start] 3 (#$ . 3004)]) (byte-code "\300\301\302\303#\210\304\301\305\306#\207" [make-obsolete viper-mouse-click-posn nil "27.1" put byte-optimizer byte-compile-inline-expand] 4) #@753 Return 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\203S \212\311 \210\3122\313=\2032 \211\203) 3\307w\262\202E 4\307w\262\202E \314\3155\206; \316\205B \317\320!$\262\210`\307\210`{)\202\\\307\321 \206\\ \322!\262\204\324 \212\323 \210\322 )\204u \212\324 \210\322 )\203\324 \f\325\326!\203\200 \326\202\322 \325\327!\203\212 \330\202\322 \325\331!\203\224 \332\202\322 \325\333!\203\236 \334\202\322 \325\335!\203\250 \336\202\322 \325\337!\203\262 \340\202\322 \325\341!\203\274 \342\202\322 \325\343!\203\306 \343\202\322 \321 \203\317 \344\202\322 \345g!P\325\327!\204\350 \346\347\3506!\"\203\350 \f\330P\212 \351V\203\366 \352\353!\210\202(\322\f!\203\354\f!\210\202(\f\321 \206\f\322!\262\204\355 \210\202( \351V\203$\352\353!\210\202(\354\f!\210`\3077\356V\203W\n\203;\324\351!\210\357 \351V\203J\352\315!\210\202N\360\f!\2107S\2117\202.`{)\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 major-mode count] 8 (#$ . 3304)]) #@226 Return 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\307\310!!\311\312!!)\313\f!\204 \314\313 !\204! \314\212\315 \316\216\n\203; q\210\nb\210\f \"\202? \317\320!\210.\207" [click click-buf click-pos click-word count click-count "" posn-point event-start window-buffer viper-mouse-click-window natnump 1 current-window-configuration #[nil "\301!\207" [#1=#:wconfig set-window-configuration] 2] error "Click must be over a window" #1# viper-surrounding-word-function] 5 (#$ . 5709)]) #@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=?)?\205\221 \250\2045 <\2033 @\250\2033 @\2025 \312\307 !\310=\205\221 \313\211\314\315\316\245\"\266\202\204c \317 \320!\203c \321!\202\220 \321!\211\312V\203t \313\322 #c\210\f\205\220 \323\f!\205\220 \320\f!?\205\220 \324\f!*\207" [viper-frame-of-focus viper-mouse-down-insert-key-parsed viper-mouse-up-insert-key-parsed arg interrupting-event click-count select-frame key-binding viper-mouse-catch-frame-switch viper-mouse-click-insert-word 1 nil t sit-for 1000.0 read-event viper-mouse-event-p viper-event-click-count viper-mouse-click-get-word eventp viper-set-unread-command-events viper-multiclick-timeout last-input-event viper-global-prefix-argument click] 6 (#$ . 6462) "e\nP"]) (defalias 'viper-mouse-event-p #[(event) "\301!\205 \302\303\304\305!!\"\207" [event eventp string-match "\\(mouse-\\|frame\\|screen\\|track\\)" prin1-to-string viper-event-key] 5]) (defalias 'viper-event-click-count #[(click) "\211:\203 \3018\250\203 \3018\207\302\207" [click 2 1] 3]) #@385 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. (fn CLICK N) (defalias 'viper-mouse-click-search-word #[(click arg) "\203 \306!\210\212\307 !\310=?\206 \307\n!\311=?)?\205e\312\211()\313\314\315\245\"\266\202\204P \316 \210\317*!\203P +\206C ,+-.\320/!\202d\320/!\321/\312\f#\f\322V\203i +,\312+,\206o \322,\323 \210 \230\203\221 \3240!\203\221 \3250!p\232\203\221 -\311=\204\271 \326 \21101\3132\31234\203\251 \327 !\202\252 \2115@\230\204\271 5B5\330\312\313\"\210,\331V\205d\332\322!\210\3331\334 32#\204\375 \3122\212\3241!\203\355 \3251!\203\355 1b\210\335\336!)3eb\210\334 3\312#\210\331\224b\210\337\340\"\210,\322X\205\341 \210\342 0\202Z\210\343\322!\210 (\230\203)-\311=\2044\337\344\345p!#\210\202C\337\346 \345p!#\210\322,\314\347!\210\3132\3123\3241!\203[\3251!\203[1b\210,S\211,\202\300 +\207" [viper-frame-of-focus viper-mouse-down-search-key-parsed viper-mouse-up-search-key-parsed viper-s-string click-count click-word select-frame key-binding viper-mouse-catch-frame-switch viper-mouse-click-search-word nil t sit-for 1000.0 read-event viper-mouse-event-p viper-event-click-count viper-mouse-click-get-word 1 deactivate-mark markerp marker-buffer point-marker regexp-quote push-mark 0 viper-forward-word (error) search-forward viper-line-pos end message "Searching for: %s" viper-adjust-window viper-flash-search-pattern beep "`%s': String not found in %s" buffer-name "`%s': Last occurrence in %s. Back to beginning of search" 2 previous-search-string viper-multiclick-timeout last-input-event viper-global-prefix-argument arg last-command this-command click 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] 6 (#$ . 7911) "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 (#$ . 10080) "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\216 \310>\203) \311=\203% \312\202[ \313\202[ \314>\203? \311=\203; \315\202[ \316\202[ \317>\203U \311=\203Q \320\202[ \321\202[ \322\323#\324>\203g \325\202h \326\327>\203t \330\202u \326\331>\203\201 \332\202\202 \326\333\334\n\f R!!\211.\207" [key-var key-spec control-spec shift-spec meta-spec button-spec eval nil 1 up "mouse-1" "down-mouse-1" 2 "mouse-2" "down-mouse-2" 3 "mouse-3" "down-mouse-3" error "%S: invalid button number, %S" meta "M-" "" shift "S-" control "C-" vector intern key event-type] 7]) (defalias 'viper-unbind-mouse-search-key #[nil "\203 \302!\210 \203 \302 !\210\303\211\211\207" [viper-mouse-up-search-key-parsed viper-mouse-down-search-key-parsed global-unset-key nil] 3]) (defalias 'viper-unbind-mouse-insert-key #[nil "\203 \302!\210 \203 \302 !\210\303\211\211\207" [viper-mouse-up-insert-key-parsed viper-mouse-down-insert-key-parsed global-unset-key nil] 3]) (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]) (byte-code "\300\301\302\303\304\305\306\307\310\311& \210\300\312\313\314\304\315\306\316\310\311& \207" [custom-declare-variable viper-mouse-search-key '(meta shift 1) "Key used to click-search in Viper.\nThis must be a list that specifies the mouse button and modifiers.\nThe supported modifiers are `meta', `shift', and `control'.\nFor instance, `(meta shift 1)' means that holding the meta and shift\nkeys down and clicking on a word with mouse button 1\nwill search for that word in the buffer that was current before the click.\nThis buffer may be different from the one where the click occurred." :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 viper-mouse-insert-key '(meta shift 2) "Key used to click-insert in Viper.\nMust be a list that specifies the mouse button and modifiers.\nThe supported modifiers are `meta', `shift', and `control'.\nFor instance, `(meta shift 2)' means that holding the meta and shift keys\ndown, and clicking on a word with mouse button 2, will insert that word\nat the cursor in the buffer that was current just before the click.\nThis buffer may be different from the one where the click occurred." (list (set :inline t :tag "Modifiers" :format "%t: %v" (const :format "%v " meta) (const :format "%v " shift) (const control)) (integer :tag "Button")) viper-reset-mouse-insert-key] 10)