Re: My sawfishrc
- From: Timo Korvola <Timo Korvola iki fi>
- To: sawfish-list gnome org
- Subject: Re: My sawfishrc
- Date: Sun, 4 Oct 2009 20:17:36 +0300
On Sunday 04 October 2009 14:31:59 Allan Duncan wrote:
> Would the equivalent of (defvar viewport-dimensions nil) therefore
> occur in sawfish.wm.gnome.integration or customize-command-classes
> then?
viewport-dimensions is defined in sawfish.wm.viewport with defcustom,
which also creates dynamically scoped variables.
> That however implies that (define-special-variable
> viewport-dimensions.. would create a new local scope
Local scopes are always limited by parentheses. E.g., (let ((foo bar))
body...) creates a local scope for body. So define-special-variable
does not create any scope.
> am I misinterpreting defvar as a variable definition and
> storage allocation?
defvar declares the variable to be dynamically scoped.
> And could you combine (defvar foo nil) (setq foo bar) as (defvar foo
> bar)?
Only if foo is not previously defined. If it is, defvar keeps the
previous value.
--
Timo Korvola <URL:http://www.iki.fi/tkorvola>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]