From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "tcp" Newsgroups: gmane.emacs.help Subject: Re: C-x C-c Date: Tue, 24 Dec 2002 22:55:07 GMT Organization: home Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <3E0894A8.6050506@ihs.com> Reply-To: tcp NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1040770585 28428 80.91.224.249 (24 Dec 2002 22:56:25 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 24 Dec 2002 22:56:25 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18QxyJ-0007OL-00 for ; Tue, 24 Dec 2002 23:56:23 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18QxxU-0000BA-04 for gnu-help-gnu-emacs@m.gmane.org; Tue, 24 Dec 2002 17:55:32 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.stealth.net!news.stealth.net!204.127.161.6.MISMATCH!wn12feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!sccrnsc01.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 46 X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Original-NNTP-Posting-Host: 12.237.94.130 Original-X-Complaints-To: abuse@attbi.com Original-X-Trace: sccrnsc01 1040770507 12.237.94.130 (Tue, 24 Dec 2002 22:55:07 GMT) Original-NNTP-Posting-Date: Tue, 24 Dec 2002 22:55:07 GMT Original-Xref: shelby.stanford.edu gnu.emacs.help:108473 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:5002 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:5002 Hi Kevin, Thanks. I have this problem when I add the following two function into my .emacs Wrong number of arguments: #, 2 Also, if I have multiple frames up, it does not seem to delete all the open frames. Thanks! "Kevin Rodgers" wrote in message news:3E0894A8.6050506@ihs.com... > tcp wrote: > > > Is there a way to map the C-x C-c to close all opened files and frame but > > not exiting emacs. > > You asked for it: > > > (defun close-all-files () > "Kill all buffers that are visiting a file." > (interactive) > (let ((buffers (buffer-list))) > (while buffers > (if (buffer-file-name (car buffers)) > (kill-buffer (car buffers))) > (setq buffers (cdr buffers))))) > > (define-key "\C-x\C-c" > (lambda () > "Run `\\[close-all-files]' and `\\[delete-frame\\]'." > (interactive) > (close-all-files) > (delete-frame))) > > -- > Kevin Rodgers >