all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Joost Kremers <joostkremers@yahoo.com>
To: help-gnu-emacs@gnu.org
Subject: byte-compiler warnings
Date: 12 Sep 2010 18:12:53 GMT	[thread overview]
Message-ID: <slrni8q66f.j1u.joostkremers@j.kremers4.news.arnhem.chello.nl> (raw)

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)


             reply	other threads:[~2010-09-12 18:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-12 18:12 Joost Kremers [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-06-24  9:29 Byte-compiler warnings Marcin Borkowski
2015-06-24 23:50 ` Emanuel Berg
2015-06-25 12:56   ` Nicolas Richard
     [not found] ` <mailman.5606.1435189903.904.help-gnu-emacs@gnu.org>
2015-06-25  3:06   ` Stefan Monnier
     [not found] <mailman.5561.1435138202.904.help-gnu-emacs@gnu.org>
2015-06-24 11:27 ` Pascal J. Bourguignon
2015-06-25  1:52   ` Emanuel Berg
2015-06-25  2:30     ` Emanuel Berg
2015-06-25  3:19   ` Stefan Monnier
2015-06-25  3:42     ` Emanuel Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=slrni8q66f.j1u.joostkremers@j.kremers4.news.arnhem.chello.nl \
    --to=joostkremers@yahoo.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.