Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!cs.utexas.edu!milano!titan!janssen
From: janssen@titan.SW.MCC.COM (Bill Janssen)
Newsgroups: comp.emacs
Subject: Re: Playing with the minibuffer
Summary: redo of earlier redo of "message"
Message-ID: <805@titan.SW.MCC.COM>
Date: 22 Jun 88 01:49:27 GMT
References: <8806201232.AA03336@marvin.cme.nbs.gov> <367.582840018@pebbles> <801@titan.SW.MCC.COM>
Organization: MCC Software Technology
Lines: 34

The earlier function should have taken account of the fact that
"message" can be called with multiple args.  So:

  (setq old-message-function (symbol-function 'message))

  (defvar *message-list* nil)

  (defun message (string &rest args)
    (setq *message-list* (cons (apply 'format string args) *message-list*))
    (apply 'old-message-function string args))

  (defun view-messages ()

    "Show all the messages that have been displayed in the minibuffer."

    (interactive)
    (let ((b (get-buffer-create "*Messages*"))
	  )
      (set-buffer b)
      (erase-buffer)
      (mapcar '(lambda (string)
		 (goto-char (point-max))
		 (insert string "\n")
		 )
	      *message-list*)
      (display-buffer b)
      ))


The problem here is that this doesn't get the error messages, which are
output by another thing altogther, in keyboard.c, "cmd_error()", a C
function.

Bill