GNU bug report logs - #44471
[PATCH] Simplify text-quoting-style

Previous Next

Package: emacs;

Reported by: Stefan Kangas <stefan <at> marxist.se>

Date: Thu, 5 Nov 2020 16:19:02 UTC

Severity: wishlist

Tags: fixed, patch

Fixed in version 28.1

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Kangas <stefan <at> marxist.se>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: larsi <at> gnus.org, 44471 <at> debbugs.gnu.org
Subject: bug#44471: [PATCH] Simplify text-quoting-style
Date: Wed, 11 Nov 2020 14:12:24 -0500
Eli Zaretskii <eliz <at> gnu.org> writes:

> Please in the future allow more than just a couple of days for people
> to comment on non-trivial patches.

OK.

> As it happens, I do have a few issues with the change:
>
>   . it slows down code of two very popular functions, because we now
>     use EQ instead of a C-level equality operator;

If I understand correctly, EQ(x, y) ends up in a C-level equality
operator and a typecast.  Is that correct?  If yes, is it the typecast
that you think will cause a slowdown, or is it something else?

I naively thought that this would not make much of a difference, and
that, to the extent that it did, the relevant functions are hardly
called often enough to matter in the end.  But I assume you know more
than me here, so please tell me where I'm wrong.

>   . it introduces a function that has the same name as a variable,
>     which adds a bit to confusion, and also defeats our method of
>     reporting in what version was the function/variable introduced
>     (try "C-h f"); and

This is not without precedent, see e.g. `user-full-name'.  But if we
want to keep my patch we could of course just use the previous name
`get-text-style' instead.

>   . I don't think I see the simplification that justifies these
>     (admittedly quite minor) downsides

I agree it is minor, but I see one function less, one less enum, and
overall fewer lines of code.

I'm happy to revert it if the change is not wanted.




This bug report was last modified 4 years and 251 days ago.

Previous Next


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