emacs-devel
[Top][All Lists]
Advanced

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

Re: frame.el: call before-make-frame-hook earlier in make-frame


From: martin rudalics
Subject: Re: frame.el: call before-make-frame-hook earlier in make-frame
Date: Fri, 31 Jul 2015 11:55:56 +0200

> That is a viable solution, but it has the drawback that you have to override a
> default key-binding (C-x 5 2) with your own make-frame function and that you 
do
> not benefit from the nice things that 'make-frame-command' additionally does 
for
> you a) at the moment (setting the focus to the new frame etc)

Here `make-frame-command' does only

  (interactive)
  (if (display-graphic-p)
      (make-frame)
    (select-frame (make-frame))))

and since you are not on a text terminal (on a text terminal you can
hardly make a frame at the mouse position) `make-frame-command' is just
an interactive wrapper for `make-frame'.  Everything else (like
redirecting focus to the new frame) is done inside `make-frame'.

> and b) potentially
> in future emacs releases. Thats why I would prefer using the hook. Thats what
> hooks are for: Adjusting behaviour with minimal invasion.

That hook would be run for any frames created by other packages, say for
the speedbar or the ediff control window.  Are you sure you want these
to pop up at the mouse position?  And how do you get the mouse position
when it's outside of any emacs frame?  Or do you want to position a new
frame always inside an existing frame?

martin



reply via email to

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