help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Temporarily turning message logging off


From: Davin Pearson
Subject: Temporarily turning message logging off
Date: 23 May 2007 20:56:41 -0700
User-agent: G2/1.0

I would like to temporarily undefine the function message so that
messages are temporarily turned off.  Here is some Elisp code that I
have written to achieve this:


;;;
;;; (progn (message "hello") (sit-for 1))
;;;

(defun my-message--turn-messages-off ()
  (progn
    (fset 'message-old (symbol-function 'message))
    (defun message (string &rest arguments)
      ))
  )

(defun my-message--turn-messages-on ()
  (progn
    (fset 'message (symbol-function 'message-old)))
 )

Unfortunately it does not appear to work.  For example
when you save a file with messages turned off, it still
generates the message "Wrote <filename>"

What do I have to do to turn message logging off?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]