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

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

Re: How to get a file name with a warning like this


From: Emanuel Berg
Subject: Re: How to get a file name with a warning like this
Date: Sat, 29 Aug 2020 07:32:29 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Stefan Monnier wrote:

>> Warning (bytecomp): Use ‘with-current-buffer’ ....
>> rather than save-excursion+set-buffer
>
> Usually, this comes from the byte-compiler when
> it's called directly via `byte-compile` with an
> Elisp expression as argument, rather than by
> compiling a file, so the compiler has no idea which
> file it comes from. You might try `M-x
> trace-function RET byte-compile RET` but you have
> to do that before the warning is emitted.

OK, that explains it, sorry.

That said... even so, why not simply grep the entire
source for save-excursion and set-buffer ?

And fix every instance?

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




reply via email to

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