emacs-devel
[Top][All Lists]
Advanced

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

Re: Use of where-is-internal


From: Noam Postavsky
Subject: Re: Use of where-is-internal
Date: Sat, 1 Feb 2020 10:27:06 -0500

On Sat, 1 Feb 2020 at 09:25, Stefan Monnier <address@hidden> wrote:
>
> > I'm considering of using where-is-internal in a program outside of the
> > help library. I've used the following in my init for a while to cycle
> > windows and so far the world has persisted unscathed:
> >
> >    (defun other-window-and-beyond (count &optional all-frames)
> >      "Select another window in cyclic ordering of windows.
> >    Successive pressing `o' calls `other-window'."
> >      (interactive "p")
> >      (let ((key-vector (where-is-internal this-command
> >                                           overriding-local-map t)))
> >        (set-transient-map
> >         (let ((map (make-sparse-keymap)))
> >           (define-key map (vector (aref key-vector (1- (length 
> > key-vector))))
> >             'other-window)
> >           map)
> >         t)
> >        (other-window count all-frames)))
>
> I have a feeling of "déjà vu"!

Yeah, https://lists.gnu.org/archive/html/help-gnu-emacs/2020-01/msg00176.html



reply via email to

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