emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] master b88e7c8: Make transpose-regions interactive (Bu


From: Eli Zaretskii
Subject: Re: [Emacs-diffs] master b88e7c8: Make transpose-regions interactive (Bug#30343)
Date: Sun, 25 Mar 2018 18:41:47 +0300

> Date: Sun, 25 Mar 2018 12:03:35 +0200
> From: address@hidden (Charles A. Roelli)
> CC: address@hidden, address@hidden
> 
> > Date: Wed, 21 Mar 2018 09:22:19 +0200
> > From: Eli Zaretskii <address@hidden>
> > 
> > Here are some reasons why not to make the change:
> > 
> >   . there's nothing wrong with that code
> >   . having it in C doesn't make hacking harder because one can always
> >     override functions in Emacs, 
> 
> Good point.  Is this written in the Elisp manual anywhere?

Yes, it's documented where we describe 'defun':

     Be careful not to redefine existing functions unintentionally.
     ‘defun’ redefines even primitive functions such as ‘car’ without
     any hesitation or notification.  Emacs does not prevent you from
     doing this, because redefining a function is sometimes done
     deliberately, and there is no way to distinguish deliberate
     redefinition from unintentional redefinition.

> I searched for "override functions" and "override primitives" in the
> index, but did not find a result.

I would index this as "redefining functions", at least in addition to
"overriding", if not instead of it.

> Instead of defining transpose-regions (and its interactive spec) in
> Lisp (as the reverted patch did), we could take the current
> interactive spec of transpose-regions and use that to make a preloaded
> function named "read-two-regions" in simple.el.  That would allow its
> reuse by other commands, too.

Where would such a function be useful?



reply via email to

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