[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/editfns.c,v
From: |
Jason Rumney |
Subject: |
[Emacs-diffs] Changes to emacs/src/editfns.c,v |
Date: |
Fri, 14 Mar 2008 23:36:58 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Jason Rumney <jasonr> 08/03/14 23:36:58
Index: editfns.c
===================================================================
RCS file: /sources/emacs/emacs/src/editfns.c,v
retrieving revision 1.456
retrieving revision 1.457
diff -u -b -r1.456 -r1.457
--- editfns.c 26 Feb 2008 16:36:52 -0000 1.456
+++ editfns.c 14 Mar 2008 23:36:58 -0000 1.457
@@ -2011,6 +2011,11 @@
has never been called. */
static char **environbuf;
+/* This holds the startup value of the TZ environment variable so it
+ can be restored if the user calls set-time-zone-rule with a nil
+ argument. */
+static char *initial_tz;
+
DEFUN ("set-time-zone-rule", Fset_time_zone_rule, Sset_time_zone_rule, 1, 1, 0,
doc: /* Set the local time zone using TZ, a string specifying a time
zone rule.
If TZ is nil, use implementation-defined default time zone information.
@@ -2020,8 +2025,12 @@
{
char *tzstring;
+ /* When called for the first time, save the original TZ. */
+ if (!environbuf)
+ initial_tz = (char *) getenv ("TZ");
+
if (NILP (tz))
- tzstring = 0;
+ tzstring = initial_tz;
else if (EQ (tz, Qt))
tzstring = "UTC0";
else
@@ -4588,6 +4597,7 @@
syms_of_editfns ()
{
environbuf = 0;
+ initial_tz = 0;
Qbuffer_access_fontify_functions
= intern ("buffer-access-fontify-functions");
- [Emacs-diffs] Changes to emacs/src/editfns.c,v,
Jason Rumney <=