Re: [Sawfish] Why does my configure file report Warning ? |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/sawfish Archives
]
- To: sawfish@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [Sawfish] Why does my configure file report Warning ?
- From: Brian <oldminer@xxxxxxxxx>
- Date: Sun, 4 Dec 2011 14:39:44 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=ILIg4dIJ6IrgeNhQnHwKrL0UefctPhMh5OJpCoWkINU=; b=N7v9HIz8Z0ElKl7kDnLrqfAvNpy5dg2QGAfyIVwupyofn8+Qr4AsQ1cQM8+TvBO9pE DCXAZeOECX8GqJY71Y08OIvEMzHodQ/0S8q6ax/r9rc0HGahfEkJbqhVfoZvadN5HGJt acLQQ9amfQRW356diyZ8QBPU6hqYEmxxKBcVk=
On Fri, Nov 25, 2011 at 6:15 PM, z_axis <z_axis@xxxxxxx> wrote:
>> cat ~/.sawfish/my-init.jl
<<snip>>
> (setq restart-menu
> '(("ok" (system "sudo /sbin/shutdown -r now &"))
> ("cancel" (no-operation))))
>
> (setq logout-menu
> '(("ok" (quit)) ("cancel" (no-operation))))
>
> (setq quit-menu
> '(("ok" (system "sudo /sbin/shutdown -p now &"))
> ("cancel" (no-operation))))
>
> (setq main-menu
<<snip>>
>> sawfisawfish --batch -l compiler -f compile-batch my-init.jl
>
> my-init.jl:36: At top-level:
> my-init.jl:36: warning: referencing undeclared free variable `restart-menu'
> my-init.jl:40: warning: referencing undeclared free variable `logout-menu'
> my-init.jl:43: warning: referencing undeclared free variable `quit-menu'
> my-init.jl:52: warning: referencing undeclared free variable `main-menu'
You may want to read the section "Using global variables and
constants" in "Successful Lisp" at
http://www.psg.com/~dlamkins/sl/chapter04.html
In short, you need to use a (defvar ...) before you setq your global
variables to avoid this warning.
(defvar restart-menu nil)
(defvar logout-menu nil)
(defvar quit-menu nil)
(defvar main-menu nil)
Hope that helps!
-Brian
---
--
Sawfish ML