|
From: | Deniz Dogan |
Subject: | Re: [Emacs-diffs] /srv/bzr/emacs/trunk r104642: * src/process.c (Fset_process_buffer): Clarify return value in docstring. |
Date: | Tue, 21 Jun 2011 22:17:21 +0200 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 |
On 2011-06-21 18:33, Stefan Monnier wrote:
What about `display-buffer'? It certainly exists for its side effect, but it returns the window, a fact which is both documented and used. If it were a new function, would you oppose doing so?No, I do not systematically oppose side-effecting functions which return a value as well. That would be much too drastic (e.g. how would you figure out which window was used by `display-buffer'?). I;.e. the return value is really indispensable. Contrast this with set-process-buffer whose return value is always available to the caller before even calling it.
I'm just wondering: can I rely on `set-process-buffer' always returning the buffer from now on or is it prone to change given the fact that it is "accidental"?
Thanks, Deniz
[Prev in Thread] | Current Thread | [Next in Thread] |