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