emacs-devel
[Top][All Lists]
Advanced

[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: Mon, 23 Feb 2015 17:33:43 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> I have a package that might be using the feature.

Where and how?

> None of the tests were failing when I wrapped `save-excursion' like
> this:

>     (defmacro lispy-save-excursion (&rest body)
>       "More intuitive (`save-excursion' BODY)."
>       (declare (indent 0))
>       `(let ((activep (region-active-p))
>              (mark (mark))
>              (out (save-excursion
>                     ,@body)))
>          (when activep
>            (set-mark mark))
>          (when (bolp)
>            (back-to-indentation))
>          out))

Hmm... this seems to redundantly save&restore the mark.  What is this
supposed to illustrate/test?


        Stefan



reply via email to

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