From e421377861d45f33f7693b9cb544a1a198aaaa1c Mon Sep 17 00:00:00 2001 From: Aleksei Fedotov Date: Tue, 20 Mar 2018 12:57:08 +0100 Subject: [PATCH] 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) --- layers/+chat/jabber/funcs.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layers/+chat/jabber/funcs.el b/layers/+chat/jabber/funcs.el index 576e4e18e..131ff3fdd 100644 --- a/layers/+chat/jabber/funcs.el +++ b/layers/+chat/jabber/funcs.el @@ -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))))))