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

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

Re: Trying to write an emacs lisp function


From: Ye Wenbin
Subject: Re: Trying to write an emacs lisp function
Date: Mon, 28 Aug 2006 13:27:04 +0800
User-agent: Opera Mail/9.01 (Linux)

Maybe you function encounter some error, because original-frame always have many windows,
and should use selected-frame-set-input-focus finally.

(defun windows-into-frames ()
  "If the current frame has more than one window,
make each window display in its own
seperate frame."
  (interactive)
  (let ((original-frame (selected-frame))
        (original-window (selected-window)))
    (dolist (win (window-list))
      (when (not (eq win original-window))
        (select-window win)
        (make-frame)
        (select-frame original-frame)))
    (select-frame-set-input-focus original-frame)
    (select-window original-window)))

On Mon, 28 Aug 2006 11:17:44 +0800, <jkarres@gmail.com> wrote:


(defun windows-into-frames ()
  "If the current frame has more than one window,
make each window display in its own
seperate frame."
  (interactive)
  (setq original-frame (selected-frame))
  (while (not (one-window-p t))
    (other-window 1)
    (make-frame)
    (delete-window)
    (select-frame original-frame)))



--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/





reply via email to

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