;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%\210\311\312\313\314\315\316\317\320\307\304& \207" [require jabber-util cl custom-declare-group jabber-alerts nil "auditory and visual alerts for jabber events" :group jabber custom-declare-variable jabber-alert-message-hooks '(jabber-message-echo jabber-message-scroll) "Hooks run when a new message arrives.\n\nArguments are FROM, BUFFER, TEXT and TITLE. FROM is the JID of\nthe sender, BUFFER is the the buffer where the message can be\nread, and TEXT is the text of the message. TITLE is the string\nreturned by `jabber-alert-message-function' for these arguments,\nso that hooks do not have to call it themselves.\n\nThis hook is meant for user customization of message alerts. For\nother uses, see `jabber-message-hooks'." :type hook :options (jabber-message-beep jabber-message-wave jabber-message-echo jabber-message-switch jabber-message-display jabber-message-scroll)] 10) #@162 Internal hooks run when a new message arrives. This hook works just like `jabber-alert-message-hooks', except that it's not meant to be customized by the user. (defvar jabber-message-hooks nil (#$ . 1038)) (byte-code "\300\301\302\303\304\305\306\307&\210\300\310\311\312\304\313\314\315\306\307& \207" [custom-declare-variable jabber-alert-message-function 'jabber-message-default-message "Function for constructing short message alert messages.\n\nArguments are FROM, BUFFER, and TEXT. This function should return a\nstring containing an appropriate text message, or nil if no message\nshould be displayed.\n\nThe provided hooks displaying a text message get it from this function,\nand show no message if it returns nil. Other hooks do what they do\nevery time." :type function :group jabber-alerts jabber-alert-muc-hooks '(jabber-muc-echo jabber-muc-scroll) "Hooks run when a new MUC message arrives.\n\nArguments are NICK, GROUP, BUFFER, TEXT and TITLE. NICK is the\nnickname of the sender. GROUP is the JID of the group. BUFFER\nis the the buffer where the message can be read, and TEXT is the\ntext of the message. TITLE is the string returned by\n`jabber-alert-muc-function' for these arguments, so that hooks do\nnot have to call it themselves." hook :options (jabber-muc-beep jabber-muc-wave jabber-muc-echo jabber-muc-switch jabber-muc-display jabber-muc-scroll)] 10) #@162 Internal hooks run when a new MUC message arrives. This hook works just like `jabber-alert-muc-hooks', except that it's not meant to be customized by the user. (defvar jabber-muc-hooks nil (#$ . 2432)) (byte-code "\300\301\302\303\304\305\306\307&\210\300\310\311\312\304\313\314\315\306\307& \207" [custom-declare-variable jabber-alert-muc-function 'jabber-muc-default-message "Function for constructing short message alert messages.\n\nArguments are NICK, GROUP, BUFFER, and TEXT. This function\nshould return a string containing an appropriate text message, or\nnil if no message should be displayed.\n\nThe provided hooks displaying a text message get it from this function,\nand show no message if it returns nil. Other hooks do what they do\nevery time." :type function :group jabber-alerts jabber-alert-presence-hooks '(jabber-presence-echo) "Hooks run when a user's presence changes.\n\nArguments are WHO, OLDSTATUS, NEWSTATUS, STATUSTEXT and\nPROPOSED-ALERT. WHO is a symbol whose text is the JID of the contact,\nand which has various interesting properties. OLDSTATUS is the old\npresence or nil if disconnected. NEWSTATUS is the new presence, or\none of \"subscribe\", \"unsubscribe\", \"subscribed\" and\n\"unsubscribed\". TITLE is the string returned by\n`jabber-alert-presence-message-function' for these arguments." hook :options (jabber-presence-beep jabber-presence-wave jabber-presence-switch jabber-presence-display jabber-presence-echo)] 10) #@167 Internal hooks run when a user's presence changes. This hook works just like `jabber-alert-presence-hooks', except that it's not meant to be customized by the user. (defvar jabber-presence-hooks '(jabber-presence-watch) (#$ . 3910)) (byte-code "\300\301\302\303\304\305\306\307&\210\300\310\311\312\304\313\314\315\306\307& \207" [custom-declare-variable jabber-alert-presence-message-function 'jabber-presence-default-message "Function for constructing title of presence alert messages.\n\nArguments are WHO, OLDSTATUS, NEWSTATUS and STATUSTEXT. See\n`jabber-alert-presence-hooks' for documentation. This function\nshould return a string containing an appropriate text message, or nil\nif no message should be displayed.\n\nThe provided hooks displaying a text message get it from this function.\nAll hooks refrain from action if this function returns nil." :type function :group jabber-alerts jabber-alert-info-message-hooks '(jabber-info-display jabber-info-echo) "Hooks run when an info request is completed.\n\nFirst argument is WHAT, a symbol telling the kind of info request completed.\nThat might be 'roster, for requested roster updates, and 'browse, for\nbrowse requests. Second argument in BUFFER, a buffer containing the result.\nThird argument is PROPOSED-ALERT, containing the string returned by\n`jabber-alert-info-message-function' for these arguments." hook :options (jabber-info-beep jabber-info-wave jabber-info-echo jabber-info-switch jabber-info-display)] 10) #@174 Internal hooks run when an info request is completed. This hook works just like `jabber-alert-info-message-hooks', except that it's not meant to be customized by the user. (defvar jabber-info-message-hooks nil (#$ . 5402)) (byte-code "\300\301\302\303\304\305\306\307&\210\300\310\311\312\304\313\306\307&\210\300\314\315\316\304\317\306\307&\210\300\320\321\322\304\323\306\307&\210\300\324\315\325\304\317\306\307&\210\300\326\315\327\304\317\306\307&\210\300\330\321\331\304\332\306\307&\210\300\333\315\334\304\317\306\307&\210\300\335\336\337\304\305\306\307&\207" [custom-declare-variable jabber-alert-info-message-function 'jabber-info-default-message "Function for constructing info alert messages.\n\nArguments are WHAT, a symbol telling the kind of info request completed,\nand BUFFER, a buffer containing the result." :type function :group jabber-alerts jabber-info-message-alist '((roster . "Roster display updated") (browse . "Browse request completed")) "Alist for info alert messages, used by `jabber-info-default-message'." (alist :key-type symbol :value-type string :options (roster browse)) jabber-alert-message-wave "" "A sound file to play when a message arrived.\nSee `jabber-alert-message-wave-alist' if you want other sounds\nfor specific contacts." file jabber-alert-message-wave-alist nil "Specific sound files for messages from specific contacts.\nThe keys are regexps matching the JID, and the values are sound\nfiles." (alist :key-type regexp :value-type file) jabber-alert-muc-wave "a sound file to play when a MUC message arrived" jabber-alert-presence-wave "a sound file to play when a presence arrived" jabber-alert-presence-wave-alist "Specific sound files for presence from specific contacts.\nThe keys are regexps matching the JID, and the values are sound\nfiles." (alist :key-type regexp :value-type file) jabber-alert-info-wave "a sound file to play when an info query result arrived" jabber-play-sound-file 'play-sound-file "a function to call to play alert sound files"] 8) #@762 Define a new family of external alert hooks. Use this macro when your hooks do nothing except displaying a string in some new innovative way. You write a string display function, and this macro does all the boring and repetitive work. NAME is the name of the alert family. The resulting hooks will be called jabber-{message,muc,presence,info}-NAME. DOCSTRING is the docstring to use for those hooks. FUNCTION is a function that takes one argument, a string, and displays it in some meaningful way. It can be either a lambda form or a quoted function name. The created functions are inserted as options in Customize. Examples: (define-jabber-alert foo "Send foo alert" 'foo-message) (define-jabber-alert bar "Send bar alert" (lambda (msg) (bar msg 42))) (defalias 'define-jabber-alert '(macro . #[(name docstring function) "\306!\307\310\311 \"!\307\310\312 \"!\307\310\313 \"!\307\310\314 \"!\315\316 \317!\320\321\322\"\323BBE\257\324\325 D\326BB\316\f\327!\320\321\322\"\330BBE\257\324\325\fD\331BB\316 \332!\320\321\322\"\333BBE\257\324\325 D\334BB\316\n\335!\320\336\322\"\337BBE\257\324\325\nD\340BB\257 -\207" [name sn info pres muc msg symbol-name intern format "jabber-message-%s" "jabber-muc-%s" "jabber-presence-%s" "jabber-info-%s" progn defun (from buffer text title) when title funcall (text title) pushnew quote ((get 'jabber-alert-message-hooks 'custom-options)) (nick group buffer text title) (text title) ((get 'jabber-alert-muc-hooks 'custom-options)) (who oldstatus newstatus statustext title) (statustext title) ((get 'jabber-alert-presence-hooks 'custom-options)) (infotype buffer text) text (text) ((get 'jabber-alert-info-message-hooks 'custom-options)) docstring function] 16 (#$ . 7433)])) #@33 Show a message in the echo area (defalias 'jabber-message-echo #[(from buffer text title) "\205 \302\303\206 \"*\207" [title text message "%s"] 3 (#$ . 9180)]) (byte-code "\301\302\303\302\303N\304>\203\202\304B)#\207" [#:vlist put jabber-alert-message-hooks custom-options jabber-message-echo] 5) #@33 Show a message in the echo area (defalias 'jabber-muc-echo #[(nick group buffer text title) "\205 \302\303\206 \"*\207" [title text message "%s"] 3 (#$ . 9501)]) (byte-code "\301\302\303\302\303N\304>\203\202\304B)#\207" [#:vlist put jabber-alert-muc-hooks custom-options jabber-muc-echo] 5) #@33 Show a message in the echo area (defalias 'jabber-presence-echo #[(who oldstatus newstatus statustext title) "\205 \303\304\206\n\"*\207" [title statustext text message "%s"] 3 (#$ . 9816)]) (byte-code "\301\302\303\302\303N\304>\203\202\304B)#\207" [#:vlist put jabber-alert-presence-hooks custom-options jabber-presence-echo] 5) #@33 Show a message in the echo area (defalias 'jabber-info-echo #[(infotype buffer text) "\205\302\303\304 \206\"*\207" [text title nil message "%s"] 3 (#$ . 10170)]) (byte-code "\301\302\303\302\303N\304>\203\202\304B)#\207" [#:vlist put jabber-alert-info-message-hooks custom-options jabber-info-echo] 5) #@15 Beep on event (defalias 'jabber-message-beep #[(from buffer text title) "\205 D\303 )\207" [title text ignore beep] 2 (#$ . 10496)]) (byte-code "\301\302\303\302\303N\304>\203\202\304B)#\207" [#:vlist put jabber-alert-message-hooks custom-options jabber-message-beep] 5) #@15 Beep on event (defalias 'jabber-muc-beep #[(nick group buffer text title) "\205 D\303 )\207" [title text ignore beep] 2 (#$ . 10786)]) (byte-code "\301\302\303\302\303N\304>\203\202\304B)#\207" [#:vlist put jabber-alert-muc-hooks custom-options jabber-muc-beep] 5) #@15 Beep on event (defalias 'jabber-presence-beep #[(who oldstatus newstatus statustext title) "\205 D\303 )\207" [title statustext ignore beep] 2 (#$ . 11070)]) (byte-code "\301\302\303\302\303N\304>\203\202\304B)#\207" [#:vlist put jabber-alert-presence-hooks custom-options jabber-presence-beep] 5) #@15 Beep on event (defalias 'jabber-info-beep #[(infotype buffer text) "\205\nC\302 )\207" [text ignore beep] 1 (#$ . 11387)]) (byte-code "\301\302\303\302\303N\304>\203\202\304B)#\207" [#:vlist put jabber-alert-info-message-hooks custom-options jabber-info-beep] 5) (defalias 'jabber-message-default-message #[(from buffer text) "\204\303 \304 !>?\205&\305\n!\203 \306\307\310\n!\311\312\n!!#\207\306\313\311\n!\"\207" [jabber-message-alert-same-buffer buffer from selected-window get-buffer-window-list jabber-muc-sender-p format "Private message from %s in %s" jabber-jid-resource jabber-jid-displayname jabber-jid-user "Message from %s"] 6]) (byte-code "\300\301\302\303\304\305\306\307&\210\300\310\311\312\304\305\306\307&\207" [custom-declare-variable jabber-message-alert-same-buffer t "If nil, don't display message alerts for the current buffer." :type boolean :group jabber-alerts jabber-muc-alert-self nil "If nil, don't display MUC alerts for your own messages."] 8) #@61 Play the wave file specified in `jabber-alert-message-wave' (defalias 'jabber-message-wave #[(from buffer text title) "\205I\306\307\n!\31025\f\311\211 \2053 @\312 @ \"\203)\313\310 A\"\210 A\211 \204\311*0\206:\211\314\232?\205H!+\207" [title case-fold-search from bare-jid jabber-alert-message-wave-alist entry t jabber-jid-user --cl-block-nil-- nil string-match throw "" --dolist-tail-- jabber-alert-message-wave sound-file jabber-play-sound-file] 4 (#$ . 12388)]) #@53 Display the buffer where a new message has arrived. (defalias 'jabber-message-display #[(from buffer text title) "\205\302 !\207" [title buffer display-buffer] 2 (#$ . 12887)]) #@55 Switch to the buffer where a new message has arrived. (defalias 'jabber-message-switch #[(from buffer text title) "\205\302 !\207" [title buffer switch-to-buffer] 2 (#$ . 13073)]) #@68 Scroll all nonselected windows where the chat buffer is displayed. (defalias 'jabber-message-scroll #[(from buffer text title) "\305\306\307#rq\210d)\211\306\211\205,\f@\211\310 =\204$\311 \"\210\fA\211\204\306,\207" [buffer new-point-max windows w --dolist-tail-- get-buffer-window-list nil t selected-window set-window-point] 5 (#$ . 13262)]) (defalias 'jabber-muc-default-message #[(nick group buffer text) "\204\306 \307 !>?\205/\n\203) \204!\n\310\f \"A\230?\205/\311\312\n\313\f!#\207\311\314\313\f!\"\207" [jabber-message-alert-same-buffer buffer nick jabber-muc-alert-self group *jabber-active-groupchats* selected-window get-buffer-window-list assoc format "Message from %s in %s" jabber-jid-displayname "Message in %s"] 5]) #@57 Play the wave file specified in `jabber-alert-muc-wave' (defalias 'jabber-muc-wave #[(nick group buffer text title) "\205 \n!\207" [title jabber-play-sound-file jabber-alert-muc-wave] 2 (#$ . 14022)]) #@53 Display the buffer where a new message has arrived. (defalias 'jabber-muc-display #[(nick group buffer text title) "\205\302 !\207" [title buffer display-buffer] 2 (#$ . 14232)]) #@55 Switch to the buffer where a new message has arrived. (defalias 'jabber-muc-switch #[(nick group buffer text title) "\205\302 !\207" [title buffer switch-to-buffer] 2 (#$ . 14420)]) #@54 Scroll buffer even if it is in an unselected window. (defalias 'jabber-muc-scroll #[(nick group buffer text title) "\301\302\302\211$\207" [buffer jabber-message-scroll nil] 5 (#$ . 14611)]) #@255 This function returns nil if OLDSTATUS and NEWSTATUS are equal, and in other cases a string of the form "'name' (jid) is now NEWSTATUS (STATUSTEXT)". This function is not called directly, but is the default for `jabber-alert-presence-message-function'. (defalias 'jabber-presence-default-message #[(who oldstatus newstatus statustext) " \232\203\306\207\n\307NG\310V\203\n\307N\202\311\n!\312 \313\"A\206-\314\312 \"A\206, P\211\fP*\207" [oldstatus newstatus who jabber-presence-strings formattedstatus formattedname nil name 0 symbol-name assoc (("subscribe" . " requests subscription to your presence") ("subscribed" . " has granted presence subscription to you") ("unsubscribe" . " no longer subscribes to your presence") ("unsubscribed" . " cancels your presence subscription")) " is now "] 6 (#$ . 14810)]) #@331 This function returns the same as `jabber-presence-default-message' but only if there is a chat buffer open for WHO, keeping the amount of presence messages at a more manageable level when there are lots of users. This function is not called directly, but can be used as the value for `jabber-alert-presence-message-function'. (defalias 'jabber-presence-only-chat-open-message #[(who oldstatus newstatus statustext) "\306\307\310\211:\205\311\n \"*!!\205\312 \f  $\207" [xml-data attribute node who oldstatus newstatus get-buffer jabber-chat-get-buffer from xml-get-attribute-or-nil jabber-presence-default-message statustext] 6 (#$ . 15642)]) #@62 Play the wave file specified in `jabber-alert-presence-wave' (defalias 'jabber-presence-wave #[(who oldstatus newstatus statustext proposed-alert) "\205I\306\307\n!\31025\f\311\211 \2053 @\312 @ \"\203)\313\310 A\"\210 A\211 \204\311*0\206:\211\314\232?\205H!+\207" [proposed-alert case-fold-search who bare-jid jabber-alert-presence-wave-alist entry t symbol-name --cl-block-nil-- nil string-match throw "" --dolist-tail-- jabber-alert-presence-wave sound-file jabber-play-sound-file] 4 (#$ . 16303)]) #@27 Display the roster buffer (defalias 'jabber-presence-display #[(who oldstatus newstatus statustext proposed-alert) "\205\302 !\207" [proposed-alert jabber-roster-buffer display-buffer] 2 (#$ . 16837)]) #@29 Switch to the roster buffer (defalias 'jabber-presence-switch #[(who oldstatus newstatus statustext proposed-alert) "\205\302 !\207" [proposed-alert jabber-roster-buffer switch-to-buffer] 2 (#$ . 17048)]) #@194 Function for constructing info alert messages. The argument is INFOTYPE, a symbol telling the kind of info request completed. This function uses `jabber-info-message-alist' to find a message. (defalias 'jabber-info-default-message #[(infotype buffer) " \236A\303\304\n!\305R\207" [infotype jabber-info-message-alist buffer " (buffer " buffer-name ")"] 4 (#$ . 17263)]) #@58 Play the wave file specified in `jabber-alert-info-wave' (defalias 'jabber-info-wave #[(infotype buffer proposed-alert) "\205 \n!\207" [proposed-alert jabber-play-sound-file jabber-alert-info-wave] 2 (#$ . 17640)]) #@37 Display buffer of completed request (defalias 'jabber-info-display #[(infotype buffer proposed-alert) "\205\302 !\207" [proposed-alert buffer display-buffer] 2 (#$ . 17864)]) #@39 Switch to buffer of completed request (defalias 'jabber-info-switch #[(infotype buffer proposed-alert) "\205\302 !\207" [proposed-alert buffer switch-to-buffer] 2 (#$ . 18048)]) #@78 From ALERT function, make ALERT-personal function. Makes sence only for MUC. (defalias 'define-personal-jabber-alert '(macro . #[(name) "\303!\304\305\306 \"!\307\310\n\311\312\313\314BEF\315\316\nD\317BBE*\207" [name sn func symbol-name intern format "%s-personal" progn defun (nick group buffer text title) if (jabber-muc-looks-like-personal-p text group) (nick group buffer text title) pushnew quote ((get 'jabber-alert-muc-hooks 'custom-options))] 8 (#$ . 18235)])) (defalias 'jabber-muc-beep-personal #[(nick group buffer text title) "\305 \"\205\306\n \f%\207" [text group nick buffer title jabber-muc-looks-like-personal-p jabber-muc-beep] 6]) (byte-code "\301\302\303\302\303N\304>\203\202\304B)#\207" [#:vlist put jabber-alert-muc-hooks custom-options jabber-muc-beep-personal] 5) (defalias 'jabber-muc-wave-personal #[(nick group buffer text title) "\305 \"\205\306\n \f%\207" [text group nick buffer title jabber-muc-looks-like-personal-p jabber-muc-wave] 6]) (byte-code "\301\302\303\302\303N\304>\203\202\304B)#\207" [#:vlist put jabber-alert-muc-hooks custom-options jabber-muc-wave-personal] 5) (defalias 'jabber-muc-echo-personal #[(nick group buffer text title) "\305 \"\205\306\n \f%\207" [text group nick buffer title jabber-muc-looks-like-personal-p jabber-muc-echo] 6]) (byte-code "\301\302\303\302\303N\304>\203\202\304B)#\207" [#:vlist put jabber-alert-muc-hooks custom-options jabber-muc-echo-personal] 5) (defalias 'jabber-muc-switch-personal #[(nick group buffer text title) "\305 \"\205\306\n \f%\207" [text group nick buffer title jabber-muc-looks-like-personal-p jabber-muc-switch] 6]) (byte-code "\301\302\303\302\303N\304>\203\202\304B)#\207" [#:vlist put jabber-alert-muc-hooks custom-options jabber-muc-switch-personal] 5) (defalias 'jabber-muc-display-personal #[(nick group buffer text title) "\305 \"\205\306\n \f%\207" [text group nick buffer title jabber-muc-looks-like-personal-p jabber-muc-display] 6]) (byte-code "\301\302\303\302\303N\304>\203\202\304B)#\210\305\306\307\310\311\312\313\314&\207" [#:vlist put jabber-alert-muc-hooks custom-options jabber-muc-display-personal custom-declare-variable jabber-autoanswer-alist nil "Specific phrases to autoanswer on specific message.\nThe keys are regexps matching the incoming message text, and the values are\nautoanswer phrase." :type (alist :key-type regexp :value-type string) :group jabber-alerts] 8) #@91 Answer automaticaly when incoming text matches first element of `jabber-autoanswer-alist' (defalias 'jabber-autoanswer-answer #[(from buffer text proposed-alert) "\205L \205L\n\205L \205L\f\205L\3062?\f\307\211 \205= @\310 @\n\"\2033\311\306 A\"\210 A\211 \204!\307*0\211\f\205K\312 \f\")\207" [from buffer text proposed-alert jabber-autoanswer-alist entry --cl-block-nil-- nil string-match throw jabber-chat-send --dolist-tail-- message jabber-buffer-connection] 4 (#$ . 20707)]) (byte-code "\301\302\303\302\303N\304>\203\202\304B)#\207" [#:vlist put jabber-alert-message-hooks custom-options jabber-autoanswer-answer] 5) #@91 Answer automaticaly when incoming text matches first element of `jabber-autoanswer-alist' (defalias 'jabber-autoanswer-answer-muc #[(nick group buffer text proposed-alert) "\205T \205T\n\205T \205T\f\205T \205T\3062G \307 \211\f\205E\f@ \310 @ \"\203;\311\306 A\"\210\fA\211\f\204&\307*0\211 \205S\312 \")\207" [nick group buffer text proposed-alert jabber-autoanswer-alist --cl-block-nil-- nil string-match throw jabber-chat-send entry --dolist-tail-- message jabber-buffer-connection] 4 (#$ . 21365)]) (byte-code "\301\302\303\302\303N\304>\203\202\304B)#\210\305\306!\207" [#:vlist put jabber-alert-muc-hooks custom-options jabber-autoanswer-answer-muc provide jabber-alert] 5)