all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: <lsilvapereyra@gmail.com>, <help-gnu-emacs@gnu.org>
Subject: RE: Wrong type argument: frame-live-p, #<dead frame *Group* 0x91ca460>
Date: Mon, 15 Dec 2008 12:55:59 -0800	[thread overview]
Message-ID: <007201c95ef7$8898fb30$0200a8c0@us.oracle.com> (raw)
In-Reply-To: <b2232458-c69a-4d9e-ba38-8ccdac74cbec@40g2000prx.googlegroups.com>

> (defun kill-this-buffer-and-frame ()
>    (interactive)
>    (kill-this-buffer)
>    (delete-frame))
> 
> It works as intended (that is, it kills the buffer and deletes the
> frame) most of the time, but sometimes (I haven't been able to
> determine when) I get:
> 
> Wrong type argument: frame-live-p, #<dead frame *Group* 0x91ca460>
> and it doesn't work. I'd be very grateful for any help or commentary.

Try using:

(when (frame-live-p (selected-frame)) (delete-frame))

or (probably better):

(when (and (frame-live-p (selected-frame))
           (kill-this-buffer))
  (delete-frame))





  reply	other threads:[~2008-12-15 20:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-15 19:55 Wrong type argument: frame-live-p, #<dead frame *Group* 0x91ca460> lsilvapereyra
2008-12-15 20:55 ` Drew Adams [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-12-16 10:06 martin rudalics

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='007201c95ef7$8898fb30$0200a8c0@us.oracle.com' \
    --to=drew.adams@oracle.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=lsilvapereyra@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.