From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/43433 Path: main.gmane.org!not-for-mail From: ShengHuo ZHU Newsgroups: gmane.emacs.gnus.general Subject: Re: I need to be able to remove delete-frame from the action list Date: Wed, 06 Mar 2002 12:48:14 -0500 Sender: owner-ding@hpc.uh.edu Message-ID: <2nsn7d8u5d.fsf@zsh.cs.rochester.edu> References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035178527 17564 80.91.224.250 (21 Oct 2002 05:35:27 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 05:35:27 +0000 (UTC) Return-Path: Original-Received: (qmail 1018 invoked from network); 6 Mar 2002 17:49:49 -0000 Original-Received: from malifon.math.uh.edu (mail@129.7.128.13) by mastaler.com with SMTP; 6 Mar 2002 17:49:49 -0000 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 16ifXN-0003vQ-00; Wed, 06 Mar 2002 11:49:13 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Wed, 06 Mar 2002 11:49:11 -0600 (CST) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id LAA05298 for ; Wed, 6 Mar 2002 11:48:58 -0600 (CST) Original-Received: (qmail 998 invoked by alias); 6 Mar 2002 17:48:50 -0000 Original-Received: (qmail 993 invoked from network); 6 Mar 2002 17:48:50 -0000 Original-Received: from zsh.cs.rochester.edu (HELO zsh.2y.net) (192.5.53.126) by gnus.org with SMTP; 6 Mar 2002 17:48:50 -0000 Original-Received: (from zsh@localhost) by zsh.2y.net (8.11.6/8.11.2) id g26HmEQ01000; Wed, 6 Mar 2002 12:48:14 -0500 Original-To: ding@gnus.org X-Attribution: ZSH X-Face: #zw9`a=vHLkn+ZH8C (Karl Kleinpaste's message of "Wed, 06 Mar 2002 12:08:36 -0500") Original-Lines: 25 User-Agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2.50 (i686-pc-linux-gnu) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:43433 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:43433 Karl Kleinpaste writes: > I've been using this for a while, when operating under X: > > (message-add-action 'delete-frame 'exit 'postpone 'kill) > > Unfortunately, there appears to be no way to undo this addition to the > action list. The problem arises when I have started XEmacs under X at > home, then go to the office where I ssh home and run "gnuclient -nw". > Now I have a tty-based XEmacs which nonetheless exits back to a shell > prompt any time I send a message. > > What I would like is the inverse, message-delete-action, which I would > then use when detecting non-X use, to avoid the departure of my > tty-based frame. Add. But I think it is better to use the following code (untested). (defun delete-frame-unless-tty () (if window-system (delete-frame))) (message-add-action 'delete-frame-unless-tty 'exit 'postpone 'kill) ShengHuo