emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Lift {global,local}-key-binding to Lisp


From: Dmitry Gutov
Subject: Re: Lift {global,local}-key-binding to Lisp
Date: Fri, 15 Jan 2021 15:24:09 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 15.01.2021 14:18, Eli Zaretskii wrote:

Consider that, when a piece of code is implemented in Lisp, it's easier
for us "mere mortals" to find it, read, understand and debug it. Even
more so when it comes to people outside of emacs-devel.

So as a result you should end up answering fewer questions about it.

I invite you to have a look at the C implementation of these two
functions, and then explain to me how the original code was any harder
for "mere mortals" to understand, let alone trigger some questions.

It is, though of course the function is short.

As such, the arguments both for and against this change are relatively weak. Surely you won't have many troubles because of this move either. So both you and others in this thread are really arguing on principle.

Except for Stefan, who already did the work and wrote a couple of tests (which, in the unlikely chance of failing, would be easier to debug in Lisp), and tested the change manually, I'm sure.

I dig the argument about a certain loss of organization (keymap.c => simple.el), but that can be fixed in Lisp too, when/if we get more such functions.

Oscars's argument about these two functions having already been written in "would-rather-be-doing-this-on-Lisp" mindset is sensible too.

Once again, we need to address this on a case by case basis; an
abstract principle will fail to lead to wise, balanced decisions.

We need to have some guidelines, though, in order to avoid arguing about every such commit.

Until now, the common thinking has been "we want to have more code in Lisp, for its readability, discoverability and debuggability advantages except for cases where it would make Emacs slower/less stable/etc".

Also consider that Debian with its packaging makes reading the Lisp sources considerably easier than C sources. Same goes for builds on other platforms, I imagine, probably to an even larger extent (Debian does separate the Lisp sources to a package you have to install additionally).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]