Previous Section | Next Section | Table of Contents | Glossary | Index |
In Hemlock the "current" values of variables, key bindings and character-attributes depend on the current buffer and the modes active in it. There are three possible scopes for Hemlock values:
The value is present only if the buffer it is local to is the current buffer.
The value is present only when the mode it is local to is active in the current buffer.
The value is always present unless shadowed by a buffer or mode local value.
It is possible that there are different values for the same thing in in different scopes. For example, there be might a global binding for a given variable and also a local binding in the current buffer. Whenever there is a conflict, shadowing occurs, permitting only one of the values to be visible in the current environment.
The process of resolving such a conflict can be described as a search down a list of places where the value might be defined, returning the first value found. The order for the search is as follows:
Local values in the current buffer.
Mode local values in the minor modes of the current buffer, in order from the highest precedence mode to the lowest precedence mode. The order of minor modes with equal precedences is undefined.
Mode local values in the current buffer's major mode.
Global values.
Previous Section | Next Section | Table of Contents | Glossary | Index |