From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.emacs.help Subject: Re: How to suppress messages? Date: Fri, 28 Jan 2005 00:45:59 +0100 Organization: sometimes Message-ID: <7e8y6e4ers.fsf@ada2.unipv.it> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1106869974 14864 80.91.229.6 (27 Jan 2005 23:52:54 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 27 Jan 2005 23:52:54 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jan 28 00:52:45 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CuJRN-0005Kb-00 for ; Fri, 28 Jan 2005 00:52:45 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CuJdl-0001mt-9p for geh-help-gnu-emacs@m.gmane.org; Thu, 27 Jan 2005 19:05:33 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!npeer.de.kpn-eurorings.net!uio.no!quimby.gnus.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 79 Original-NNTP-Posting-Host: ada2.unipv.it Original-X-Trace: quimby.gnus.org 1106869558 3500 193.204.44.145 (27 Jan 2005 23:45:58 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: Thu, 27 Jan 2005 23:45:58 +0000 (UTC) User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:hXxWPMgJyv6a69E7JoqQX68U2VY= Original-Xref: shelby.stanford.edu gnu.emacs.help:128215 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:23717 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:23717 John Paul Wallington : > Not recommended [...] while we're unrecommending things, below is some more unrecommended (five-minute sketch, incomplete, not exactly pretty result) stuff... thi ____________________________________ cvs diff editfns.c xdisp.c Index: editfns.c =================================================================== RCS file: /cvsroot/emacs/emacs/src/editfns.c,v retrieving revision 1.389 diff -w -b -B -u -r1.389 editfns.c --- editfns.c 21 Jan 2005 00:32:36 -0000 1.389 +++ editfns.c 27 Jan 2005 23:38:58 -0000 @@ -3114,6 +3114,8 @@ /* Allocated length of that buffer. */ static int message_length; +Lisp_Object Vmessage_stfu_dammit; + DEFUN ("message", Fmessage, Smessage, 1, MANY, 0, doc: /* Print a one-line message at the bottom of the screen. The message also goes into the `*Messages*' buffer. @@ -3125,11 +3127,16 @@ If the first argument is nil, the function clears any existing message; this lets the minibuffer contents show. See also `current-message'. +TTN curmudgeon hack: Non-nil `message-stfu-dammit' inhibits everything. + usage: (message STRING &rest ARGS) */) (nargs, args) int nargs; Lisp_Object *args; { + if (! NILP (Vmessage_stfu_dammit)) + return Qnil; + if (NILP (args[0]) || (STRINGP (args[0]) && SBYTES (args[0]) == 0)) @@ -4271,6 +4278,10 @@ { environbuf = 0; + DEFVAR_LISP ("message-stfu-dammit", &Vmessage_stfu_dammit, + doc: /* Non-nil makes `message' a no-op. */); + Vmessage_stfu_dammit = Qnil; + Qbuffer_access_fontify_functions = intern ("buffer-access-fontify-functions"); staticpro (&Qbuffer_access_fontify_functions); Index: xdisp.c =================================================================== RCS file: /cvsroot/emacs/emacs/src/xdisp.c,v retrieving revision 1.974 diff -w -b -B -u -r1.974 xdisp.c --- xdisp.c 27 Jan 2005 22:33:52 -0000 1.974 +++ xdisp.c 27 Jan 2005 23:39:04 -0000 @@ -7045,6 +7045,14 @@ char *m; EMACS_INT a1, a2, a3; { + /* TTN curmudgeon hack (same as for `Fmessage'): + Non-nil `message-stfu-dammit' inhibits everything. */ + extern Lisp_Object Vmessage_stfu_dammit; + + if (! NILP (Vmessage_stfu_dammit)) + return; + /* We now return you to your regularly spewful Emacs... */ + if (noninteractive) { if (m)