help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Making code more Emacs Lisp-like


From: Joseph Brenner
Subject: Re: Making code more Emacs Lisp-like
Date: Mon, 02 Nov 2009 16:39:20 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

Sarir Khamsi <sarir.khamsi@raytheon.com> writes:
> Joseph Brenner <doom@kzsu.stanford.edu> writes:

>> The goal there is to avoid messing with the kill-ring or the mark
>> history if that's not necessary.  Otherwise you may surprise the
>> user with the unwanted side-effects.
>
> save-excursion is supposed to "Save point, mark, and current buffer;
> execute BODY; restore those things" but I understand that you want to
> avoid modifying the kill ring. Thanks.

Good point... but don't always assume that save-excursion is really
going to save what you think it will.  Every now and then I find
a case where it doesn't seem to want to restore the current buffer,
and I need to do that manually.

(No, I haven't yet filed a bug report.  Maybe next time I see the
problem.)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]