unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: Eli Zaretskii <eliz@gnu.org>
Cc: larsi@gnus.org, 44471@debbugs.gnu.org
Subject: bug#44471: [PATCH] Simplify text-quoting-style
Date: Wed, 11 Nov 2020 14:12:24 -0500	[thread overview]
Message-ID: <CADwFkm=Abfp=Sjbhofjbx3H7AFg4NStvf5gj65MNOjjF8ZPHVw@mail.gmail.com> (raw)
In-Reply-To: <831rh12ntc.fsf@gnu.org>

Eli Zaretskii <eliz@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.





  reply	other threads:[~2020-11-11 19:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-05 16:18 bug#44471: [PATCH] Simplify text-quoting-style Stefan Kangas
2020-11-09 15:56 ` Lars Ingebrigtsen
2020-11-09 20:13   ` Stefan Kangas
2020-11-10 14:30     ` Lars Ingebrigtsen
2020-11-10 16:12     ` Eli Zaretskii
2020-11-11 19:12       ` Stefan Kangas [this message]
2020-11-11 19:24         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADwFkm=Abfp=Sjbhofjbx3H7AFg4NStvf5gj65MNOjjF8ZPHVw@mail.gmail.com' \
    --to=stefan@marxist.se \
    --cc=44471@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).