Subject: Re: bug#1305: All code that currently beeps should use visual bell instead

From: Stefan Monnier <[email-masked]>
Date: Wed, 21 Apr 2021 11:14:32 -0400

>>> I think this is a bit of a mess, indeed.
>>>
>>> I would be in favour of fixing this by adding one or more new variables
>>> with reasonable semantics.  For example, why not have a variable called
>>> `alarm-bell' with these valid values:
>>>
>>>      - a function    call this function
>>>      - `visual'      Use a visual bell
>>>      - t             Ring the bell
>>>      - nil           Do nothing
>> Agreed, except I suggest to use slightly different names: `visual` becomes
>> `ring-bell-visual`, `t` becomes `ring-bell-beep`, `nil` becomes `ignore` and
>> `alarm-bell` becomes `ring-bell-function`.
>
> And obsoleting the visible-bell variable?

And/or use

    (defun ring-bell-default ()
      (if visible-bell (ring-bell-visual) (ring-bell-beep)))

as the default value of `ring-bell-function`.

        Stefan