[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: save-excursion again
From: |
Stefan Monnier |
Subject: |
Re: save-excursion again |
Date: |
Thu, 01 Jul 2010 02:30:06 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
> I think the point is that save-excursion has been saving too much. So, when
> we see a save-excursion in a piece of code, we are not sure whether it was
> meant to save the point and mark, or the current-buffer, or both. It seems
> that the original developers were themselves unsure after a while.
Yes, it's part of the tension between "DWIMish user commands" and
"simple&predictable Lisp functions", where save-excursion has a kind of
"DWIMish user-command" feeling to it (it does various things and you can
keep using that single form for various purposes).
> I took Stephen's point as saying that, if we have separate
> save-current-buffer and save-region, with save-excursion strongly
> discouraged, we would promote a clearer programming style.
Probably. But then, for the same reasons, you'd also want to have
save-point since save-region is so rarely needed.
Stefan
- Re: save-excursion again, (continued)
- Re: save-excursion again, Stefan Monnier, 2010/06/18
- Re: save-excursion again, Stephen J. Turnbull, 2010/06/19
- Re: save-excursion again, Lennart Borgman, 2010/06/19
- Re: save-excursion again, Lennart Borgman, 2010/06/19
- Re: save-excursion again, Stephen J. Turnbull, 2010/06/19
- Re: save-excursion again, Lennart Borgman, 2010/06/19
- Re: save-excursion again, Stefan Monnier, 2010/06/25
- Re: save-excursion again, Stephen J. Turnbull, 2010/06/25
- Re: save-excursion again, Stefan Monnier, 2010/06/30
- Re: save-excursion again, Uday S Reddy, 2010/06/26
- Re: save-excursion again,
Stefan Monnier <=
- Re: save-excursion again, Lennart Borgman, 2010/06/30
- Re: save-excursion again, Uday S Reddy, 2010/06/19
Re: save-excursion again, Davis Herring, 2010/06/18