unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Deniz Dogan <deniz@dogan.se>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
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 18:00:13 +0200	[thread overview]
Message-ID: <4E00C00D.4030904@dogan.se> (raw)
In-Reply-To: <jwvliwwk2cl.fsf-monnier+emacs@gnu.org>

On 2011-06-20 16:26, Stefan Monnier wrote:
>> -       doc: /* Set buffer associated with PROCESS to BUFFER (a buffer, or nil).  */)
>> +       doc: /* Set buffer associated with PROCESS to BUFFER (a buffer, or nil).
>> +Return BUFFER.  */)
>
> Actually, I generally prefer not to document the accidental return value
> of side-effecting functions.  It's poor style anyway to use that return
> value, in my book.
>

I don't mind at all should you revert the change, I just figured it 
could be useful for others to know.

For what it's worth, here's the code where I use the return value (not 
in GNU Emacs):

(defun dirc-setup-server-buffer (process)
   "Set up the server buffer for PROCESS."
   (let ((buffer (set-process-buffer
                  process
                  (pop-to-buffer-same-window
                   (dirc-make-process-buffer-name process)))))
     (with-current-buffer buffer
       (set (make-local-variable 'dirc-buffer-type) 'server)
       (set (make-local-variable 'dirc-process process)))))

/Deniz



      parent reply	other threads:[~2011-06-21 16:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1QYeLs-00050O-9O@colonialone.fsf.org>
2011-06-20 14:26 ` [Emacs-diffs] /srv/bzr/emacs/trunk r104642: * src/process.c (Fset_process_buffer): Clarify return value in docstring Stefan Monnier
2011-06-20 16:16   ` Juanma Barranquero
2011-06-20 17:53     ` Stefan Monnier
2011-06-20 19:53       ` Juanma Barranquero
2011-06-21 14:13         ` Stefan Monnier
2011-06-21 14:30           ` Juanma Barranquero
2011-06-21 16:33             ` Stefan Monnier
2011-06-21 16:39               ` Juanma Barranquero
2011-06-21 20:17               ` Deniz Dogan
2011-06-22  1:59                 ` Stefan Monnier
2011-06-21  4:10       ` Stephen J. Turnbull
2011-06-21 16:00   ` Deniz Dogan [this message]

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=4E00C00D.4030904@dogan.se \
    --to=deniz@dogan.se \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).