;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\303\304\305\306\307\310\311\312\311\313\311\314\315\316\317\320\317\321\317\322&\210\323\324\325\326\327\330\317\304&\210\323\331\332\333\327\334\317\304&\210\323\335\336\337\327\340\317\304&\210\323\341\342\343\327\344\317\304&\210\323\345\346\347\327\350\317\304&\210\351\345\352\353#\210\354\355\356\357\317\304%\210\354\360\361\362\317\304%\207" [require cl font-lock custom-declare-group button-lock nil "Clickable text defined by regular expression." :version "1.0.2" :link (emacs-commentary-link :tag "Commentary" "button-lock") (url-link :tag "GitHub" "http://github.com/rolandwalker/button-lock") (url-link :tag "EmacsWiki" "http://emacswiki.org/emacs/ButtonLockMode") :prefix "button-lock-" :group navigation mouse extensions custom-declare-variable button-lock-exclude-modes '(fundamental-mode Buffer-menu-mode bm-show-mode dired-mode wdired-mode gnus-article-mode mime/viewer-mode rmail-mode term-mode comint-mode shell-mode eshell-mode inferior-emacs-lisp-mode) "Modes for which global button-lock will not be activated.\n\nA buffer will also be excluded if its major mode is derived from\na mode in this list.\n\nModes may be excluded for reasons of security (since buttons can\nexecute arbitrary functions), efficiency, or to avoid conflicts\nwith modes that provide similar functionality." :type (repeat symbol) button-lock-buffer-name-exclude-pattern "\\`[* ]" "Do not activate minor made in buffers matching this regular expression.\n\nBuffers may be excluded for reasons of security (since buttons\ncan execute arbitrary functions), efficiency, or to avoid\nconflicts with modes that provide similar functionality.\n\nThe default pattern is designed to match buffers which are\nprogramatically generated or internal to Emacs." regexp button-lock-buffer-include-functions 'nil "Do not activate minor mode in a buffer unless all functions evaluate non-nil.\n\nEach function should take a single argument (a buffer).\n\nSet this value to nil to disable." (repeat function) button-lock-buffer-exclude-functions 'nil "Do not activate minor mode in a buffer if any function evaluates non-nil.\n\nEach function should take a single argument (a buffer).\n\nSet this value to nil to disable." (repeat function) button-lock-mode-lighter " b-loc" "This string appears in the mode-line when `button-lock-mode' is active.\n\nSet to nil or the empty string to disable the mode-line\nlighter for `button-lock-mode'." string put risky-local-variable t custom-declare-face button-lock-button-face ((t nil)) "Face used to show active button-lock buttons.\n\nThe default is for buttons to inherit whatever properties are\nalready provided by font-lock." button-lock-mouse-face ((t (:inherit highlight))) "Face used to highlight button-lock buttons when the mouse hovers over."] 20) #@248 Global button definitions added to every button-lock buffer. The form is a list of lists, each member being a set of arguments to `button-lock-set-button'. This variable should be set by calling `button-lock-register-global-button' and friends. (defvar button-lock-global-button-list nil (#$ . 2915)) #@65 An internal variable used to keep track of button-lock buttons. (defvar button-lock-button-list nil (#$ . 3224)) #@50 A hash for memoizing `button-lock-parent-modes'. (defvar button-lock-parent-modes-hash (make-hash-table) (#$ . 3343)) #@39 Mode variable for `button-lock-mode'. (defvar button-lock-mode nil (#$ . 3467)) (byte-code "\300\301!\210\300\302!\210\303\302\304\305#\207" [make-variable-buffer-local button-lock-mode button-lock-button-list put permanent-local t] 4) #@149 A backward-compatible version of `called-interactively-p'. Optional KIND is as documented at `called-interactively-p' in GNU Emacs 24.1 or higher. (defalias 'button-lock-called-interactively-p '(macro . #[(&optional kind) "\301\302!\204\303\207\3041\302\305!\210\3060\202\210\202 \203 \302D\207\307\207" [kind fboundp called-interactively-p (interactive-p) (error) any t (called-interactively-p)] 2 (#$ . 3710)])) (byte-code "\300\301!\204\302\301\303\"\210\304\301\305\306#\210\307\301\310\311#\210\300\207" [fboundp string-match-p defalias #[(regexp string &optional start) "\304\305 \n #)\207" [inhibit-changing-match-data regexp string start t string-match] 4 "Same as `string-match' except this function does not change the match data."] function-put speed -1 put byte-optimizer byte-compile-inline-expand] 4) #@115 Return all parent modes for the current major mode. Returns nil if the current major mode is not a derived mode. (defalias 'button-lock-parent-modes #[nil "\304\305 \"\211\204*\n\306N\211\203\n B\202 \307 \203& \202'\310 #\210 \310=?\2052 *\207" [major-mode parent-modes this-mode button-lock-parent-modes-hash nil gethash derived-mode-parent puthash :none] 4 (#$ . 4545)]) #@68 Return BUF if global button-lock should enable button-lock in BUF. (defalias 'button-lock-buffer-included-p #[(buf) "?\205\247\306 !\205\247\307 !\205\247r q\210\310 !?\205\246\307 \311H\312=?\205\246\n >?\205\246\313\314 \"?\205\246\f\307 !\315\316\317#)\266\203?\205\246\3202t\315\211\203q@\211 !\203h\321\320\315\"\210A\211\204X*\3160\205\246\3222\242\315\211\203\237@\211 !\204\226\321\322\315\"\210A\211\204\206*\3160\205\246 )\207" [noninteractive buf major-mode button-lock-exclude-modes button-lock-buffer-name-exclude-pattern inhibit-changing-match-data bufferp buffer-name minibufferp 0 32 intersection button-lock-parent-modes nil t string-match success throw failure button-lock-buffer-exclude-functions filt --dolist-tail-- button-lock-buffer-include-functions] 8 (#$ . 4941)]) #@92 This is a workaround for cperl mode, which clobbers `font-lock-unfontify-region-function'. (defalias 'button-lock-maybe-unbuttonify-buffer #[nil "\302\300!\205\205 \303=?\205\303ed\"\207" [font-lock-fontified font-lock-unfontify-region-function boundp font-lock-default-unfontify-region] 3 (#$ . 5790)]) #@137 Fontify, but only if font-lock is already on. This is to avoid turning on font-lock if we are in the process of disabling button-lock. (defalias 'button-lock-maybe-fontify-buffer #[nil "\301\300!\205\f\205\f\302 \207" [font-lock-fontified boundp font-lock-fontify-buffer] 2 (#$ . 6108)]) #@39 Return list of properties for BUTTON. (defalias 'button-lock-button-properties #[(button) "<\205\fA@A@A@\207" [button] 1 (#$ . 6406)]) #@45 Return t if BUTTON is a button-lock button. (defalias 'button-lock-button-p #[(button) "\3011\f\302\303!>@0\207\210\304\207" [button (error) button-lock button-lock-button-properties nil] 3 (#$ . 6550)]) #@28 Return pattern for BUTTON. (defalias 'button-lock-button-pattern #[(button) "<\205@\207" [button] 1 (#$ . 6762)]) #@29 Return grouping for BUTTON. (defalias 'button-lock-button-grouping #[(button) "<\205 A@@\207" [button] 1 (#$ . 6886)]) #@225 Find the extent of a button-lock property around some point. POS defaults to the current point. PROPERTY defaults to 'button-lock. Returns a cons in the form (START . END), or nil if there is no such PROPERTY around POS. (defalias 'button-lock-find-extent #[(&optional pos property) "\206` \206 \302\303 \"\205.eV\203(\303S \"\203(\304 \"\202)\305 \"B\207" [pos property button-lock get-text-property previous-single-property-change next-single-property-change] 4 (#$ . 7015)]) #@242 Tell `font-lock-keywords' about the buttons in `button-lock-button-list'. When FORGET is set, tell `font-lock-keywords' to forget about the buttons in `button-lock-button-list', as well as any other keywords with the 'button-lock property. (defalias 'button-lock-tell-font-lock #[(&optional forget) "\2037\306 !\211@\307=\203\nA@\310\n \"\311\211\2055 @\312\f!\203-\313\311\fC\"\210 A\211\204\311+\207\204@\314\315!\210 \311\211\205c @\313\311C\"\210\316\311C\"\210 A\211\204I\311*\207" [forget font-lock-keywords keywords button-lock-button-list kw --dolist-tail-- copy-tree t union nil button-lock-button-p font-lock-remove-keywords error "Button-lock mode is not in effect" font-lock-add-keywords button-lock-mode button] 4 (#$ . 7519)]) #@58 Run `button-lock-tell-font-lock' appropriately in hooks. (defalias 'button-lock-do-tell #[nil "\205 \203 \302 \207\302\303!\207" [button-lock-mode font-lock-mode button-lock-tell-font-lock forget] 2 (#$ . 8296)]) #@72 Remove BUTTON from `button-lock-button-list' and `font-lock-keywords'. (defalias 'button-lock-remove-from-button-list #[(button) "\203\303\304 C\"\210\305 \210\306 \210\307 \n\"\304\207" [button-lock-mode button button-lock-button-list font-lock-remove-keywords nil button-lock-maybe-unbuttonify-buffer button-lock-maybe-fontify-buffer delete] 3 (#$ . 8519)]) #@306 Add BUTTON to `button-lock-button-list' and `font-lock-keywords'. The regexp used by the button is checked against the existing data structure. If the regexp duplicates that of an existing button, the existing duplicate is replaced. If NO-REPLACE is set, no replacement is made for a duplicate button. (defalias 'button-lock-add-to-button-list #[(button &optional no-replace) "\3062&\307\211\205$\n@\211@ @\232\203\310\306 \"\210\nA\211\204\f\307*0\211\2033 \2033\f\202]\f\203? \204?\311\f!\210 \235\203J\210\202N B\f\203\\\312\307 C\"\210\313 \210 )\207" [button-lock-button-list b --dolist-tail-- button conflict no-replace hit nil throw button-lock-remove-from-button-list font-lock-add-keywords button-lock-maybe-fontify-buffer button-lock-mode] 4 (#$ . 8890)]) #@54 Remove BUTTON from `button-lock-global-button-list'. (defalias 'button-lock-remove-from-global-button-list #[(button) "\302 \"\211\207" [button button-lock-global-button-list delete] 3 (#$ . 9689)]) #@288 Add BUTTON to `button-lock-global-button-list'. The regexp used by the button is checked against the existing data structure. If the regexp duplicates that of an existing button, the existing duplicate is replaced. If NO-REPLACE is set, no replacement is made for a duplicate button. (defalias 'button-lock-add-to-global-button-list #[(button &optional no-replace) "\3062&\307\211\205$\n@\211@ @\232\203\310\306 \"\210\nA\211\204\f\307*0\211\205, ?\205K\f\203< \204<\311\f!\210 \235\203F\202K B\211)\207" [button-lock-global-button-list b --dolist-tail-- button conflict no-replace hit nil throw button-lock-remove-from-global-button-list] 4 (#$ . 9897)]) #@67 Add predefined, non-conflicting global buttons to the local list. (defalias 'button-lock-merge-global-buttons-to-local #[nil "\304\211\205!\n@\211 \235\204\305\306\307 \310\"\"\210\nA\211\204\304*\207" [button-lock-global-button-list button --dolist-tail-- button-lock-button-list nil apply button-lock-set-button append (:no-replace t)] 6 (#$ . 10583)]) #@101 Non-nil if Button-Lock mode is enabled. Use the command `button-lock-mode' to change this variable. (defvar button-lock-mode nil (#$ . 10955)) (make-variable-buffer-local 'button-lock-mode) #@1245 Toggle button-lock-mode, a minor mode for making text clickable. This is a minor mode. If called interactively, toggle the `Button-Lock mode' mode. If the prefix argument is positive, enable the mode, and if it is zero or negative, disable the mode. If called from Lisp, toggle the mode if ARG is `toggle'. Enable the mode if ARG is nil, omitted, or is a positive number. Disable the mode if ARG is a negative number. To check whether the minor mode is enabled in the current buffer, evaluate `button-lock-mode'. The mode's hook is called both when the mode is enabled and when it is disabled. Button-lock uses `font-lock-mode' to create and maintain its text properties. Therefore this mode can only be used where `font-lock-mode' is active. `button-lock-set-button' may be called to create a new button. `button-lock-clear-all-buttons' may be called to clear all button definitions in a buffer. When called interactively with no prefix argument, this command toggles the mode. When called interactively, with a prefix argument, it enables the mode if the argument is positive and otherwise disables it. When called from Lisp, it enables the mode if the argument is omitted or nil, and toggles the mode if the argument is 'toggle. (defalias 'button-lock-mode #[(&optional arg) "\306  \307=\203\n?\202 \247\203 \310W\203\311\202\312\313\303!\2032\314\302 \"\n\2032\302 B\n\203H\f\204C\315 \316H\317=\203H\311\202\211\n\203q\320\310!\210\321\322!\210\323 \210\324\325\326\311\312$\210\327 \210\330 \210\331\332!\203\211\333\334!\210\202\211\335\322!\210\327\336!\210\337 \210\330 \210\331\332!\203\211\333\340!\210\341\342\n\203\223\343\202\224\344\"\210\331\345!\203\271\306 \203\250\306 \232\203\271\346\333\347\n\203\264\350\202\265\351 #\210))\352 \210\n\207" [#1=#:last-message arg button-lock-mode local-minor-modes noninteractive local current-message toggle 1 nil t boundp delq buffer-name 0 32 font-lock-mode make-local-variable font-lock-extra-managed-props button-lock-merge-global-buttons-to-local add-hook font-lock-mode-hook button-lock-do-tell button-lock-tell-font-lock button-lock-maybe-fontify-buffer called-interactively-p interactive message "button-lock mode enabled" kill-local-variable forget button-lock-maybe-unbuttonify-buffer "button-lock mode disabled" run-hooks button-lock-mode-hook button-lock-mode-on-hook button-lock-mode-off-hook any " in current buffer" "Button-Lock mode %sabled%s" "en" "dis" force-mode-line-update] 5 (#$ . 11153) (list (if current-prefix-arg (prefix-numeric-value current-prefix-arg) 'toggle))]) (defvar button-lock-mode-hook nil) (byte-code "\301\302N\204\f\303\301\302\304#\210\303\301\305\306#\210\303\301\307\310C#\210\311\312\313\314\300!\205#\310\211%\207" [button-lock-mode-map button-lock-mode-hook variable-documentation put "Hook run after entering or leaving `button-lock-mode'.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" custom-type hook standard-value nil add-minor-mode button-lock-mode button-lock-mode-lighter boundp] 6) #@368 Activate `button-lock-mode' in a buffer if appropriate. button-lock mode will be activated in every buffer, except minibuffers buffers with names that begin with space buffers excluded by `button-lock-exclude-modes' buffers excluded by `button-lock-buffer-name-exclude-pattern' If called with a negative ARG, deactivate button-lock mode in the buffer. (defalias 'button-lock-maybe-turn-on #[(&optional arg) "\206\301\211\302W\204\303p!\205\304!\207" [arg 1 0 button-lock-buffer-included-p button-lock-mode] 3 (#$ . 14285)]) (put 'global-button-lock-mode 'globalized-minor-mode t) (defvar button-lock-mode-major-mode nil nil) (byte-code "\300\301!\210\302\303\304\305\306\307\310\311\312\313\314\315& \207" [make-variable-buffer-local button-lock-mode-major-mode custom-declare-variable global-button-lock-mode nil "Non-nil if Global Button-Lock mode is enabled.\nSee the `global-button-lock-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 `global-button-lock-mode'." :set custom-set-minor-mode :initialize custom-initialize-default :type boolean :group button-lock] 12) #@353 Toggle Button-Lock mode in all buffers. With prefix ARG, enable Global Button-Lock mode if ARG is positive; otherwise, disable it. If called from Lisp, enable the mode if ARG is omitted or nil. Button-Lock mode is enabled in all buffers where `button-lock-maybe-turn-on' would do it. See `button-lock-mode' for more information on Button-Lock mode. (defalias 'global-button-lock-mode #[(&optional arg) "\306 \307\303 \310=\203\311\303!?\202\" \247\203! \312W\203!\313\202\"\314\"\210\315\302!\2039\316\303\n\"\311\303!\2039\303\nB \203O\317\320\321\"\210\317\322\323\"\210\317\324\325\"\210\202^\326\320\321\"\210\326\322\323\"\210\326\324\325\"\210\327 \313\211\203\211 @r\fq\210 \203x\330 \210\202\201\203\201\331\332!\210) A\211\204g*\333\334\311\303!\203\226\335\202\227\336\"\210\337\340!\203\304\341\303!\210\306 \203\257\306 \232\203\304\342(\343\344\311\303!\203\276\345\202\277\346(#\210))\347 \210\311\303!\207" [#1=#:last-message arg global-minor-modes global-button-lock-mode buf --dolist-tail-- current-message set-default toggle default-value 1 nil t boundp delq add-hook after-change-major-mode-hook global-button-lock-mode-enable-in-buffers find-file-hook global-button-lock-mode-check-buffers change-major-mode-hook global-button-lock-mode-cmhh remove-hook buffer-list button-lock-maybe-turn-on button-lock-mode -1 run-hooks global-button-lock-mode-hook global-button-lock-mode-on-hook global-button-lock-mode-off-hook called-interactively-p any customize-mark-as-set "" message "Global Button-Lock mode %sabled%s" "en" "dis" force-mode-line-update local] 5 (#$ . 15529) (list (if current-prefix-arg (prefix-numeric-value current-prefix-arg) 'toggle))]) (defvar global-button-lock-mode-hook nil) (byte-code "\301\302N\204\f\303\301\302\304#\210\303\301\305\306#\210\303\301\307\310C#\210\311\312\310\313\300!\205#\310\211%\207" [global-button-lock-mode-map global-button-lock-mode-hook variable-documentation put "Hook run after entering or leaving `global-button-lock-mode'.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" custom-type hook standard-value nil add-minor-mode global-button-lock-mode boundp] 6) (defvar button-lock-mode-set-explicitly nil nil) (make-variable-buffer-local 'button-lock-mode-set-explicitly) (defalias 'button-lock-mode-set-explicitly #[nil "\301\211\207" [button-lock-mode-set-explicitly t] 2]) (byte-code "\300\301\302\303#\210\304\305\301\"\207" [put button-lock-mode-set-explicitly definition-name global-button-lock-mode add-hook button-lock-mode-hook] 4) (defvar global-button-lock-mode-buffers nil) (defalias 'global-button-lock-mode-enable-in-buffers #[nil "\306 \306\211\205B @\307\n!\203:r\nq\210\f\2046  =\2046\2033\310\311!\210\312 \210\2026\312 \210 ) A\211\204\f\306+\207" [global-button-lock-mode-buffers buffers buf --dolist-tail-- button-lock-mode-set-explicitly button-lock-mode-major-mode nil buffer-live-p button-lock-mode -1 button-lock-maybe-turn-on major-mode] 3]) (put 'global-button-lock-mode-enable-in-buffers 'definition-name 'global-button-lock-mode) (defalias 'global-button-lock-mode-check-buffers #[nil "\300 \210\301\302\303\"\207" [global-button-lock-mode-enable-in-buffers remove-hook post-command-hook global-button-lock-mode-check-buffers] 3]) (put 'global-button-lock-mode-check-buffers 'definition-name 'global-button-lock-mode) (defalias 'global-button-lock-mode-cmhh #[nil "p\211 \235\203 \210\202 B)\302\303\304\"\207" [#1=#:x global-button-lock-mode-buffers add-hook post-command-hook global-button-lock-mode-check-buffers] 4]) (put 'global-button-lock-mode-cmhh 'definition-name 'global-button-lock-mode) #@4858 Attach mouse actions to text via `font-lock-mode'. Required argument PATTERN is a regular expression to match. Required argument ACTION is a function to call when the matching text is clicked. A quoted function name or a lambda expression may be given. The function called by ACTION must be interactive. If ACTION is not valid the user may experience a silent failure. If the function called by ACTION uses (interactive "e") it may receive the relevant mouse event. Note that you may wish to use the mouse event to reposition the point. ACTION may alternatively contain a prepared keymap, in which case the convenience parameters :MOUSE-BINDING, :KEYBOARD-BINDING, and :KEYBOARD-ACTION will be ignored. Following PATTERN and ACTION is a Common Lisp-style series of keyword/value arguments: Setting :NO-REPLACE causes the function to have no effect when a button already exists using the given PATTERN. By default, any existing button using PATTERN will be replaced. :FACE is a font face to set on matching text, like hi-lock mode. By default, :FACE has no properties, and :FACE-POLICY is :APPEND. This means that other, existing text properties will take priority, and that clickable text will not be distinguished without a mouseover. To change this, try adding the arguments ":face 'link :face-policy 'prepend." Alternatively, `button-lock-face' may be customized. :MOUSE-FACE is the font face to set on mouseovers. It defaults to `button-lock-mouse-face'. :FACE-POLICY sets the override policy for button faces. Useful values are nil, 'keep, 'prepend, and 'append (the default). See the documentation for OVERRIDE in `font-lock-keywords'. :HELP-ECHO is applied to the 'help-echo text property, and may become visible in a tooltip depending on your Emacs setup. :HELP-TEXT is a deprecated synonym. :KBD-HELP is applied to the 'kbd-help text property, accessible to the user via `display-local-help', :KBD-HELP-MULTILINE is applied to the non-standard 'kbd-help-multiline text property. :GROUPING designates a subgroup in the pattern match to receive the new text properties. Subgroups, delimited by parentheses, are numbered from 1. The default :GROUPING is 0, indicating the entire match. :MOUSE-BINDING sets the mouse event which will invoke ACTION. The default is 'mouse-1. :KEYBOARD-BINDING sets a keyboard event which will invoke ACTION. The format is as accepted by `kbd'. The default is nil, meaning no keyboard binding is in effect. If this is set, it might also be wise to alert the user by setting :FACE. Note, the only difference between :MOUSE-BINDING and :KEYBOARD-BINDING is that :KEYBOARD-BINDING is interpreted by `kbd'. It is possible to pass keyboard events into :MOUSE-BINDING and vice versa. :KEYBOARD-ACTION is an alternate event to be run by :KEYBOARD-BINDING. The default is nil, meaning that :KEYBOARD-BINDING will invoke ACTION. This is intended for cases where ACTION is dependent on the position of the mouse. :ADDITIONAL-PROPERTY defines an arbitrary text property which will be set to t in for text which matches PATTERN, as optionally modified by :GROUPING. The property 'button-lock will always be set. As a convenience, :MOUSE-2 through :MOUSE-5 can be used to attach an alternate ACTION, as can :M-MOUSE-1 ..., :A-MOUSE-1 ..., :DOUBLE-MOUSE-1 ..., :WHEEL-UP..., and :WHEEL-DOWN... The list is not exhaustive. For a general method of adding alternate bindings, pass a keymap for :ACTION or use `button-lock-extend-binding'. If :REAR-STICKY is non-nil, the rear-nonsticky text property will not be added, as it is by default. Changing this setting is not recommended. If :REMOVE is non-nil, any existing button using PATTERN will be removed and forgotten by font-lock. If successful, this function returns the button which was added or removed from `font-lock-keywords'. Otherwise it returns nil. The button value can be passed to `button-lock-extend-binding'. (fn PATTERN ACTION &key (FACE \='button-lock-face) (MOUSE-FACE \='button-lock-mouse-face) (FACE-POLICY \='append) HELP-ECHO HELP-TEXT KBD-HELP KBD-HELP-MULTILINE (GROUPING 0) (MOUSE-BINDING \='mouse-1) KEYBOARD-BINDING KEYBOARD-ACTION ADDITIONAL-PROPERTY REAR-STICKY REMOVE NO-REPLACE MOUSE-2 MOUSE-3 MOUSE-4 MOUSE-5 WHEEL-DOWN WHEEL-UP DOWN-MOUSE-1 DOWN-MOUSE-2 DOWN-MOUSE-3 DOWN-MOUSE-4 DOWN-MOUSE-5 DOUBLE-MOUSE-1 DOUBLE-MOUSE-2 DOUBLE-MOUSE-3 DOUBLE-MOUSE-4 DOUBLE-MOUSE-5 TRIPLE-MOUSE-1 TRIPLE-MOUSE-2 TRIPLE-MOUSE-3 TRIPLE-MOUSE-4 TRIPLE-MOUSE-5 A-MOUSE-1 A-MOUSE-2 A-MOUSE-3 A-MOUSE-4 A-MOUSE-5 A-WHEEL-DOWN A-WHEEL-UP C-MOUSE-1 C-MOUSE-2 C-MOUSE-3 C-MOUSE-4 C-MOUSE-5 C-WHEEL-DOWN C-WHEEL-UP M-MOUSE-1 M-MOUSE-2 M-MOUSE-3 M-MOUSE-4 M-MOUSE-5 M-WHEEL-DOWN M-WHEEL-UP S-MOUSE-1 S-MOUSE-2 S-MOUSE-3 S-MOUSE-4 S-MOUSE-5 S-WHEEL-DOWN S-WHEEL-UP S-MOUSE-1 S-MOUSE-2 S-MOUSE-3 S-MOUSE-4 S-MOUSE-5 S-WHEEL-DOWN S-WHEEL-UP) (defalias 'button-lock-set-button #[(pattern action &rest #1=#:--cl-rest--) "\306\307\"\206\310A@\306\311\"\206\312A@\306\313\"\206\314A@\306\315\"A@\306\316\"A@\306\317\"A@@\306\320\"A@A\306\321\"\206G\322A@B\306\323\"\206S\324A@C\306\325\"A@D\306\326\"A@E\306\327\"A@F\306\330\"A@G\306\331\"A@H\306\332\"A@I\306\333\"A@J\306\334\"A@K\306\335\"A@L\306\336\"A@M\306\337\"A@N\306\340\"A@O\306\341\"A@P\306\342\"A@Q\306\343\"A@R\306\344\"A@S\306\345\"A@T\306\346\"A@U\306\347\"A@V\306\350\"A@W\306\351\"A@X\306\352\"A@Y\306\353\"A@Z\306\354\"A@[\306\355\"A@\\\306\356\"A@]\306\357\"A@^\306\360\"A@_\306\361\"A@`\306\362\"A@a\306\363\"A@b\306\364\"A@c\306\365\"A@d\306\366\"A@e\306\367\"A@f\306\370\"A@g\306\371\"A@h\306\372\"A@i\306\373\"A@j\306\374\"A@k\306\375\"A@l\306\376\"A@m\306\377\"A@n\306\201\212\"A@o\306\201\213\"A@p\306\201\214\"A@q\306\201\215\"A@r\306\201\216\"A@s\306\201\217\"A@t\306\201\220\"A@u\306\201\221\"A@v\306\201\222\"A@w\306\201\223\"A@x\306\201\224\"A@y\306\201\225\"A@z\306\201\226\"A@{\306\201\227\"A@|\306\201\230\"A@}\306\201\231\"A@~\306\201\232\"A@\306\201\233\"A@\200\306\201\234\"A@\201\202\202\203\252\202@\201\235>\203\211\202AA\211\202\202r\201\236>A@\203\234\201\237\211\202\202r\201\240\201\241\202@\"\210\202p)\201\242 \201\237\211\203\204\205\201\243\206!\203\315\201\244\206!\205\202'\201\245\205\201\246C!\206#\210\201\247\201\237\207\211\210\203 \210@\211\207J\203\201\245\205\201\246\207!\207J#\210\210A\211\210\204\352*D\203'\201\245\205\201\250D!E\206%\206#\210\301 \201\251\205\201\252BBBB\204\201\253\201\254\201\251\"\210\201\253\201\254\201\255\"\210F\203j\201\256\204F\201\257B\"\204\201\253\201\254F\"\210\n\203\202\201\256\204\302\nD\"\204\201\253\201\254\302\"\210\f\204\212 \203\242\201\256\204\304\f\206\225 D\"\204\201\253\201\254\304\"\210@\203\300\201\256\204\201@@D\"\204\201\253\201\254\201@\"\210A\203\336\201\256\204\201AAD\"\204\201\253\201\254\201A\"\210G\204\371\201\256\204\201\260\"\204\201\253\201\254\201\261\"\210\211B\201\262\204D ED\203H\203\201\263\203!\202\201\264\203I\".J\207" [#1# face mouse-face face-policy help-echo help-text plist-member :face (nil button-lock-face) :mouse-face (nil button-lock-mouse-face) :face-policy (nil append) :help-echo :help-text :kbd-help :kbd-help-multiline :grouping (nil 0) :mouse-binding (nil mouse-1) :keyboard-binding :keyboard-action :additional-property :rear-sticky :remove :no-replace :mouse-2 :mouse-3 :mouse-4 :mouse-5 :wheel-down :wheel-up :down-mouse-1 :down-mouse-2 :down-mouse-3 :down-mouse-4 :down-mouse-5 :double-mouse-1 :double-mouse-2 :double-mouse-3 :double-mouse-4 :double-mouse-5 :triple-mouse-1 :triple-mouse-2 :triple-mouse-3 :triple-mouse-4 :triple-mouse-5 :A-mouse-1 :A-mouse-2 :A-mouse-3 :A-mouse-4 :A-mouse-5 :A-wheel-down :A-wheel-up :C-mouse-1 :C-mouse-2 :C-mouse-3 :C-mouse-4 :C-mouse-5 :C-wheel-down :C-wheel-up :M-mouse-1 :M-mouse-2 kbd-help kbd-help-multiline grouping mouse-binding keyboard-binding keyboard-action additional-property rear-sticky remove no-replace mouse-2 mouse-3 mouse-4 mouse-5 wheel-down wheel-up down-mouse-1 down-mouse-2 down-mouse-3 down-mouse-4 down-mouse-5 double-mouse-1 double-mouse-2 double-mouse-3 double-mouse-4 double-mouse-5 triple-mouse-1 triple-mouse-2 triple-mouse-3 triple-mouse-4 triple-mouse-5 A-mouse-1 A-mouse-2 A-mouse-3 A-mouse-4 A-mouse-5 A-wheel-down A-wheel-up C-mouse-1 C-mouse-2 C-mouse-3 C-mouse-4 C-mouse-5 C-wheel-down C-wheel-up M-mouse-1 M-mouse-2 M-mouse-3 M-mouse-4 M-mouse-5 M-wheel-down M-wheel-up S-mouse-1 S-mouse-2 S-mouse-3 S-mouse-4 S-mouse-5 S-wheel-down S-wheel-up s-mouse-1 s-mouse-2 s-mouse-3 s-mouse-4 s-mouse-5 s-wheel-down s-wheel-up #2=#:--cl-keys-- fl-keyword properties map action var --dolist-tail-- pattern :M-mouse-3 :M-mouse-4 :M-mouse-5 :M-wheel-down :M-wheel-up :S-mouse-1 :S-mouse-2 :S-mouse-3 :S-mouse-4 :S-mouse-5 :S-wheel-down :S-wheel-up :s-mouse-1 :s-mouse-2 :s-mouse-3 :s-mouse-4 :s-mouse-5 :s-wheel-down :s-wheel-up (:face :mouse-face :face-policy :help-echo :help-text :kbd-help :kbd-help-multiline :grouping :mouse-binding :keyboard-binding :keyboard-action :additional-property :rear-sticky :remove :no-replace :mouse-2 :mouse-3 :mouse-4 :mouse-5 :wheel-down :wheel-up :down-mouse-1 :down-mouse-2 :down-mouse-3 :down-mouse-4 :down-mouse-5 :double-mouse-1 :double-mouse-2 :double-mouse-3 :double-mouse-4 :double-mouse-5 :triple-mouse-1 :triple-mouse-2 :triple-mouse-3 :triple-mouse-4 :triple-mouse-5 :A-mouse-1 :A-mouse-2 :A-mouse-3 :A-mouse-4 :A-mouse-5 :A-wheel-down :A-wheel-up :C-mouse-1 :C-mouse-2 :C-mouse-3 :C-mouse-4 :C-mouse-5 :C-wheel-down :C-wheel-up :M-mouse-1 :M-mouse-2 :M-mouse-3 :M-mouse-4 :M-mouse-5 :M-wheel-down :M-wheel-up :S-mouse-1 :S-mouse-2 :S-mouse-3 :S-mouse-4 :S-mouse-5 :S-wheel-down :S-wheel-up :s-mouse-1 :s-mouse-2 :s-mouse-3 :s-mouse-4 :s-mouse-5 :s-wheel-down :s-wheel-up :allow-other-keys) :allow-other-keys nil error "Keyword argument %s not one of (:face :mouse-face :face-policy :help-echo :help-text :kbd-help :kbd-help-multiline :grouping :mouse-binding :keyboard-binding :keyboard-action :additional-property :rear-sticky :remove :no-replace :mouse-2 :mouse-3 :mouse-4 :mouse-5 :wheel-down :wheel-up :down-mouse-1 :down-mouse-2 :down-mouse-3 :down-mouse-4 :down-mouse-5 :double-mouse-1 :double-mouse-2 :double-mouse-3 :double-mouse-4 :double-mouse-5 :triple-mouse-1 :triple-mouse-2 :triple-mouse-3 :triple-mouse-4 :triple-mouse-5 :A-mouse-1 :A-mouse-2 :A-mouse-3 :A-mouse-4 :A-mouse-5 :A-wheel-down :A-wheel-up :C-mouse-1 :C-mouse-2 :C-mouse-3 :C-mouse-4 :C-mouse-5 :C-wheel-down :C-wheel-up :M-mouse-1 :M-mouse-2 :M-mouse-3 :M-mouse-4 :M-mouse-5 :M-wheel-down :M-wheel-up :S-mouse-1 :S-mouse-2 :S-mouse-3 :S-mouse-4 :S-mouse-5 :S-wheel-down :S-wheel-up :s-mouse-1 :s-mouse-2 :s-mouse-3 :s-mouse-4 :s-mouse-5 :s-wheel-down :s-wheel-up)" make-sparse-keymap keymapp copy-sequence define-key vector (mouse-2 mouse-3 mouse-4 mouse-5 wheel-down wheel-up down-mouse-1 down-mouse-2 down-mouse-3 down-mouse-4 down-mouse-5 double-mouse-1 double-mouse-2 double-mouse-3 double-mouse-4 double-mouse-5 triple-mouse-1 triple-mouse-2 triple-mouse-3 triple-mouse-4 triple-mouse-5 A-mouse-1 A-mouse-2 A-mouse-3 A-mouse-4 A-mouse-5 A-wheel-down A-wheel-up C-mouse-1 C-mouse-2 C-mouse-3 C-mouse-4 C-mouse-5 C-wheel-down C-wheel-up M-mouse-1 M-mouse-2 M-mouse-3 M-mouse-4 M-mouse-5 M-wheel-down M-wheel-up S-mouse-1 S-mouse-2 S-mouse-3 S-mouse-4 S-mouse-5 S-wheel-down S-wheel-up s-mouse-1 s-mouse-2 s-mouse-3 s-mouse-4 s-mouse-5 s-wheel-down s-wheel-up) read-kbd-macro keymap (button-lock t) add-to-list font-lock-extra-managed-props button-lock append (t) (rear-nonsticky t) rear-nonsticky quote button-lock-remove-from-button-list button-lock-add-to-button-list] 6 (#$ . 19278)]) #@252 Equivalent to running `button-lock-set-button' with :REMOVE set to true. The syntax is otherwise identical to `button-lock-set-button', which see. A single argument BUTTON object may also be passed, which was returned from `button-lock-set-button'. (defalias 'button-lock-unset-button #[(&rest button) "G\301U\203\302@!\203\303@!\207\304\305\306\307\"\"\207" [button 1 button-lock-button-p button-lock-remove-from-button-list apply button-lock-set-button append (:remove t)] 5 (#$ . 31188)]) #@595 Add a binding to an existing button. The principal button creation function `button-lock-set-button' accepts only a limited subset of mouse bindings when binding multiple actions. This function supports arbitrary key bindings for binding additional actions on a button. EXISTING-BUTTON is a button value as returned by `button-lock-set-button'. ACTION, MOUSE-BINDING and KEYBOARD-BINDING are as documented in `button-lock-set-button'. It is possible to pass a nil MOUSE-BINDING in order to set only a KEYBOARD-BINDING. When passing a prepared keymap for ACTION, set MOUSE-BINDING to nil. (defalias 'button-lock-extend-binding #[(existing-button action mouse-binding &optional keyboard-binding) " \235\204\n\306\307!\210\310\311 \235@!>A@ \203\312\313C\"\210\314\f!\203J\fA\313\211\203F@\315\n\316 @! A#\210A\211\204/*\202f\203X\315\n\316!\f#\210\203f\315\n\317!\f#\210 \205o\320\313C\")\207" [existing-button button-lock-button-list map button-lock-mode action cell error "No such button" keymap button-lock-button-properties font-lock-remove-keywords nil keymapp define-key vector read-kbd-macro font-lock-add-keywords --dolist-tail-- mouse-binding keyboard-binding] 5 (#$ . 31697)]) #@146 Remove and deactivate all button-lock buttons in the buffer. If FORCE is non-nil, try to remove buttons even when the minor mode is not active. (defalias 'button-lock-clear-all-buttons #[nil "G\302\303!\210\304\305 \210\306 \210\307\310!\203 \311V\203 \312\313 \"\210 )\207" [button-lock-button-list num button-lock-tell-font-lock forget nil button-lock-maybe-unbuttonify-buffer button-lock-maybe-fontify-buffer called-interactively-p interactive 0 message "removed %d button patterns"] 3 (#$ . 32928) nil]) #@300 Register a global button-lock button definition. Arguments follow the form of `button-lock-set-button'. The BUTTON defined here will applied each time the button-lock minor mode is activated in a buffer. To see an effect in any given buffer, button-lock mode must be deactivated and reactivated. (defalias 'button-lock-register-global-button #[(&rest button) "\301!\207" [button button-lock-add-to-global-button-list] 2 (#$ . 33450)]) #@184 Remove global button-lock BUTTON. Arguments follow the form of `button-lock-set-button'. To see an effect in any given buffer, button-lock mode must be deactivated and reactivated. (defalias 'button-lock-unregister-global-button #[(&rest button) "\301!\207" [button button-lock-remove-from-global-button-list] 2 (#$ . 33896)]) #@145 Remove all global button-lock buttons definitions. To see an effect in any given buffer, button-lock mode must be deactivated and reactivated. (defalias 'button-lock-unregister-all-global-buttons #[nil "\301\302\207" [button-lock-global-button-list nil t] 1 (#$ . 34233) nil]) (provide 'button-lock)