all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Thien-Thi Nguyen <ttn@glug.org>
Subject: Re: How to suppress messages?
Date: Fri, 28 Jan 2005 00:45:59 +0100	[thread overview]
Message-ID: <7e8y6e4ers.fsf@ada2.unipv.it> (raw)
In-Reply-To: mailman.15770.1106861744.27204.help-gnu-emacs@gnu.org

John Paul Wallington <jpw@gnu.org>:

> 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)

  parent reply	other threads:[~2005-01-27 23:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-26 23:25 How to suppress messages? Drew Adams
2005-01-27  0:33 ` Edward O'Connor
2005-01-27  1:03   ` Drew Adams
2005-01-27  5:15 ` Eli Zaretskii
2005-01-27 17:24   ` Drew Adams
2005-01-27 20:50     ` John Paul Wallington
2005-01-27 21:10       ` Drew Adams
2005-01-27 23:18         ` T. V. Raman
     [not found]     ` <mailman.15770.1106861744.27204.help-gnu-emacs@gnu.org>
2005-01-27 23:45       ` Thien-Thi Nguyen [this message]
     [not found] <mailman.15741.1106847668.27204.help-gnu-emacs@gnu.org>
2005-01-28  7:43 ` Tom Capey
2005-01-28  8:20   ` Tom Capey
2005-01-28 15:06   ` Drew Adams
2005-01-28 18:56     ` Joe Corneli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7e8y6e4ers.fsf@ada2.unipv.it \
    --to=ttn@glug.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.