#define EDITOR "/mnt/us/extensions/leafpad/bin/leafpad"
That reads to my like a define of the **default** editor.
Where 'EDITOR' is one of the standard *nix environment variables.
Try just resetting it to the path of the editor you want to use when running whatever program:
Code:
EDITOR=/path/name/and/file/name/of/editor whatever_program_name