bindings: set up modern bindings also when binary's name starts with "e"

This allows activating the "modern" bindings without having to pass an
option, by simply invoking nano through a symlink -- for example: `en`
(short for "editor nano"), or `et` (short for "edit"), or just `e`.
This commit is contained in:
Benno Schulenberg 2023-02-23 16:47:04 +01:00
parent a27da0d75b
commit 580eaf29d6

View File

@ -1853,6 +1853,8 @@ int main(int argc, char **argv)
/* If the executable's name starts with 'r', activate restricted mode. */
if (*(tail(argv[0])) == 'r')
SET(RESTRICTED);
else if (*(tail(argv[0])) == 'e')
SET(MODERN_BINDINGS);
while ((optchr = getopt_long(argc, argv, "ABC:DEFGHIJ:KLMNOPQ:RS$T:UVWX:Y:Z"
"abcdef:ghijklmno:pqr:s:tuvwxy!%_0/", long_options, NULL)) != -1) {