[Top][All Lists]

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

Re: Add some aliases for re-related functions

From: Alan Mackenzie
Subject: Re: Add some aliases for re-related functions
Date: Sun, 3 May 2020 17:14:30 +0000

Hello, Stefan.

On Sat, May 02, 2020 at 18:41:04 -0400, Stefan Monnier wrote:
> > On 1991-07-25, Jim Blandy introduced the alias `search-forward-regexp'
> > for `re-search-forward'.

> Oh, right, I hate that alias.

I've been confused by it.  I don't love it either.

> > Why?  Lost in the mists of time.  Possibly for the same reasons people
> > are advancing now - make all the search functions begin with "search-"
> > for supposed easier searching (of their names).

> Could be.  I always assumed it was meant for M-x use (i.e. for
> non-programmer users) rather than for use in Elisp code.

> > Or `delete-backward-char' and its alias `backward-delete-char'.  We have,
> > respectively, 5 and 36 uses.  To me, this is just confusion, whatever the
> > original reason was for these aliases.

> I can also come up with bad examples.  I don't think it makes it
> undesirable to add aliases.  Rather it argues for making sure you don't
> forget to mark one of the two as obsolete.

It doesn't make sense to introduce an alias and immediately mark it as
obsolete.  So I think you're suggesting that heavily used and well loved
function names like looking-at and match-string should be marked obsolete.

I'm unhappy with that.  The proposed replacement names are worse for an
important thing we do with Emacs (reading code and debugging it), and
the whole reason for this proposed substitution seems to have got lost.

The discussion ought to be about what we are trying to do, whether we
should do it at all, and if so what ways there are of achieving this.
Instead it seems some people have already decided to replace function
names and are at the stage of proposing lists of replacements.  This
isn't good.

>         Stefan

Alan Mackenzie (Nuremberg, Germany).

reply via email to

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