Subject: bug#44021: delete-non-matching-lines optional arg REND not really optional

From: Boruch Baum <[email-masked]>
Date: Fri, 16 Oct 2020 02:42:51 -0400

On 2020-10-16 07:36, Lars Ingebrigtsen wrote:
> I've now mentioned this in the doc string.

Not the solution I was expecting. I was expecting the ARG to really
become optional, to be consistent with similar END arguments in other
emacs functions. Something like:

  (setq rend (or rend (point-max)))

Also, as a quibble, for consistency the args should be renamed START and
END, instead of RSTART and REND. See, for instance,

  (delete-trailing-whitespace &optional START END)
  (narrow-to-region START END)

This is true even in the same elisp file replace.el:

  (replace-regexp regexp to-string &optional delimited start end backward)
  (replace-string from-string to-string &optional delimited start end backward)

and many other functions in the same file, so it seems to have been an
oversight in integrating the function. The standard seems to be that the
args are named START and END and really are optional.

--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0