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

Re: Global but not special

On Oct 30,  6:25pm, Erann Gat wrote:
> Is there any way to declare a variable global without declaring it
> special?  I would likt to suppress "undeclared free variable" warnings
> for certain variables while maintaining lexical binding for those
> variables.

Try something like the following:

(let ((bar 'baz))
  (defun foo1 ...)
  (defmethod foo2 ...)

Then bar is a lexical variable which is global to both foo1 and foo2.

George Williams            BCS Huntsville Artificial Intelligence Center
Boeing Computer Services   Internet: george@hsvaic.boeing.com
POBox 240002, M/S JY-58    UUCP: ...!uw-beaver!bcsaic!hsvaic!george
Huntsville AL 35824-6402   Phone: 205+464-4968 FAX: 205+464-4930