unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: save-buffer like save-excursion
Date: Sun, 18 Mar 2007 23:54:36 -0400	[thread overview]
Message-ID: <jwvps75ubvi.fsf-monnier+gnu.emacs.help@gnu.org> (raw)
In-Reply-To: mailman.1069.1174204758.7795.help-gnu-emacs@gnu.org

> Is there a command like save-excursion that only saves the buffer?  I
> have several functions that must set-buffer temporarily, then do things
> that change point.  I always want these point changes, but if set-buffer
> changed the buffer (not necessarily true), I want to reverse that change.

> So, is there already a command for this?

with-current-buffer (or save-current-buffer).


        Stefan

  parent reply	other threads:[~2007-03-19  3:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1069.1174204758.7795.help-gnu-emacs@gnu.org>
2007-03-18  9:23 ` save-buffer like save-excursion Harald Hanche-Olsen
2007-03-18  9:56   ` Matthew Flaschen
2007-03-19  3:54 ` Stefan Monnier [this message]
2007-03-19  5:30   ` Matthew Flaschen
2007-03-19  7:33   ` Harald Hanche-Olsen
2007-03-19 21:36     ` Matthew Flaschen
     [not found]     ` <mailman.1132.1174340311.7795.help-gnu-emacs@gnu.org>
2007-03-21 19:42       ` Stefan Monnier
2007-03-23  1:35         ` Matthew Flaschen
2007-03-18  7:57 Matthew Flaschen

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=jwvps75ubvi.fsf-monnier+gnu.emacs.help@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=help-gnu-emacs@gnu.org \
    /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).