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

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

bug#48294: Use 'with-current-buffer' byte-compiler warning seems wrong


From: Eli Zaretskii
Subject: bug#48294: Use 'with-current-buffer' byte-compiler warning seems wrong
Date: Sun, 09 May 2021 19:11:13 +0300

> From: Robert Weiner <rsw@gnu.org>
> Date: Sun, 9 May 2021 11:57:25 -0400
> Cc: 48294@debbugs.gnu.org
> 
> Thanks for the feedback.  Everything you wrote is very clear.  The issue, 
> however, is that I want to save
> point in the current buffer prior to switching context to the 
> 'with-current-buffer' buffer, just as my
> (save-excursion (set-buffer ...)) code does.  If I move the save-excursion 
> into the with-current-buffer body,
> then it applies to the new buffer not the original one and if in that same 
> body we change buffers again to the
> original and move point, then that movement will stay in place.  So the 
> question is, what is the appropriate
> code that the byte-compiler will accept when you want to save your original 
> place before switching buffers. 

I don't understand: with-current-buffer doesn't change point of the
original buffer, so why do you need to save it?





reply via email to

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