all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mathias Dahl <brakjoller@gmail.com>
Subject: Re: prospective multi-save function
Date: Mon, 04 Dec 2006 09:27:33 +0100	[thread overview]
Message-ID: <uodqkawwa.fsf@gmail.com> (raw)
In-Reply-To: 7c5e9$4570f02c$49fa176$10142@DIALUPUSA.NET

"B. T. Raven" <ecinmn@alcisp.com> writes:

> "
> save-current-buffer is a special form.
> (save-current-buffer &rest BODY)
>
> Save the current buffer; execute BODY; restore the current buffer.
> Executes BODY just like `progn'.  "
>
> Could the code for saving the buffer in other places be put into
> this BODY?

Most probably. An example:

(defun foo ()
  (interactive)
  (save-current-buffer
    ;; Do whatever you want here
    (write-region (point-min) (point-max) my-backup-file)
    ;; And maybe here too. Use whatever means you like to
    ;; save the buffer where you like.
    ))

      reply	other threads:[~2006-12-04  8:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-02  3:16 prospective multi-save function B. T. Raven
2006-12-04  8:27 ` Mathias Dahl [this message]

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

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

  git send-email \
    --in-reply-to=uodqkawwa.fsf@gmail.com \
    --to=brakjoller@gmail.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.