emacs-devel
[Top][All Lists]
Advanced

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

Re: Frame ordering


From: David Reitter
Subject: Re: Frame ordering
Date: Sat, 12 Jun 2010 00:12:45 -0400

On Jun 11, 2010, at 1:13 PM, martin rudalics wrote:
> 
> I'd write a simple function to reorder frames, make it callable from
> Lisp, and test it from there first.

OK, that works. 
What next?
`handle-switch-frame' could be defined in Lisp anyway, calling the current 
Fhandle_switch_frame primitive.

That said, why did the same not work in do_switch_frame, and why did my other 
variant (that I posted) lead to hangs and crashes?



(global-set-key [switch-frame] 'my-handle-switch-frame)

(defun my-handle-switch-frame ( event)
 (interactive "e")
 (handle-switch-frame event)
 (set-latest-frame (selected-frame)))


DEFUN ("set-latest-frame", Fset_latest_frame, Sset_latest_frame, 1, 1, 0,
      doc: /* Make FRAME the last frame in the frame list. */)
    (frame)
    Lisp_Object frame;
{
 if (NILP (frame))
   frame = selected_frame;
 if (!FRAMEP (frame))
   return Qnil;
 Vframe_list = Fcons (frame, Fdelq (frame, Vframe_list));
 return Qnil;  /* don't return the new frame-list - see Fframe_list */
}




reply via email to

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