GNU bug report logs - #12679
24.2.50; Can't font-at for the beginning of a string

Previous Next

Package: emacs;

Reported by: Kazuhiro Ito <kzhr <at> d1.dion.ne.jp>

Date: Fri, 19 Oct 2012 09:55:02 UTC

Severity: normal

Found in version 24.2.50

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Kenichi Handa <handa <at> gnu.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: kzhr <at> d1.dion.ne.jp, 12679 <at> debbugs.gnu.org
Subject: bug#12679: 24.2.50; Can't font-at for the beginning of a string
Date: Tue, 30 Oct 2012 20:45:55 +0900
In article <508296EA.60000 <at> gmx.at>, martin rudalics <rudalics <at> gmx.at> writes:

> Could you please also (1) add a description of the STRING argument in
> the doc-string of `font-at',

I added this statement to the docstring.

  Optional third arg STRING, if non-nil, is a string containing the target
  character at index specified by POSITION.

> and (2) explain what happens when the
> selected window or the window passed as argument do not show the current
> buffer.

> IIUC face_at_buffer_position expects the window passed to it to
> show the current buffer but this might not be true when `font-at' calls
> it.  There's also this comment in face_at_buffer_position:

>    /* W must display the current buffer.  We could write this function
>       to use the frame and buffer of W, but right now it doesn't.  */
>    /* eassert (XBUFFER (w->buffer) == current_buffer); */

> Later in the code of face_at_buffer_position I see that w->buffer is
> sometimes used explicitly but get the impression that most other parts
> of the code use the current buffer instead.

I think your worrying is right.  So, I changed font-at to
signal an error when the specified window is not displaying
the current buffer.

---
Kenichi Handa
handa <at> gnu.org




This bug report was last modified 12 years and 264 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.