bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#52023: 27.2; Enhancement: `this-command-invocation-(buffer|window)'


From: Juri Linkov
Subject: bug#52023: 27.2; Enhancement: `this-command-invocation-(buffer|window)'
Date: Sun, 21 Nov 2021 21:19:04 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)

> Enhancement request: please consider adding functions
> `this-command-invocation-buffer' and `this-command-invocation-window'.
> (Other names OK.)
>
> They would return, respectively, the buffer that was current, and the
> window that was selected, when the command that's the value of
> `this-command' was invoked.
>
> Currently, to get this information a workaround would be to use a
> `pre-command-hook' function that sets variables, and then to test those
> variables.

Maybe these functions give what you need?

  (old-selected-window)
  (window-buffer (old-selected-window))





reply via email to

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