unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "tcp" <txt8888@yahoo.com>
Subject: Re: C-x C-c
Date: Tue, 24 Dec 2002 22:55:07 GMT	[thread overview]
Message-ID: <fB5O9.496943$NH2.34338@sccrnsc01> (raw)
In-Reply-To: 3E0894A8.6050506@ihs.com

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:&lt;kevin.rodgers&#64;ihs.com&gt;">Kevin Rodgers</a>
>

  reply	other threads:[~2002-12-24 22:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-24  5:21 C-x C-c tcp
2002-12-24 17:08 ` Kevin Rodgers
2002-12-24 22:55   ` tcp [this message]
2002-12-26 16:24     ` Kevin Rodgers

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to='fB5O9.496943$NH2.34338@sccrnsc01' \
    --to=txt8888@yahoo.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).