emacs-devel
[Top][All Lists]
Advanced

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

Science to suppress compiler warnings


From: Xavier Maillard
Subject: Science to suppress compiler warnings
Date: Wed, 03 Jun 2009 01:08:22 +0200
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (Sanjō) APEL/10.7 Emacs/23.0.93 (i486-slackware-linux-gnu) MULE/6.0 (HANACHIRUSATO)
User-agent: Rmail GNU emacs 23.0 on Slackware 12.2.0

Hi,

Elisp manual at "Compiler Errors" section (16.6) says we should
conditionalize variable use with a boundp test (same thing for
undefined function) but I find it very unpractical.

I thought (probably was wrong) that:

(eval-when-compile (defvar foo nil))

would do the trick. Is it the correct way to avoid warnings ?

Also while at it, here is what I got when compiling an old
package:

records.el:931:49:Warning: reference to free variable
`records-link-menu-map'

In records-mode:
records.el:1066:23:Warning: assignment to free variable
    `records-link-menu-map'

What is the difference between these two warnings exactly ?
Adding a defvar at the right place fixed that but to feed my
curiosity.

Regards,

Xavier




reply via email to

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