;ELC ;;; Compiled ;;; in Emacs version 27.1 ;;; 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\300\303!\210\300\304!\210\305\306\307\310\311\301%\210\312\313\314\315\316DD\317\320\321\322\323\311\306\324\325& \207" [require erc wid-edit erc-fill browse-url custom-declare-group erc-button nil "Define how text can be turned into clickable buttons." :group custom-declare-variable erc-button-mode funcall function #[0 "\300\207" [nil] 1] "Non-nil if Erc-Button mode is enabled.\nSee the `erc-button-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 `erc-button-mode'." :set custom-set-minor-mode :initialize custom-initialize-default :type boolean] 12) #@264 Toggle ERC button mode. With a prefix argument ARG, enable button if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil. This mode buttonizes all messages according to `erc-button-alist'. (fn &optional ARG) (defalias 'erc-button-mode #[256 "\301 \302\300\303=\203\304\300!?\202\305!\306V\"\210\203\"\307 \210\202%\310 \210\311\312\304\300!\2031\313\2022\314\"\210\315\316!\203\\\317\300!\210\301 \203J\211\301 \232\203\\\320\321\322\304\300!\203W\323\202X\324#\266\210\325 \210\304\300!\207" [erc-button-mode current-message set-default toggle default-value prefix-numeric-value 0 erc-button-enable erc-button-disable run-hooks erc-button-mode-hook erc-button-mode-on-hook erc-button-mode-off-hook called-interactively-p any customize-mark-as-set "" message "Erc-Button mode %sabled%s" "en" "dis" force-mode-line-update] 7 (#$ . 1146) (byte-code "\206\301C\207" [current-prefix-arg toggle] 1)]) (defvar erc-button-mode-hook nil) (byte-code "\301\302N\204\f\303\301\302\304#\210\305\306\307\310\300!\205\307\211%\207" [erc-button-mode-map erc-button-mode-hook variable-documentation put "Hook run after entering or leaving `erc-button-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 erc-button-mode nil boundp] 6) #@25 Enable ERC button mode. (defalias 'erc-button-enable #[0 "\301\302\303\"\210\304\305\306\307\310#\210\305\311\307\310#\210\305\312\313\"\210\305\314\315\"\207" [erc-button-mode add-to-list erc-modules button t add-hook erc-insert-modify-hook erc-button-add-buttons append erc-send-modify-hook erc-complete-functions erc-button-next-function erc-mode-hook erc-button-setup] 4 (#$ . 2548) nil]) #@26 Disable ERC button mode. (defalias 'erc-button-disable #[0 "\302\303\"\304\305\306\307\"\210\305\310\307\"\210\305\311\312\"\210\305\313\314\"\207" [erc-modules erc-button-mode delq button nil remove-hook erc-insert-modify-hook erc-button-add-buttons erc-send-modify-hook erc-complete-functions erc-button-next-function erc-mode-hook erc-button-setup] 3 (#$ . 2948) nil]) (byte-code "\300\301\302\303#\210\300\304\302\303#\210\300\305\302\303#\210\306\307\310\311\312\313%\210\314\315\316\317\320DD\321\322\323\312\313&\210\314\324\316\317\325DD\326\322\323\312\313&\210\314\327\316\317\330DD\331\322\323\312\313&\210\314\332\316\317\333DD\334\335\336\312\307\322\337& \210\314\340\316\317\341DD\342\312\307\322\343&\210\314\344\316\317\345DD\346\312\307\322\347&\210\314\350\316\317\351DD\352\312\307\322\353&\210\354\355\356\357#\210\360\211\203\255\211@\355N\203\246\356N\204\246\300\356\355N#\210A\266\202\202\214\210\361\355\356\336#\210\314\356\316\317\362DD\363\335\336\312\307\322\353& \210\314\364\316\317\365DD\366\312\307\335\367\322\370& \210\314\371\316\317\372DD\373\312\307\322\353&\210\314\374\316\317\375DD\376\312\307\322\353&\207" [put erc-button-mode definition-name button erc-button-enable erc-button-disable custom-declare-face erc-button ((t :weight bold)) "ERC button face." :group erc-faces custom-declare-variable erc-button-face funcall function #[0 "\300\207" [erc-button] 1] "Face used for highlighting buttons in ERC buffers.\n\nA button is a piece of text that you can activate by pressing\n`RET' or `mouse-2' above it. See also `erc-button-keymap'." :type face erc-button-nickname-face #[0 "\300\207" [erc-nick-default-face] 1] "Face used for ERC nickname buttons." erc-button-mouse-face #[0 "\300\207" [highlight] 1] "Face used for mouse highlighting in ERC buffers.\n\nButtons will be displayed in this face when the mouse cursor is\nabove them." erc-button-url-regexp #[0 "\207" [browse-url-button-regexp] 1] "Regular expression that matches URLs." :version "27.1" regexp erc-button-wrap-long-urls #[0 "\300\207" [nil] 1] "If non-nil, \"long\" URLs matching `erc-button-url-regexp' will be wrapped.\n\nIf this variable is a number, consider URLs longer than its value to\nbe \"long\". If t, URLs will be considered \"long\" if they are\nlonger than `erc-fill-column'." (choice integer boolean) erc-button-buttonize-nicks #[0 "\300\207" [t] 1] "Flag indicating whether nicks should be buttonized or not." boolean erc-button-rfc-url #[0 "\300\207" [#1="http://www.faqs.org/rfcs/rfc%s.html"] 1 #1#] "URL used to browse rfc references.\n%s is replaced by the number." string defvaralias erc-button-google-url erc-button-search-url nil (saved-value saved-variable-comment) make-obsolete-variable #[0 "\300\207" [#2="http://duckduckgo.com/?q=%s"] 1 #2#] "URL used to search for a term.\n%s is replaced by the search string." erc-button-alist #[0 "\300\207" [(('nicknames 0 erc-button-buttonize-nicks erc-nick-popup 0) (erc-button-url-regexp 0 t browse-url-button-open-url 0) (" ]+\\) *>" 0 t browse-url-button-open-url 1) ("[`]\\([a-zA-Z][-a-zA-Z_0-9]+\\)[']" 1 t erc-button-describe-symbol 1) ("\\bInfo:[\"]\\([^\"]+\\)[\"]" 0 t Info-goto-node 1) ("\\b\\(Ward\\|Wiki\\|WardsWiki\\|TheWiki\\):\\([A-Z][a-z]+\\([A-Z][a-z]+\\)+\\)" 0 t (lambda (page) (browse-url (concat "http://c2.com/cgi-bin/wiki?" page))) 2) ("EmacsWiki:\\([A-Z][a-z]+\\([A-Z][a-z]+\\)+\\)" 0 t erc-browse-emacswiki 1) ("Lisp:\\([a-zA-Z.+-]+\\)" 0 t erc-browse-emacswiki-lisp 1) ("\\bGoogle:\\([^ \n \f]+\\)" 0 t (lambda (keywords) (browse-url (format erc-button-search-url keywords))) 1) ("\\brfc[#: ]?\\([0-9]+\\)" 0 t (lambda (num) (browse-url (format erc-button-rfc-url num))) 1) ("\\s-\\(@\\([0-9][0-9][0-9]\\)\\)" 1 t erc-button-beats-to-time 2))] 1] "Alist of regexps matching buttons in ERC buffers.\nEach entry has the form (REGEXP BUTTON FORM CALLBACK PAR...), where\n\nREGEXP is the string matching text around the button or a symbol\n indicating a variable holding that string, or a list of\n strings, or an alist with the strings in the car. Note that\n entries in lists or alists are considered to be nicks or other\n complete words. Therefore they are enclosed in \\< and \\>\n while searching. REGEXP can also be the quoted symbol\n \\='nicknames, which matches the nickname of any user on the\n current server.\n\nBUTTON is the number of the regexp grouping actually matching the\n button. This is ignored if REGEXP is \\='nicknames.\n\nFORM is a lisp expression which must eval to true for the button to\n be added.\n\nCALLBACK is the function to call when the user push this button.\n CALLBACK can also be a symbol. Its variable value will be used\n as the callback function.\n\nPAR is a number of a regexp grouping whose text will be passed to\n CALLBACK. There can be several PAR arguments. If REGEXP is\n \\='nicknames, these are ignored, and CALLBACK will be called with\n the nickname matched as the argument." "24.1" (repeat (list :tag "Button" (choice :tag "Matches" regexp (variable :tag "Variable containing regexp") (const :tag "Nicknames" 'nicknames)) (integer :tag "Number of the regexp section that matches") (choice :tag "When to buttonize" (const :tag "Always" t) (sexp :tag "Only when this evaluates to non-nil")) (function :tag "Function to call when button is pressed") (repeat :tag "Sections of regexp to send to the function" :inline t (integer :tag "Regexp section number")))) erc-emacswiki-url #[0 "\300\207" [#3="http://www.emacswiki.org/cgi-bin/wiki.pl?"] 1 #3#] "URL of the EmacsWiki Homepage." erc-emacswiki-lisp-url #[0 "\300\207" [#4="http://www.emacswiki.org/elisp/"] 1 #4#] "URL of the EmacsWiki ELisp area."] 10) #@31 Local keymap for ERC buttons. (defvar erc-button-keymap (byte-code "\301 \302\303\304#\210\302\305\306#\210\302\307\310#\210\302\311\312#\210\302\313\314#\210\315\"\210\211\207" [erc-mode-map make-sparse-keymap define-key " " erc-button-press-button [mouse-2] erc-button-click-button " " erc-button-next [backtab] erc-button-previous [follow-link] mouse-face set-keymap-parent] 5) (#$ . 8674)) #@125 Syntax table used when buttonizing messages. This syntax table should make all the valid nick characters word constituents. (defvar erc-button-syntax-table (byte-code "\300 \301\302\303#\210\301\304\303#\210\301\305\303#\210\301\306\303#\210\301\307\303#\210\301\310\303#\210\301\311\303#\210\301\312\303#\210\301\313\303#\210\301\314\303#\210\211\207" [make-syntax-table modify-syntax-entry 91 "w" 93 123 125 96 94 45 95 124 92] 5) (#$ . 9082)) #@99 Internal variable used to keep track of whether we've added the global-level ERC button keys yet. (defvar erc-button-keys-added nil (#$ . 9544)) #@67 Add ERC mode-level button movement keys. This is only done once. (defalias 'erc-button-setup #[0 "?\205\302 \303\304#\210\305\211\207" [erc-button-keys-added erc-mode-map define-key [backtab] erc-button-previous t] 4 (#$ . 9695)]) #@154 Find external references in the current buffer and make buttons of them. "External references" are things like URLs, as specified by `erc-button-alist'. (defalias 'erc-button-add-buttons #[0 "\212\305 p\306\307\310\311\312\"\313\"\314$\216\315!\210\316\317\211 \316\320 \210\211\205\270\211@\211@\321\232\203:\322!\210\202\261\211@;\203E\211@\206O\323@!\205O\211@J\262;\203^\324\"\210\202\261<\203\205@;\203\205\211\203\201\211@\324\325\326!\327Q\"\210A\266\202\202j\210\202\261<\203\261@<\203\261@@;\203\261\211\203\260\211@\324\325\326@!\327Q\"\210A\266\202\202\230\210A\266\202\202&\262+\266\205)\266\202)\207" [erc-button-syntax-table erc-button-alist inhibit-field-text-motion inhibit-point-motion-hooks buffer-read-only syntax-table make-byte-code 0 "r\301q\210\302\300!)\207" vconcat vector [set-syntax-table] 2 set-syntax-table nil t erc-button-remove-old-buttons 'nicknames erc-button-add-nickname-buttons boundp erc-button-add-buttons-1 "\\<" regexp-quote "\\>"] 15 (#$ . 9938) nil]) #@71 Search through the buffer for nicknames, and add buttons. (fn ENTRY) (defalias 'erc-button-add-nickname-buttons #[257 "\3028\3038\304\211\305=\204\306!\205deb\210\307 \205d\310 \211\262\203\311@A\"\262\312 \203I\313 \314!\205Dr\211q\210\315\316!\")\262\204V \203\315\316! \"\203\317@A\305C%\210\202\207" [erc-server-users erc-channel-users 2 3 nil t eval erc-forward-word erc-bounds-of-word-at-point buffer-substring-no-properties erc-server-buffer-p erc-server-buffer buffer-live-p gethash erc-downcase erc-button-add-button] 11 (#$ . 10990)]) #@84 Search through the buffer for matches to ENTRY and add buttons. (fn REGEXP ENTRY) (defalias 'erc-button-add-buttons-1 #[514 "eb\210\300\301\302#\205<\211A@\224A@\225\3038\3048\305\306\307\233\"\302=\204,\310!\2037\311\301\f&\210\266\202\207" [re-search-forward nil t 2 3 mapcar match-string 4 eval erc-button-add-button] 14 (#$ . 11574)]) #@223 Remove all existing buttons. This is called with narrowing in effect, just before the text is buttonized again. Removing a button means to remove all the properties that `erc-button-add-button' adds, except for the face. (defalias 'erc-button-remove-old-buttons #[0 "\300ed\301#\207" [remove-text-properties (erc-callback nil erc-data nil mouse-face nil keymap nil)] 4 (#$ . 11941)]) #@228 Create a button between FROM and TO with callback FUN and data DATA. NICK-P specifies if this is a nickname button. REGEXP is the regular expression which matched for this button. (fn FROM TO FUN NICK-P &optional DATA REGEXP) (defalias 'erc-button-add-button #[1540 "\306 \203S\211\n\230\203SZ \247\203 \202 \fGZ\211V\203S\307 \310c\210\262b\210\307 \311c\210\262\312!ZV\203R\211\\b\210\313\f\261\210\211`\306\223\210\2028\210)\203g \203u\314 #\210\202u\203u\314#\210\315\205\203\316D\317D\244\320D\244\321\322D\244\205\231\323D\244#\207" [fill-column erc-button-wrap-long-urls erc-button-url-regexp erc-fill-column erc-fill-prefix erc-button-nickname-face nil point-marker ">" "