[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
byte-compiler warnings
From: |
Joost Kremers |
Subject: |
byte-compiler warnings |
Date: |
Wed, 08 Dec 2010 15:28:09 -0000 |
User-agent: |
slrn/0.9.9p1 (Linux) |
hi all,
having upgraded to GNU Emacs 23.2.1, some of my elisp code that used to compile
without any messages now produces some warnings. the first is:
Function `copy-list' from cl package called at runtime
this one appears a couple of times, also for `gensym' and `evenp'.
i do require the cl package at compile time, but since copy-list, gensym and
evenp are functions, that of course doesn't help.
if i require the package at runtime, the byte compiler complains about it, too:
"cl package required at runtime"...
so isn't one supposed to use these functions at all, except in private code?
the second warning i get is:
`save-excursion' defeated by `set-buffer'
this applies to code chunks like the following:
(save-excursion
(set-buffer <some-buffe>
...
in each case, i can actually take out the save-excursion, i think, because the
save-excursion scopes until the end of the function it's in and that's where the
effect of set-buffer ends anyway. but it does make me curious, why this warning
never appeared in previous emacs versions. and looking at the elisp info files a
bit, i find that besides set-buffer there are also save-current-buffer and
with-current-buffer, which seem to do pretty much the same thing. anyone know
which function is preferred in which situation?
TIA
--
Joost Kremers joostkremers@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- byte-compiler warnings,
Joost Kremers <=