[Top][All Lists]

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

bug#22757: 25.1.50; `face-at-point` and `faces--attribute-at-point` -- a

From: Keith David Bershatsky
Subject: bug#22757: 25.1.50; `face-at-point` and `faces--attribute-at-point` -- add argument WINDOW-OR-BUFFER
Date: Sun, 21 Feb 2016 13:23:26 -0800

I spent a few hours trying to figure out how to obtain face properties at 
various points (with no active region) when active region was covering up those 
areas in another window displaying the same buffer in a different frame (hidden 
visually behind other frames).  It was even more complicated to track down 
because the default value of `highlight-nonselected-windows` is `nil` and I 
couldn't visually see what was happening.  I eventually discovered that third 
argument to `get-char-property` and my dilemma was resolved.  :)

Another helpful feature would be an optional argument for POINT so that a user 
does not need to goto that point in order to obtain the face(s).

Feature request #22757 *may potentially* save other people hours of debugging; 
and, I believe adding POINT and WINDOW-OR-BUFFER as optional arguments could be 
very useful by making the current functions more powerful/versatile.

BACKGROUND:  I am working on converting to C (from Lisp) a custom 
`color-vector-calc` function that returns the three digit color code at a given 
point in a window.  Now that I discovered the third argument to 
`get-char-property`, I have a working function in Lisp.



At Sun, 21 Feb 2016 22:54:07 +0200,
Eli Zaretskii wrote:
> * * *
> Why can't you call get-char-property directly?  face-at-point is
> nothing more than a thin wrapper around get-char-property, and most of
> the wrapper code is about stuff you don't care about AFAIU from your
> description.
> Is there something I'm missing?
> Thanks.

reply via email to

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