Since last year ksh no longer sets the locale in main.c, so the diff
below is a no-op but removes 6k of text from a static ksh(1).

The emacs-usemeta flag is unused since 2012. I'm working on a diff to
kill it gracefully.

ok?


Index: emacs.c
===================================================================
RCS file: /d/cvs/src/bin/ksh/emacs.c,v
retrieving revision 1.70
diff -u -p -p -u -r1.70 emacs.c
--- emacs.c     25 Jun 2017 17:28:39 -0000      1.70
+++ emacs.c     29 Aug 2017 13:14:08 -0000
@@ -18,7 +18,6 @@
 #include <sys/stat.h>
 
 #include <ctype.h>
-#include <locale.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -1449,19 +1448,12 @@ x_bind(const char *a1, const char *a2,
 void
 x_init_emacs(void)
 {
-       char *locale;
-
        x_tty = 1;
        ainit(AEDIT);
        x_nextcmd = -1;
 
-       /* Determine if we can translate meta key or use 8-bit AscII
-        * XXX - It would be nice if there was a locale attribute to
-        * determine if the locale is 7-bit or not.
-        */
-       locale = setlocale(LC_CTYPE, NULL);
-       if (locale == NULL || !strcmp(locale, "C") || !strcmp(locale, "POSIX"))
-               Flag(FEMACSUSEMETA) = 1;
+       /* XXX unused */
+       Flag(FEMACSUSEMETA) = 1;
 
        /* new keybinding stuff */
        TAILQ_INIT(&kblist);

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to