[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C-x C-c
From: |
tcp |
Subject: |
Re: C-x C-c |
Date: |
Tue, 24 Dec 2002 22:55:07 GMT |
Hi Kevin,
Thanks. I have this problem when I add
the following two function into my .emacs
Wrong number of arguments: #<subr define-key>, 2
Also, if I have multiple frames up, it does not
seem to delete all the open frames.
Thanks!
"Kevin Rodgers" <kevin.rodgers@ihs.com> 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)))
>
> --
> <a href="mailto:<kevin.rodgers@ihs.com>">Kevin Rodgers</a>
>
[Prev in Thread] |
Current Thread |
[Next in Thread] |