GNU bug report logs - #58772
CC Mode 5.35.1 (C/*l); CC Mode fails to fontify source_y in Fx_translate_coordinates

Previous Next

Package: cc-mode;

Reported by: Po Lu <luangruo <at> yahoo.com>

Date: Tue, 25 Oct 2022 10:38:02 UTC

Severity: normal

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 58772 <at> debbugs.gnu.org (full text, mbox):

From: Alan Mackenzie <acm <at> muc.de>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 58772 <at> debbugs.gnu.org
Subject: Re: bug#58772: CC Mode 5.35.1 (C/*l); CC Mode fails to fontify
 source_y in Fx_translate_coordinates
Date: Fri, 28 Oct 2022 19:54:08 +0000
[Message part 1 (text/plain, inline)]
Hello again, Po.

On Tue, Oct 25, 2022 at 18:37:10 +0800, Po Lu via CC-Mode-help wrote:
> Package: cc-mode

> Go to src/xfns.c in the Emacs 29 source code.  Somewhere around line
> 7935, there will be the following function definition:

> DEFUN ("x-translate-coordinates", Fx_translate_coordinates,
>        Sx_translate_coordinates,
>        1, 5, 0, doc: /* Translate coordinates from FRAME.
> Translate the given coordinates SOURCE-X and SOURCE-Y from
> SOURCE-WINDOW's coordinate space to that of DEST-WINDOW, on FRAME.

> If SOURCE-X and SOURCE-Y are nil, use 0 instead.

> FRAME can either be a terminal or a frame.  If nil, it defaults to the
> selected frame.  SOURCE-WINDOW must be an X window ID, 0 (which means
> to use the root window), or nil, which means to use FRAME's inner
> window.  DEST-WINDOW must be another X window ID, or nil (which means
> to use the root window).

> Return a list of (X Y CHILD) if the given coordinates are on the same
> screen, or nil otherwise, where X and Y are the coordinates in
> DEST-WINDOW's coordinate space, and CHILD is the window ID of any
> mapped child in DEST-WINDOW at those coordinates, or nil if there is
> no such window.  */)
>   (Lisp_Object frame, Lisp_Object source_window,
>    Lisp_Object dest_window, Lisp_Object source_x,
>    Lisp_Object source_y)
> {

> In that function definition, "Lisp_Object source_y" is not fontified.
> This did not happen in Emacs 28.

This was an unintended consequence of some recent changes.  Sorry.

I can't explain in any reasonable way what was wrong, but I think the
attached patch should fix it.  Would you please do the usual with the
patch, and let me know whether or not the bug really is fixed, and
whether anything else untoward is caused by it.  Thanks!

> Emacs  : GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu)
>  of 2022-10-17
> Package: CC Mode 5.35.1 (C/*l)
> Buffer Style: GNU
> c-emacs-features: (pps-extended-state col-0-paren posix-char-classes gen-string-delim gen-comment-delim syntax-properties category-properties 1-bit)

[ .... ]

-- 
Alan Mackenzie (Nuremberg, Germany).

[diff.20221028.diff (text/plain, attachment)]

This bug report was last modified 2 years and 258 days ago.

Previous Next


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