[Top][All Lists]

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

policy regarding DEFUNs in subr-x.el

From: Štěpán Němec
Subject: policy regarding DEFUNs in subr-x.el
Date: Sun, 22 Mar 2020 16:46:36 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

When fixing bug#39980 [1], it seemed best to me to move a string utility
function to subr-x. Given the file's commentary (notably "NB If you want
to use this library, it's almost always correct to use:
(eval-when-compile (require 'subr-x))") and the fact that with a single
outlier of `replace-region-contents', everything in that file is either
inline functions or macros, I turned the added function into defsubst,
which seems to have raised Lars's eyebrows, and Eli's, probably, too.

Now, it does seem sensible for the function to be a normal, not inline,
function, but what about the commentary and all the other defsubsts,
including the other string utilities?

If the no-defun policy should be changed, or if I was mistaken in
believing there was one to begin with, shouldn't the commentary
recommending compile-time usage be removed, and at least some of the
other defsubsts turned into defuns, too?

Any clarification would be much appreciated.

[1] https://lists.gnu.org/archive/html/bug-gnu-emacs/2020-03/msg00643.html


reply via email to

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