emacs-devel
[Top][All Lists]
Advanced

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

Re: Small docstring improvements


From: Philipp Stephani
Subject: Re: Small docstring improvements
Date: Fri, 19 Aug 2016 20:34:58 +0000



John Wiegley <address@hidden> schrieb am Fr., 19. Aug. 2016 um 21:34 Uhr:
>>>>> "PS" == Philipp Stephani <address@hidden> writes:

PS> +START and END are normally buffer positions specifying the part of the
PS> +buffer to send to the process.
PS> +If START is nil, that means to use the entire buffer contents; END is
PS> +ignored.

I would phrase a little differently:

    +If START and END are both buffer positions, they specify the region
    +to send to the process.
    +If START is nil, it means to use the entire buffer contents; END is
    +ignored.

PS> +If START is a string, then send that string to the process +instead of
PS> any buffer contents; END is ignored.

This is a horrible abuse. There should be another function
`call-process-with-string'.

I don't like the way that "START" has three separate meanings, only one of
which has anything to do with beginning a START of something.


I've simply copied the docstring from write-region, which has exactly the same semantics (because call-process-region calls write-region). Like it or not, these are the semantics, and they are intentional (the code for call-process-region has explicit branches for these cases), so I think they deserve to be documented. 

reply via email to

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