* Why `read-buffer` is implemented in C?
@ 2024-05-05 15:38 Óscar Fuentes
2024-05-05 16:26 ` Eli Zaretskii
0 siblings, 1 reply; 2+ messages in thread
From: Óscar Fuentes @ 2024-05-05 15:38 UTC (permalink / raw)
To: emacs-devel
While diagnosing a problem, I stumbled on read-buffer. Why is it
implemented in C? I mean, why is it *still* implemented in C? From my
beginner level of Emacs C-fu, I see nothing there that can't be done in
Elisp.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Why `read-buffer` is implemented in C?
2024-05-05 15:38 Why `read-buffer` is implemented in C? Óscar Fuentes
@ 2024-05-05 16:26 ` Eli Zaretskii
0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2024-05-05 16:26 UTC (permalink / raw)
To: Óscar Fuentes; +Cc: emacs-devel
> From: Óscar Fuentes <ofv@wanadoo.es>
> Date: Sun, 05 May 2024 17:38:29 +0200
>
> While diagnosing a problem, I stumbled on read-buffer. Why is it
> implemented in C? I mean, why is it *still* implemented in C?
Because we didn't have a good enough reason to move it to Lisp. Such
moves are not really trivial; for starters, you need to make sure that
its Lisp definition will be loaded in loadup before the first Lisp
file that uses read-buffer. And that's just the tip of the iceberg
(e.g., I see 2 places in C that call read-buffer, so we'd need to make
sure these two places are not used before the Lisp definition is
loaded; etc. etc.).
So we only do such things when we have a good reason, whose advantages
can justify the potential trouble such changes can (and do) cause.
Otherwise, it's simply un-economical.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-05-05 16:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-05 15:38 Why `read-buffer` is implemented in C? Óscar Fuentes
2024-05-05 16:26 ` Eli Zaretskii
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).