From xemacs-m  Sat Jan 18 20:18:05 1997
Received: from jagor.srce.hr (hniksic@jagor.srce.hr [161.53.2.130])
          by xemacs.org (8.8.4/8.8.4) with ESMTP
	  id UAA08631 for <xemacs-beta@xemacs.org>; Sat, 18 Jan 1997 20:18:04 -0600 (CST)
Received: (from hniksic@localhost)
          by jagor.srce.hr (8.8.4/8.8.4)
	  id DAA24884; Sun, 19 Jan 1997 03:17:57 +0100 (MET)
Sender: hniksic@public.srce.hr
To: xemacs-beta@xemacs.org
Subject: bell-volume on tty-s
X-URL: ftp://gnjilux.cc.fer.hr/pub/unix/util/wget/
X-Attribution: Hrv
X-Face: &}4JQk=L;e.~x+|eo]#DGk@x3~ed!.~lZ}YQcYb7f[WL9L'Z*+OyA\nAEL1M(".[qvI#a2E
 6WYI5>>e7'@_)3Ol9p|Nn2wNa/;~06jL*B%tTcn/XvhAu7qeES0\|MF%$;sI#yn1+y"
From: Hrvoje Niksic <hniksic@srce.hr>
Date: 19 Jan 1997 03:17:51 +0100
Message-ID: <kig7mlapfw0.fsf@jagor.srce.hr>
Lines: 45
X-Mailer: Red Gnus v0.82/XEmacs 19.14

Making XEmacs silent on tty-s is a non-trivial operation, according to
my experience.  Setting 'bell-volume to 0 doesn't work, as it is
ignored on tty-s.  Redefining 'ding to nothing is bad since 'ding also
terminates keyboard macros.  Setting 'visible-bell to t is annoying,
as it turns on the flashing.

This little patch makes XEmacs not beep on a tty, if bell-volume is
0.  I find it quite intuitive to be able to `(setq bell-volume 0)' to
silence XEmacs.

The patch is for 19.15, but should be applicable to 20.0 too.

*** redisplay-tty.c.old Sun Jan 19 03:08:48 1997
--- redisplay-tty.c     Sun Jan 19 03:10:21 1997
***************
*** 1067,1074 ****
  {
    struct console *c = XCONSOLE (DEVICE_CONSOLE (d));
  
!   OUTPUT1 (c, TTY_SD (c).audio_bell);
!   Lstream_flush (XLSTREAM (CONSOLE_TTY_DATA (c)->outstream));
  }
  
  
--- 1067,1077 ----
  {
    struct console *c = XCONSOLE (DEVICE_CONSOLE (d));
  
!   if (volume)
!     {
!       OUTPUT1 (c, TTY_SD (c).audio_bell);
!       Lstream_flush (XLSTREAM (CONSOLE_TTY_DATA (c)->outstream));
!     }
  }
  
  
P.S.
If this problem can be solved without changing the C code, let me
know.  I think this is a good solution to the problem.

-- 
Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
"Beware of bugs in the above code; I have only proved it correct,
not tried it."                                    -- Donald Knuth

