[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: save-excursion and the mark
From: |
Stefan Monnier |
Subject: |
Re: save-excursion and the mark |
Date: |
Sat, 18 Apr 2015 00:26:17 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
> Code that previously relied on `save-excursion' restoring the mark no
> longer works, and that's fine. But could we have a new form like
> `save-mark' (or something) that we could just slap around forms that
> previously relied on this form behaving the old way?
(cl-letf (((mark))) ...) might do the trick.
Or maybe you'll need (cl-letf (((mark)) (mark-active)) ...).
note that if the "..." activates or deactivates the mark, you're
probably somewhat in trouble in the sense that (de)activate-mark-hook
will be run, despite the cl-letf, and you can't really undo the effect
of running a hook.
Stefan
- Re: save-excursion and the mark, (continued)
- Re: save-excursion and the mark, Richard Stallman, 2015/04/15
- Re: save-excursion and the mark, Phillip Lord, 2015/04/15
- Re: save-excursion and the mark, Oleh Krehel, 2015/04/19
- Re: save-excursion and the mark, Stefan Monnier, 2015/04/19
- Re: save-excursion and the mark, Andreas Röhler, 2015/04/20
save-excursion and the mark, Lars Magne Ingebrigtsen, 2015/04/17
- Re: save-excursion and the mark,
Stefan Monnier <=
Re: save-excursion and the mark, Frank Fischer, 2015/04/23