GNU bug report logs - #77336
[PATCH] Fix mouse highlighting for compact mode lines

Previous Next

Package: emacs;

Reported by: Pengji Zhang <me <at> pengjiz.com>

Date: Fri, 28 Mar 2025 10:56:01 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Pengji Zhang <me <at> pengjiz.com>
Cc: 77336 <at> debbugs.gnu.org
Subject: bug#77336: [PATCH] Fix mouse highlighting for compact mode lines
Date: Mon, 31 Mar 2025 16:03:18 +0300
> From: Pengji Zhang <me <at> pengjiz.com>
> Cc: 77336 <at> debbugs.gnu.org
> Date: Mon, 31 Mar 2025 11:31:36 +0800
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> >> Is casting the 'Lisp_Object' to a number acceptable here?
> >
> > No, because Lisp_Object could be a struct (if Emacs was configured with
> > "--enable-check-lisp-object-type").
> 
> Sorry I did not make it clear. I meant 'make_fixnum(XLI(elt))'. I
> suppose 'XLI' will handle that case correctly?

I'd prefer not to do that unless there's no other reasonable solution.

> I am actually concerned that there could be a collision between two
> different 'elt's, e.g., a symbol and a string, because 'make_fixnum'
> alters the tag of 'elt'. I think it might be fine because 'elt' should
> always be a 'Lisp_String' when this is called.

Sorry, I don't understand: what do you mean by "alters the tag of
'elt'", and how could make_fixnum affect 'elt'?

> > A global variable is what I had in mind.  I don't see why it would be
> > less clean.
> 
> It is just that maintaining a global state is not as tasteful to me. If
> 'make_fixnum(XLI(elt))' is not good here, I am happy to go this way.

Yes, a global variable is cleaner than using XLI for this purpose.




This bug report was last modified 101 days ago.

Previous Next


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