From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/43786 Path: quimby.gnus.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 Message-ID: References: NNTP-Posting-Host: quimby2.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: quimby2.netfonds.no 1015437456 28516 195.204.10.66 (6 Mar 2002 17:57:36 GMT) X-Complaints-To: usenet@quimby2.netfonds.no NNTP-Posting-Date: 6 Mar 2002 17:57:36 GMT Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by quimby2.netfonds.no with esmtp (Exim 3.12 #1 (Debian)) id 16iffT-0007Pl-00; Wed, 06 Mar 2002 18:57:36 +0100 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: quimby.gnus.org gmane.emacs.gnus.general:43786 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:43786 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