emacs-devel
[Top][All Lists]
Advanced

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

Re: Mark position from C


From: Eli Zaretskii
Subject: Re: Mark position from C
Date: Wed, 15 Feb 2023 15:54:08 +0200

> From: Po Lu <luangruo@yahoo.com>
> Date: Wed, 15 Feb 2023 19:10:26 +0800
> 
> Is there a canonical C function to obtain the position of mark?  Right
> now, I'm doing this to compare mark against point, which looks wrong.
> 
>       && XMARKER (BVAR (current_buffer, mark))->position
>       && marker_position (BVAR (current_buffer,
>                               mark)) == PT)

marker_position (BVAR (current_buffer, mark)) is it.  Why does it look
wrong to you?

And why do you need the first condition?

And why do you need to access the mark in the first place?  It is rare
for the C code to need that; about the only place where we do it is in
interpreting the 'interactive' codes.



reply via email to

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