Lugaru's Epsilon
Programmer's
Editor

Context:
Epsilon User's Manual and Reference
   Changes from Older Versions
      . . .
      New Features in Epsilon 12
         Unicode Support in Epsilon 12
         Language-Specific Enhancements in Epsilon 12
         More Programming Features in Epsilon 12
         . . .
         More Customization Options in Epsilon 12
      EEL Programming Changes in Epsilon 12
         EEL Changes for Unicode Support in Epsilon 12
         Other EEL Enhancements in Epsilon 12
         New EEL Primitives and Subroutines in Epsilon 12
         Changes to EEL Primitives and Subroutines in Epsilon 12
      New Features in Epsilon 11
         Highlights of Epsilon 11
         More Programming Enhancements in Epsilon 11
         File Enhancements in Epsilon 11
         . . .
         New Customization Options in Epsilon 11
      . . .

Previous   Up    Next
Other EEL Enhancements in Epsilon 12  Changes from Older Versions   Changes to EEL Primitives and Subroutines in Epsilon 12


Epsilon User's Manual and Reference > Changes from Older Versions > EEL Programming Changes in Epsilon 12 >

New EEL Primitives and Subroutines in Epsilon 12

int move_by_lines(int cnt)

The new move_by_lines( ) primitive quickly moves forward or backward over the specified number of lines, returning a count of the lines left to go when it hit the start or end of the buffer.

int pointer_to_index(void *)

The new pointer_to_index( ) primitive provides an inverse to the varptr( ) primitive. It takes a pointer to some name table global variable and returns its name table index.

int full_key;
int generic_key(int k)

The new full_key variable and generic_key( ) primitive helps support Epsilon's notion of generic keys.

buf_stuff(int bnum, char *s, int len)

The new buf_stuff( ) primitive provides a more convenient way to insert text that isn't null-terminated into an arbitrary buffer.

get_customization_directory(char *dir)

Epsilon now has an explicit notion of a customization directory where various user-specific files should be stored. The new get_customization_directory( ) primitive retrieves this setting.

delayed_say(int flags, int before, int after, char *fmt, ...)

The new delayed_say( ) primitive tells Epsilon to display some text later. It's intended for operations that may take some time to complete. EEL code may display a message provisionally before starting some potentially lengthy operation, telling Epsilon to display it only after a certain amount of time has elapsed, and then cancel the pending message when it finishes. The message will only appear if the operation actually took a long time.

The before parameter says how long to wait, in hundredths of a second, before displaying the message, which is built using the printf-style format string fmt and any following parameters. If the resulting message is zero-length, it simply cancels any delayed say message that has not yet been displayed.

If the before time elapses and the message hasn't been canceled, Epsilon displays it, ensuring it isn't overwritten by a following message for at least after hundredths of a second. Epsilon saves the message in the #messages# buffer if after is nonzero. If flags is 1, Epsilon positions the cursor after the message; otherwise it doesn't.

int perform_unicode_conversion(int buf, int from, int to,
                               int flags, char *encoding)
char *encoding_to_name(int enc)
int encoding_from_name(char *name)

The perform_conversion() primitive was replaced by the perform_unicode_conversion( ) primitive. It converts between Unicode and various 8-bit encodings.

Line translation values in variables like translation-type now include an encoding number in addition to a line translation code. See Line Translation Primitives for details. The new encoding_to_name( ) and encoding_from_name( ) primitives translate between encoding numbers and their names.

int set_character_property(int ch, int propcode, int value)

You can alter the rules Epsilon uses for determining if a particular character is alphabetic, uppercase, or lowercase, and how Epsilon case-folds when searching, sorting or otherwise comparing text, using the set_character_property( ) primitive (new in v12.01).

windows_foreground()
int windows_state()

The new windows_foreground( ) primitive tries to bring Epsilon's window to the front. When Epsilon receives a message from another instance (see Window System Primitives), it no longer does this internally; instead, EEL code calls this primitive to do it. The new windows_state( ) primitive indicates whether Epsilon's window is minimized or maximized.

int buffer_flags(int buf)

The new buffer_flags( ) primitive provides a way to check if Epsilon is storing a particular buffer in 8-bit or 16-bit format internally.

The new do_color_searching( ) subroutine and RE_IGNORE_COLOR macro support regular expression searching that includes color class assertions.

A buffer may be set to save its contents whenever Epsilon checks for unsaved buffers using the new save_without_prompt variable.

The new ask_3way( ) subroutine is similar to the ask_yn( ) subroutine, but prompts the user for one of three possible responses, using a dialog if possible.

The new call_with_arg_list( ) primitive can call an EEL subroutine passing it a list of arguments determined at run time.

The new screen_to_window_id( ) primitive returns the system's window id (for X) or window handle (for Windows) corresponding to a particular screen number.

The new (in v12.01) reject_client_connections variable disables Epsilon's server functions temporarily, which helps when one instance of Epsilon invokes another.

Other useful new subroutines include expand_string_template( ), break_into_numbers( ), grab_line_offset( ), current_time_and_date( ), set_spot( ), give_position_at_column( ), get_buf_modified( ), set_buf_modified( ), get_mode_based_index( ), load_eel_from_path( ), matches_in( ), buf_sort_and_uniq( ), and copy_key_table( ). See their individual descriptions for details.



Previous   Up    Next
Other EEL Enhancements in Epsilon 12  Changes from Older Versions   Changes to EEL Primitives and Subroutines in Epsilon 12


Lugaru Copyright (C) 1984, 2012 Lugaru Software Ltd. All Rights Reserved.