Server IP : 111.118.215.189 / Your IP : 18.117.158.174 Web Server : Apache System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : a1673wkz ( 2475) PHP Version : 8.2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /usr/share/emacs/24.3/lisp/erc/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
;ELC ;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:08:42 2024 ;;; from file /builddir/build/BUILD/emacs-24.3/lisp/erc/erc-match.el ;;; in Emacs version 24.3.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\302\303\304\305\306\301%\210\307\310\304\311\312\313\314\315\306\303\316\317&\207" [require erc custom-declare-group erc-match nil "Keyword and Friend/Foe/... recognition.\nGroup containing all things concerning pattern matching in ERC\nmessages." :group custom-declare-variable erc-match-mode "Non-nil if Erc-Match mode is enabled.\nSee the command `erc-match-mode' for 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-match-mode'." :set custom-set-minor-mode :initialize custom-initialize-default :type boolean] 12) #@532 Toggle ERC match mode. With a prefix argument ARG, enable match if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil. This mode checks whether messages match certain patterns. If so, they are hidden or highlighted. This is controlled via the variables `erc-pals', `erc-fools', `erc-keywords', `erc-dangerous-hosts', and `erc-current-nick-highlight-type'. For all these highlighting types, you can decide whether the entire message or only the sending nick is highlighted. (defalias 'erc-match-mode #[(&optional arg) "\303 \304=\203 \n?\202 \305 !\306V\211\203 \307 \210\202! \310 \210\311\312\n\203+ \313\202, \314\"\210\315\316!\203Q \317\302!\210\303 \203D \303 \232\203Q \320\321\n\203N \322\202O \323\"\210)\324 \210\n\207" [#1=#:last-message arg erc-match-mode current-message toggle prefix-numeric-value 0 erc-match-enable erc-match-disable run-hooks erc-match-mode-hook erc-match-mode-on-hook erc-match-mode-off-hook called-interactively-p any customize-mark-as-set message "Erc-Match mode %sabled" "en" "dis" force-mode-line-update] 4 (#$ . 1230) (list (or current-prefix-arg 'toggle))]) (byte-code "\301\302\303\304\300!\205\n \303\211%\207" [erc-match-mode-map add-minor-mode erc-match-mode nil boundp] 6) #@24 Enable ERC match mode. (defalias 'erc-match-enable #[nil "\301\302\303\"\210\304\305\306\307\310#\207" [erc-match-mode add-to-list erc-modules match t add-hook erc-insert-modify-hook erc-match-message append] 4 (#$ . 2519) nil]) #@25 Disable ERC match mode. (defalias 'erc-match-disable #[nil "\302\303\"\304\305\306\307\"\207" [erc-modules erc-match-mode delq match nil remove-hook erc-insert-modify-hook erc-match-message] 3 (#$ . 2755) nil]) (byte-code "\300\301\302\303#\210\300\304\302\303#\210\300\305\302\303#\210\306\307\310\311\312\313\314\315&\210\306\316\310\317\312\313\314\320&\210\306\321\310\322\312\313\314\323&\210\306\324\310\325\312\313\314\326&\210\306\327\330\331\312\313\314\332&\210\306\333\334\335\312\313\314\336&\210\306\337\340\341\312\313\314\342&\210\306\343\344\345\312\313\314\346&\210\306\347\350\351\312\313\314\352&\210\306\353\354\355\312\313\314\356&\210\306\357\360\361\312\313\314\362&\210\306\363\364\365\312\313\314\366&\210\306\367\370\371\312\313\314\372&\210\306\373\374\375\376\377\312\313\314\201@ & \210\306\201A \310\201B \312\313\201C \201D \314\201E & \207" [put erc-match-mode definition-name match erc-match-enable erc-match-disable custom-declare-variable erc-pals nil "List of pals on IRC." :group erc-match :type (repeat regexp) erc-fools "List of fools on IRC." (repeat regexp) erc-keywords "List of keywords to highlight in all incoming messages.\nEach entry in the list is either a regexp, or a cons cell with the\nregexp in the car and the face to use in the cdr. If no face is\nspecified, `erc-keyword-face' is used." (repeat (choice regexp (list regexp face))) erc-dangerous-hosts "List of regexps for hosts to highlight.\nUseful to mark nicks from dangerous hosts." (repeat regexp) erc-current-nick-highlight-type 'keyword "Determines how to highlight text in which your current nickname appears\n(does not apply to text sent by you).\n\nThe following values are allowed:\n\n nil - do not highlight the message at all\n 'keyword - highlight all instances of current nickname in message\n 'nick - highlight the nick of the user who typed your nickname\n 'nick-or-keyword - highlight the nick of the user who typed your nickname,\n or all instances of the current nickname if there was\n no sending user\n 'all - highlight the entire message where current nickname occurs\n\nAny other value disables highlighting of current nickname altogether." (choice (const nil) (const nick) (const keyword) (const nick-or-keyword) (const all)) erc-pal-highlight-type 'nick "Determines how to highlight messages by pals.\nSee `erc-pals'.\n\nThe following values are allowed:\n\n nil - do not highlight the message at all\n 'nick - highlight pal's nickname only\n 'all - highlight the entire message from pal\n\nAny other value disables pal highlighting altogether." (choice (const nil) (const nick) (const all)) erc-fool-highlight-type 'nick "Determines how to highlight messages by fools.\nSee `erc-fools'.\n\nThe following values are allowed:\n\n nil - do not highlight the message at all\n 'nick - highlight fool's nickname only\n 'all - highlight the entire message from fool\n\nAny other value disables fool highlighting altogether." (choice (const nil) (const nick) (const all)) erc-keyword-highlight-type 'keyword "Determines how to highlight messages containing keywords.\nSee variable `erc-keywords'.\n\nThe following values are allowed:\n\n 'keyword - highlight keyword only\n 'all - highlight the entire message containing keyword\n\nAny other value disables keyword highlighting altogether." (choice (const nil) (const keyword) (const all)) erc-dangerous-host-highlight-type 'nick "Determines how to highlight messages by nicks from dangerous-hosts.\nSee `erc-dangerous-hosts'.\n\nThe following values are allowed:\n\n 'nick - highlight nick from dangerous-host only\n 'all - highlight the entire message from dangerous-host\n\nAny other value disables dangerous-host highlighting altogether." (choice (const nil) (const nick) (const all)) erc-log-matches-types-alist '((keyword . "ERC Keywords")) "Alist telling ERC where to log which match types.\nValid match type keys are:\n- keyword\n- pal\n- dangerous-host\n- fool\n- current-nick\n\nThe other element of each cons pair in this list is the buffer name to\nuse for the logged message." (repeat (cons (choice :tag "Key" (const keyword) (const pal) (const dangerous-host) (const fool) (const current-nick)) (string :tag "Buffer name"))) erc-log-matches-flag 'away "Flag specifying when matched message logging should happen.\nWhen nil, don't log any matched messages.\nWhen t, log messages.\nWhen 'away, log messages only when away." (choice (const nil) (const away) (const t)) erc-log-match-format "%t<%n:%c> %m" "Format for matched Messages.\nThis variable specifies how messages in the corresponding log buffers will\nbe formatted. The various format specs are:\n\n%t Timestamp (uses `erc-timestamp-format' if non-nil or \"[%Y-%m-%d %H:%M] \")\n%n Nickname of sender\n%u Nickname!user@host of sender\n%c Channel in which this was received\n%m Message" string erc-beep-match-types '(current-nick) "Types of matches to beep for when a match occurs.\nThe function `erc-beep-on-match' needs to be added to `erc-text-matched-hook'\nfor beeping to work." (choice (repeat :tag "Beep on match" (choice (const current-nick) (const keyword) (const pal) (const dangerous-host) (const fool))) (const :tag "Don't beep" nil)) erc-text-matched-hook '(erc-log-matches) "Hook run when text matches a given match-type.\nFunctions in this hook are passed as arguments:\n(match-type nick!user@host message) where MATCH-TYPE is a symbol of:\ncurrent-nick, keyword, pal, dangerous-host, fool" :options (erc-log-matches erc-hide-fools erc-beep-on-match) hook erc-match-exclude-server-buffer "If true, don't perform match on the server buffer; this is\nuseful for excluding all the things like MOTDs from the server\nand other miscellaneous functions." :version "24.3" boolean] 10) #@126 Syntax table used when highlighting messages. This syntax table should make all the valid nick characters word constituents. (defvar erc-match-syntax-table (byte-code "\301 \302\303\304#\210\302\305\304#\210\302\306\304#\210\302\307\304#\210\302\310\304#\210\302\311\304#\210\302\312\304#\210\302\313\304#\210\302\314\304#\210\302\315\304#\210\302\316\304#\210\302\317\304#\210\302\320\304#\210)\207" [table make-syntax-table modify-syntax-entry 40 "w" 41 91 93 123 125 96 39 94 45 95 124 92] 4) (#$ . 8640)) (byte-code "\300\301\302\303\304\305%\210\300\306\307\310\304\305%\210\300\311\312\313\304\305%\210\300\314\315\316\304\305%\210\300\317\320\321\304\305%\207" [custom-declare-face erc-current-nick-face ((t :weight bold :foreground "DarkTurquoise")) "ERC face for occurrences of your current nickname." :group erc-faces erc-dangerous-host-face ((t :foreground "red")) "ERC face for people on dangerous hosts.\nSee `erc-dangerous-hosts'." erc-pal-face ((t :weight bold :foreground "Magenta")) "ERC face for your pals.\nSee `erc-pals'." erc-fool-face ((t :foreground "dim gray")) "ERC face for fools on the channel.\nSee `erc-fools'." erc-keyword-face ((t :weight bold :foreground "pale green")) "ERC face for your keywords.\nNote that this is the default face to use if\n`erc-keywords' does not specify another."] 6) #@162 Add an entry interactively to a list. LIST must be passed as a symbol The query happens using PROMPT. Completion is performed on the optional alist COMPLETIONS. (defalias 'erc-add-entry-to-list #[(list prompt &optional completions) "\304 \305#\306\nJ\"\203 \307\310\n\"\202 \nJBL)\207" [prompt completions entry list completing-read #[(x) "\302@ J\"?\207" [x list erc-member-ignore-case] 3] erc-member-ignore-case error "\"%s\" is already on the list"] 4 (#$ . 9986)]) #@157 Remove an entry interactively from a list. LIST must be passed as a symbol. The elements of LIST can be strings, or cons cells where the car is the string. (defalias 'erc-remove-entry-from-list #[(list prompt) "\304\305J\"\306\n \307\310$\311J\"\203 \312J\"L\202* \312\313J\"J\"L*\207" [list alist prompt entry mapcar #[(x) "<\203 \207C\207" [x] 1] completing-read nil t erc-member-ignore-case delete assoc] 5 (#$ . 10470)]) #@38 Add pal interactively to `erc-pals'. (defalias 'erc-add-pal #[nil "\300\301\302\303 #\207" [erc-add-entry-to-list erc-pals "Add pal: " erc-get-server-nickname-alist] 4 (#$ . 10918) nil]) #@41 Delete pal interactively to `erc-pals'. (defalias 'erc-delete-pal #[nil "\300\301\302\"\207" [erc-remove-entry-from-list erc-pals "Delete pal: "] 3 (#$ . 11111) nil]) #@40 Add fool interactively to `erc-fools'. (defalias 'erc-add-fool #[nil "\300\301\302\303 #\207" [erc-add-entry-to-list erc-fools "Add fool: " erc-get-server-nickname-alist] 4 (#$ . 11284) nil]) #@43 Delete fool interactively to `erc-fools'. (defalias 'erc-delete-fool #[nil "\300\301\302\"\207" [erc-remove-entry-from-list erc-fools "Delete fool: "] 3 (#$ . 11482) nil]) #@46 Add keyword interactively to `erc-keywords'. (defalias 'erc-add-keyword #[nil "\300\301\302\"\207" [erc-add-entry-to-list erc-keywords "Add keyword: "] 3 (#$ . 11660) nil]) #@49 Delete keyword interactively to `erc-keywords'. (defalias 'erc-delete-keyword #[nil "\300\301\302\"\207" [erc-remove-entry-from-list erc-keywords "Delete keyword: "] 3 (#$ . 11839) nil]) #@60 Add dangerous-host interactively to `erc-dangerous-hosts'. (defalias 'erc-add-dangerous-host #[nil "\300\301\302\"\207" [erc-add-entry-to-list erc-dangerous-hosts "Add dangerous-host: "] 3 (#$ . 12032) nil]) #@63 Delete dangerous-host interactively to `erc-dangerous-hosts'. (defalias 'erc-delete-dangerous-host #[nil "\300\301\302\"\207" [erc-remove-entry-from-list erc-dangerous-hosts "Delete dangerous-host: "] 3 (#$ . 12246) nil]) #@77 Check whether the current nickname is in MSG. NICKUSERHOST will be ignored. (defalias 'erc-match-current-nick-p #[(nickuserhost msg) "\304 p\305\216\306\n!\210\205 \307\310\311\312 !\310Q\"+\207" [#1=#:buffer #2=#:table erc-match-syntax-table msg syntax-table ((byte-code "rq\210\302 !\210)\302\207" [#1# #2# set-syntax-table] 2)) set-syntax-table string-match "\\b" regexp-quote erc-current-nick] 4 (#$ . 12474)]) #@67 Check whether NICKUSERHOST is in `erc-pals'. MSG will be ignored. (defalias 'erc-match-pal-p #[(nickuserhost msg) "\205 \302 \"\207" [nickuserhost erc-pals erc-list-match] 3 (#$ . 12901)]) #@76 Check whether NICKUSERHOST is in `erc-fools' or MSG is directed at a fool. (defalias 'erc-match-fool-p #[(nickuserhost msg) "\205 \205 \303\n \"\206 \304!\207" [msg nickuserhost erc-fools erc-list-match erc-match-directed-at-fool-p] 3 (#$ . 13099)]) #@92 Check whether any keyword of `erc-keywords' matches for MSG. NICKUSERHOST will be ignored. (defalias 'erc-match-keyword-p #[(nickuserhost msg) "\205 \302\303\304 \"\"\207" [msg erc-keywords erc-list-match mapcar #[(x) "<\203 @\207\207" [x] 1]] 4 (#$ . 13361)]) #@78 Check whether NICKUSERHOST is in `erc-dangerous-hosts'. MSG will be ignored. (defalias 'erc-match-dangerous-host-p #[(nickuserhost msg) "\205 \302 \"\207" [nickuserhost erc-dangerous-hosts erc-list-match] 3 (#$ . 13635)]) #@264 Check whether MSG is directed at a fool. In order to do this, every entry in `erc-fools' will be used. In any of the following situations, MSG is directed at an entry FOOL: - MSG starts with "FOOL: " or "FOO, " - MSG contains ", FOOL." (actually, "\s. FOOL\s.") (defalias 'erc-match-directed-at-fool-p #[(msg) "\304\305\"\304\306\"\307\n\"\206 \307 \"*\207" [erc-fools fools-end fools-beg msg mapcar #[(entry) "\301\302Q\207" [entry "^" "[:,] "] 3] #[(entry) "\301\302Q\207" [entry "\\s. " "\\s."] 3] erc-list-match] 4 (#$ . 13867)]) #@82 Mark certain keywords in a region. Use this defun with `erc-insert-modify-hook'. (defalias 'erc-match-message #[nil "eb\210\306\307\310e!\311\n!\211\205 \312!@`\f\205* \313\314\f!d\315#\205* \316\224\211\2052 \316\225\211\203H \317\\dX\203H \317\\\202I ed{\n\205k \205X \320 ?\205k \321\322\203i \323 \"\202j \". \207" [to-match-nick-dep to-match-nick-indep vector nickuserhost nickname old-pt ("pal" "fool" "dangerous-host") ("keyword" "current-nick") erc-get-parsed-vector erc-get-parsed-vector-nick erc-parse-user re-search-forward regexp-quote t 0 2 erc-server-buffer-p mapc #[(match-type) "eb\210\306P\307\310\311Q!\312\307 \313P!!\314\230\203# \315\316 !\202* \312\307 \317P!!\307 \320P!\n#$\"\205\360 \321=\203R %\203R \322&%\323 p%\210\202\335 \314\230\203\216 \324=\203\216 %\203p \322&%\323 p%\210\202\335 \325%\206w e\\b\210\326\f\327\330#\203\335 \322\331\224\331\225\323 $\210\202z \332=\203\237 \322ed\323 p%\210\202\335 \333\230\203\263 \334=\203\263 \335\336\f\"\210\202\335 \314\230\203\335 \334=\203\335 \325%\206\306 e\\b\210\326\f\327\330#\203\335 \322\331\224\331\225\323 $\210\202\311 \337\340\307!#\206\355 \341\342'!P$$-\207" [match-type match-prefix match-pred match-htype match-regex match-face "erc-" intern "erc-match-" "-p" eval "-highlight-type" "current-nick" regexp-quote erc-current-nick "s" "-face" nick erc-put-text-property face nick-or-keyword 2 re-search-forward nil t 0 all "keyword" keyword mapc #[(elt) " \211:\203 @A\305\f\206 e\\b\210\306\307\310#\205, \311\312\224\312\225\302\n$\210\202 *\207" [elt match-face face regex nick-end 2 re-search-forward nil t erc-put-text-property 0] 6] run-hook-with-args erc-text-matched-hook "Server:" erc-get-parsed-vector-type nickuserhost message nick-end nick-beg vector] 6] append nick-beg nick-end message erc-match-exclude-server-buffer] 6 (#$ . 14417)]) #@323 Log matches in a separate buffer, determined by MATCH-TYPE. The behavior of this function is controlled by the variables `erc-log-matches-types-alist' and `erc-log-matches-flag'. Specify the match types which should be logged in the former, and deactivate/activate match logging in the latter. See `erc-log-match-format'. (defalias 'erc-log-matches #[(match-type nickuserhost message) " \236A\306\n!@ \307=\204 \310=\205U \311 \205U \f\205U \312\313\314\315\316\317\320!\2032 \2063 \321!\322\323 \206; \324\325\326\n&\n\"r\327\f!q\210\307db\210c+*\207" [match-type erc-log-matches-types-alist nickuserhost nick match-buffer-name erc-log-matches-flag erc-parse-user t away erc-away-time format-spec format-spec-make 110 116 format-time-string boundp erc-timestamp-format "[%Y-%m-%d %H:%M] " 99 erc-default-target "" 109 117 erc-log-matches-make-buffer erc-log-match-format message line inhibit-read-only] 13 (#$ . 16328)]) #@62 Create or get a log-matches buffer named NAME and return it. (defalias 'erc-log-matches-make-buffer #[(name) "\303!\211\206 \304!r\nq\210 \204 \305c\210\306\307\310\"\210\n+\207" [name buffer-already buffer get-buffer get-buffer-create " == Type \"q\" to dismiss messages ==\n" erc-view-mode-enter nil #[(buffer) "\301\302!\205 \303!\207" [buffer y-or-n-p "Discard messages? " kill-buffer] 2]] 4 (#$ . 17274)]) #@56 Display a notice that messages were logged while away. (defalias 'erc-log-matches-come-back #[(proc parsed) "\302 \203 \303=\203 \304\305 \"\210\306\207" [erc-log-matches-flag erc-log-matches-types-alist erc-away-time away mapc #[(match-type) "\305A!A\211\205A \306r\nq\210\307dS\310\")!\306\311 !\211\205@ \205@ \312\f\"\205@ \313\314\315\316\317\320 \"$\210\313\314\315\316\317\321 \"$**\207" [match-type buffer-name buffer last-msg-time away-time get-buffer erc-emacs-time-to-erc-time get-text-property timestamp erc-away-time erc-time-gt erc-display-message nil notice active format "You have logged messages waiting in \"%s\"." "Type \"C-c C-k %s RET\" to view them."] 8] nil] 3 (#$ . 17699)]) (add-hook 'erc-server-305-functions 'erc-log-matches-come-back nil) #@47 Interactively open an erc-log-matches buffer. (defalias 'erc-go-to-log-matches-buffer #[nil "\302\303\304\305\"\306#\307 !)\207" [erc-log-matches-types-alist buffer-name completing-read "Switch to ERC Log buffer: " mapcar #[(x) "A\301B\207" [x t] 2] #[(buffer-cons) "\301@!\207" [buffer-cons get-buffer] 2] switch-to-buffer] 5 (#$ . 18483) nil]) (define-key erc-mode-map "" 'erc-go-to-log-matches-buffer) #@85 Hide foolish comments. This function should be called from `erc-text-matched-hook'. (defalias 'erc-hide-fools #[(match-type nickuserhost message) "\301=\205\f \302ed\303p$\207" [match-type fool erc-put-text-properties (invisible intangible)] 5 (#$ . 18900)]) #@91 Beep when text matches. This function is meant to be called from `erc-text-matched-hook'. (defalias 'erc-beep-on-match #[(match-type nickuserhost message) " \235\205 \302 \207" [match-type erc-beep-match-types beep] 2 (#$ . 19166)]) (provide 'erc-match)