emacs-devel
[Top][All Lists]
Advanced

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

Re: save-excursion again


From: Lennart Borgman
Subject: Re: save-excursion again
Date: Sat, 19 Jun 2010 16:58:22 +0200

On Sat, Jun 19, 2010 at 4:56 PM, Lennart Borgman
<address@hidden> wrote:
> On Sat, Jun 19, 2010 at 4:50 PM, Stephen J. Turnbull
> <address@hidden> wrote:
>> Uday S Reddy writes:
>>
>> The point is that if
>>
>>    ;; current buffer is "bar"
>>    (save-excursion
>>     (set-buffer "foo")
>>     (frob-current-buffer))
>
>
> Just a simple question from someone that does not understand:
>
> What is wrong with just saving the point in the buffer you are
> interested and then returning to that, i.e.
>
>  (let ((here (point)) ;; maybe (point-marker) sometimes
>    ...
>    (prog1

Eh...

(let ((here (point)))
   ...
   (prog1
        return_value
     (goto-char here)))



reply via email to

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