unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#30816: 27.0.50; Info documentation of previous-property-change is not very clear
@ 2018-03-14  9:58 Xu Chunyang
  2018-03-14 16:26 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Xu Chunyang @ 2018-03-14  9:58 UTC (permalink / raw)
  To: 30816


(info "(elisp) Property Search") has the following:

     -- Function: previous-property-change pos &optional object limit
         This is like ‘next-property-change’, but scans back from POS
         instead of forward.  If the value is non-‘nil’, it is a position
                                 ^^^^^^^^^
         less than or equal to POS; it equals POS only if LIMIT equals POS.
                                    ^^

I don't understand the second sentence. What "the value" stands for? If
it stands for LIMIT, what "it" stands for?





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#30816: 27.0.50; Info documentation of previous-property-change is not very clear
  2018-03-14  9:58 bug#30816: 27.0.50; Info documentation of previous-property-change is not very clear Xu Chunyang
@ 2018-03-14 16:26 ` Eli Zaretskii
  2018-03-14 19:04   ` Xu Chunyang
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2018-03-14 16:26 UTC (permalink / raw)
  To: Xu Chunyang; +Cc: 30816

> From: Xu Chunyang <mail@xuchunyang.me>
> Date: Wed, 14 Mar 2018 17:58:32 +0800
> 
> 
> (info "(elisp) Property Search") has the following:
> 
>      -- Function: previous-property-change pos &optional object limit
>          This is like ‘next-property-change’, but scans back from POS
>          instead of forward.  If the value is non-‘nil’, it is a position
>                                  ^^^^^^^^^
>          less than or equal to POS; it equals POS only if LIMIT equals POS.
>                                     ^^
> 
> I don't understand the second sentence. What "the value" stands for?

When we say "value" in the context of describing a function, we mean
the value the function returns.  In this case, the value returned by
previous-property-change.

> If it stands for LIMIT, what "it" stands for?

"It" stands for the value returned by the function.  the text says
that the function returns the position of the previous change of the
property, and that position could only be the same as the starting
position POS if LIMIT is equal to POS, i.e. if LIMIT forces the
function to stop at its starting position.

I hope this clarifies the issue.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#30816: 27.0.50; Info documentation of previous-property-change is not very clear
  2018-03-14 16:26 ` Eli Zaretskii
@ 2018-03-14 19:04   ` Xu Chunyang
  2018-03-14 19:35     ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Xu Chunyang @ 2018-03-14 19:04 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 30816

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Xu Chunyang <mail@xuchunyang.me>
>> Date: Wed, 14 Mar 2018 17:58:32 +0800
>> 
>> 
>> (info "(elisp) Property Search") has the following:
>> 
>>      -- Function: previous-property-change pos &optional object limit
>>          This is like ‘next-property-change’, but scans back from POS
>>          instead of forward.  If the value is non-‘nil’, it is a position
>>                                  ^^^^^^^^^
>>          less than or equal to POS; it equals POS only if LIMIT equals POS.
>>                                     ^^
>> 
>> I don't understand the second sentence. What "the value" stands for?
>
> When we say "value" in the context of describing a function, we mean
> the value the function returns.  In this case, the value returned by
> previous-property-change.

I see. I notice the term "the return value" is also used in some place
in the manual.

>> If it stands for LIMIT, what "it" stands for?
>
> "It" stands for the value returned by the function.  the text says
> that the function returns the position of the previous change of the
> property, and that position could only be the same as the starting
> position POS if LIMIT is equal to POS, i.e. if LIMIT forces the
> function to stop at its starting position.
>
> I hope this clarifies the issue.

Thanks for your explanation. Feel free to close the issue.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#30816: 27.0.50; Info documentation of previous-property-change is not very clear
  2018-03-14 19:04   ` Xu Chunyang
@ 2018-03-14 19:35     ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2018-03-14 19:35 UTC (permalink / raw)
  To: Xu Chunyang; +Cc: 30816-done

> From: Xu Chunyang <mail@xuchunyang.me>
> Cc: 30816@debbugs.gnu.org
> Date: Thu, 15 Mar 2018 03:04:30 +0800
> 
> Thanks for your explanation. Feel free to close the issue.

Done.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-03-14 19:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-14  9:58 bug#30816: 27.0.50; Info documentation of previous-property-change is not very clear Xu Chunyang
2018-03-14 16:26 ` Eli Zaretskii
2018-03-14 19:04   ` Xu Chunyang
2018-03-14 19:35     ` Eli Zaretskii

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).