Lugaru's Epsilon
Programmer's
Editor 14.04

Context:
Epsilon User's Manual and Reference
   Primitives and EEL Subroutines
      . . .
      Operating System Primitives
         System Primitives
         Window System Primitives
         Timing
         Calling Windows DLLs
         Running a Process
      Control Primitives
         . . .
         The Name Table
         Built-in and User Variables
         Buffer-specific Variables
         Bytecode Files
         Starting and Finishing
         . . .
      Input Primitives
         Keys
         The Mouse
         Window Events
         . . .
         Binding Primitives
      . . .

Previous   Up    Next
Built-in and User Variables  Primitives and EEL Subroutines   Bytecode Files


Epsilon User's Manual and Reference > Primitives and EEL Subroutines > Control Primitives >

Buffer-specific Variables

char use_default;

Epsilon's buffer-specific variables have a value for each buffer. They change when the current buffer changes. When you create a new buffer, you also automatically create a new copy of each buffer-specific variable. The initial value of each newly created buffer-specific variable is set from special default values Epsilon maintains. These values may be set using the variable use_default. When use_default is nonzero, referencing any buffer-specific variable accesses its default value, not the value for the current buffer. Otherwise, a value particular to the current buffer applies, as usual.

The normal way to reference a variable's default value is to use the ".default" syntax described in Scope of Variables, not to set use_default.

Window-specific variables have a separate value for each window. When you split a window, the newly created window initially has the same values for all variables as the original window. Each window-specific variable also has a default value, which can be referred to in the same way as buffer-specific variables, via the ".default" syntax described in Scope of Variables or by setting the use_default variable. Epsilon uses the default value to initialize the first window it creates, during startup, and when it creates pop-up windows.

Only the default values of window- and buffer-specific variables are saved in a state file.

copy_buffer_variables(int tobuf, int frombuf)
safe_copy_buffer_variables(int tobuf, int frombuf)

The copy_buffer_variables( ) primitive sets all buffer-specific variables in the buffer tobuf to their values in the buffer frombuf. If frombuf is zero, Epsilon resets all buffer-specific variables in the buffer tobuf to their default values. The safe_copy_buffer_variables( ) subroutine calls copy_buffer_variables( ), then clears the values of certain variables that should not be copied between buffers; generally these variables are spot variables that must always refer to positions within their own buffers.



Previous   Up    Next
Built-in and User Variables  Primitives and EEL Subroutines   Bytecode Files


Lugaru Epsilon Programmer's Editor 14.04 manual. Copyright (C) 1984, 2021 by Lugaru Software Ltd. All rights reserved.