[Top][All Lists]

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

Re: How about making `set-minibuffer-window' obsolete?

From: martin rudalics
Subject: Re: How about making `set-minibuffer-window' obsolete?
Date: Wed, 17 Mar 2021 09:44:37 +0100

> Does anybody have any objection to me making set-minibuffer-window
> obsolete?
> It's defined in src/minibuf.c, but not used by any C function, and it's
> not used by any Lisp in Emacs itself - the nearest to a use is a
> commented out occurrence in lisp/textmodes/ispell.el.
> This function just sets the C variable minibuf_window.  This variable is
> defined (by comment) to be the minibuffer window of the selected frame.
> So setting it to a random mini-window will cause nasty problems.
> Actually, I'd prefer just to remove the function entirely - but there's
> always the chance it's being used by some external library.
> So, any objections?

Rather `set-minibuffer-window' should take as argument a frame to set
the 'minibuffer-window' parameter of that frame.  This way it would
become the counterpart of `minibuffer-window' which takes as argument a
frame and returns that frame's minibuffer window.

The current semantics of `set-minibuffer-window' is of no practical use.
Lisp code should never deal with minibuf_window directly.  However,
every minibuffer interaction should be aware of the fact that any
frame's minibuffer window might change via fset_minibuffer_window under
its feet.


reply via email to

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