help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: (copy-marker nil)


From: Andreas Röhler
Subject: Re: (copy-marker nil)
Date: Mon, 7 May 2018 19:16:54 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

On 07.05.2018 16:26, Drew Adams wrote:
For most functions, passing nil for an &optional parameter is the same
as omitting it.
If MARKER is not specified, the new marker does not point anywhere.

It's about the return value.
A marker pointing nowhere, might it be considered valid?

What do you mean by "valid"?  Yes, it's a marker.  No, it
doesn't have a buffer or position.  The same is true of
other Emacs-Lisp objects, such as overlays: they can exist
without having non-nil values for certain of their properties.

Expected such returning nil.

Why?  The doc string is pretty clear that it returns a
marker.  And it is clear what happens if arg MARKER is
nil: "the new marker does not point anywhere".



Is there a use-case for a marker pointing nowhere?
From my point of view refusing to create such a marker makes sense.



reply via email to

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