emacs-devel
[Top][All Lists]
Advanced

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

RE: Small docstring improvements


From: Drew Adams
Subject: RE: Small docstring improvements
Date: Fri, 19 Aug 2016 15:04:07 -0700 (PDT)

> Yes, agreed with respect to your patch, disagree only with respect to what
> you found there. :) Those explicit branches shouldn't have been written. It
> sounds like its purely an attempt to avoid creating new functions for what is
> clearly new functionality.

FWIW, I disagree.  I have no problem with a parameter having
different uses and different types (buffer position, string, nil).

It could be argued that the parameter name does not reflect all
of the use cases, or that it should have a generic name, such as
ARG, because of the multiple uses.  But a buffer-position is the
common use case, and I don't have a problem with the name "START",
as long as the doc clearly specifies the full behavior.

FWIW2, it is not a new feature.  From the Emacs 20 doc string for
`write-region' - but the writer seems to agree with you that this
(handy) feature is a kludge:

  Kludgy feature: if START is a string, then that string is written
  to the file, instead of any buffer contents, and END is ignored.

The use of a `nil' value for START was added in Emacs 22.  At the
same time, the characterization of multiple-use START as a kludge
was removed.



reply via email to

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