jabber: Fix missing optional argument for the alert jabber-alert-echo function.

Jabber alert function should accept an optional second argument containing a
title of the message. The function mimic the default implementation of
jabber-alert-echo by showing the title if it is present and a message body
otherwise.

This commit fixes an error which is thrown when jabber receives a new notification:
(wrong-number-of-arguments (lambda (msg) (if (minibuffer-prompt) nil (message "%s" msg))) 2)
This commit is contained in:
Aleksei Fedotov 2018-03-20 12:57:08 +01:00 committed by Codruț Constantin Gușoi
parent e1ae3448e6
commit e421377861
1 changed files with 2 additions and 2 deletions

View File

@ -15,6 +15,6 @@
;; Disable the minibuffer getting jabber messages when active
;; See http://www.emacswiki.org/JabberEl
(define-jabber-alert echo "Show a message in the echo area"
(lambda (msg)
(lambda (msg &optional title)
(unless (minibuffer-prompt)
(message "%s" msg)))))
(message "%s" (or title msg))))))