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: Thu, 29 Mar 2018 14:38:15 +0300

> From: Karl Fogel <address@hidden>
> Date: Wed, 28 Mar 2018 23:53:53 -0500
> Cc: address@hidden
> 
> >(put 'transpose-regions
> >     'interactive-form
> >     '(if (< (length mark-ring) 2)
> >       (error "Other region must be marked before transposing two regions")
> >     (let* ((num (if current-prefix-arg
> >                     (prefix-numeric-value current-prefix-arg)
> >                   0))
> >            (ring-length (length mark-ring))
> >            (eltnum (mod num ring-length))
> >            (eltnum2 (mod (1+ num) ring-length)))
> >       (list (point) (mark) (elt mark-ring eltnum) (elt mark-ring 
> > eltnum2)))))
> 
> Personally, I think I'd prefer to have the interactive form together with the 
> rest of the function definition, even if that's in C.

I agree.  My reason is that this separation makes finding all the
pieces of the puzzle significantly harder.

> What would you think of mentioning this trick in doc/lispref/internals.texi, 
> in the text for "@item interactive"?

The property is already prominently described, so just a
cross-reference to one of those places should be enough.



reply via email to

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