[Top][All Lists]

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

Re: message's docstring

From: Juanma Barranquero
Subject: Re: message's docstring
Date: Sun, 12 Nov 2006 13:42:20 +0100

On 11/12/06, David Kastrup <address@hidden> wrote:

We should not try accommodating obvious bugs, but rather fix them.  Do
you have any instances where the return value of `message' would
actually get used without `message' being confused for `format'?

The one that prompted me to look: in server.el there are cases like

 (server-log (message "Restarting server"))

to avoid

 (message "Restarting server")
 (server-log "Restarting server")

or a `let'. Not earthshaking, but useful.

But, as I said, the intended return of the message in `message' is
*quite* intentional:

 if (NILP (args[0])
     || (STRINGP (args[0])
          && SBYTES (args[0]) == 0))
     message (0);
     return args[0];
     register Lisp_Object val;
     val = Fformat (nargs, args);
     message3 (val, SBYTES (val), STRING_MULTIBYTE (val));
     return val;

I vote for keeping it and documenting it. Is a one-line in the
docstring, and the current behavior is at least fifteen years old.


reply via email to

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