VariablePackage: exclToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Minimally revised from 10.0.
10.0 version


When this variable is true, the :flat option to defpackage and the flat keyword argument to make-package will be set to true when packages are defined. That option/argument specifies that names and nicknames are not hierarchical, despite possibly having dots (periods) in their names.

This variable is designed for systems which have package names containing dots which are not intended to be hierarchical. Those could be created with the :flat option/argument specified as true explicitly, but in large and complex systems, that might be inconvenient and error-prone.

While this variable is true, a warning is signaled whenever a package is defined without the :flat option/agument being specified. Further, the primary name of any package defined while *regard-package-names-as-flat* and no value is specified for :flat is pushed onto the value of *global-flat-package-option-used*.

When *regard-package-names-as-flat* is non-nil but (:flat nil) is specified to defpackage/:flat nil to make-package, a hierarchical package is created as usual (i.e. the variable is overridden).

cl-user(1): (setq excl:*regard-package-names-as-flat* t)
cl-user(2): excl:*global-flat-package-option-used*
cl-user(3): (defpackage :foo)
Warning: Defining :foo with :flat attribute because
         *regard-package-names-as-flat* is non-nil. See documentation
         on cl:defpackage in implementation.htm.
#<The foo package>
cl-user(4): excl:*global-flat-package-option-used*
cl-user(5): (defpackage :bar (:flat t))  ;; when :flat is specified, no warning
#<The bar package>
cl-user(6): excl:*global-flat-package-option-used*
("foo")  ;; and the package is not added to this list.

See Extensions to cl:make-package, cl:disassemble, cl:truename, cl:probe-file, cl:open, cl:apropos and cl:defpackage and cl:in-package, both in implementation.htm, for more information on extensions to defpackage and make-package. Flat if hierarchical packages are discusses in Hierarchical Packages in packages.htm.

Copyright (c) 1998-2017, Franz Inc. Oakland, CA., USA. All rights reserved.
This page has had minimal revisions compared to the 10.0 page.
Created 2017.2.15.

Allegro CL version 10.1
Minimally revised from 10.0.
10.0 version