From ae25e15d610b9c7daf03bd66acd49bdd03e82c19 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@telfort.nl>
Date: Sat, 2 Sep 2017 15:31:02 +0200
Subject: [PATCH] startup: don't produce more than three consecutive beeps

This fixes https://savannah.gnu.org/bugs/?51918.
---
 src/winio.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/winio.c b/src/winio.c
index 76cc4cc8..0a27f8d6 100644
--- a/src/winio.c
+++ b/src/winio.c
@@ -2159,7 +2159,8 @@ void statusline(message_type importance, const char *msg, ...)
     if (importance == ALERT) {
 	if (++alerts > 3 && !ISSET(NO_PAUSES))
 	    msg = _("Further warnings were suppressed");
-	beep();
+	else if (alerts < 4)
+	    beep();
     }
 
     lastmessage = importance;
-- 
GitLab