(setq internal-make-interpreted-closure-function
#'cconv-make-interpreted-closure))
(load "cus-start") ;Late to reduce customize-rogue (needs loaddefs.el anyway)
-(if (not (eq system-type 'ms-dos))
- (load "tooltip"))
+;; tooltip.el is now required even on DOS to compile certain Lisp files.
+(load "tooltip")
(load "international/iso-transl") ; Binds Alt-[ and friends.
;; Used by `kill-buffer', for instance.
return Qnil;
}
+#ifndef MSDOS
+
/* A buffer holding a string of the form "TZ=value", intended
to be part of the environment. If TZ is supposed to be unset,
the buffer string is "tZ=". */
static char *tzvalbuf;
+#endif /* !MSDOS */
+
/* Get the local time zone rule. */
char *
emacs_getenv_TZ (void)
{
+#ifndef MSDOS
return tzvalbuf[0] == 'T' ? tzvalbuf + tzeqlen : 0;
+#else /* MSDOS */
+ return getenv ("TZ");
+#endif /* MSDOS */
}
/* Set the local time zone rule to TZSTRING, which can be null to
int
emacs_setenv_TZ (const char *tzstring)
{
+#ifndef MSDOS
static ptrdiff_t tzvalbufsize;
ptrdiff_t tzstringlen = tzstring ? strlen (tzstring) : 0;
char *tzval = tzvalbuf;
xputenv (tzval);
return 0;
+#else /* MSDOS */
+ /* Happily, there are no threads on MS-DOS that might be contending
+ with Emacs for access to TZ. Call putenv to modify TZ: the code
+ above is not only unnecessary but results in modifications being
+ ommitted in consequence of an internal environment counter
+ remaining unchanged despite DJGPP being all too ready to reuse
+ preexisting environment storage. */
+ USE_SAFE_ALLOCA;
+ char *buf = SAFE_ALLOCA (tzeqlen + strlen (tzstring) + 1);
+ strcpy (buf, "TZ=");
+ strcpy (buf + tzeqlen, tzstring);
+ xputenv (buf);
+ SAFE_FREE ();
+ return 0;
+#endif /* MSDOS */
}
#ifdef NEED_ZTRILLION_INIT