diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/timefns.c | 9 | ||||
| -rw-r--r-- | src/treesit.c | 10 |
2 files changed, 14 insertions, 5 deletions
diff --git a/src/timefns.c b/src/timefns.c index b3132e7bc34..87971cf4563 100644 --- a/src/timefns.c +++ b/src/timefns.c | |||
| @@ -180,6 +180,15 @@ static timezone_t const utc_tz = 0; | |||
| 180 | static struct tm * | 180 | static struct tm * |
| 181 | emacs_localtime_rz (timezone_t tz, time_t const *t, struct tm *tm) | 181 | emacs_localtime_rz (timezone_t tz, time_t const *t, struct tm *tm) |
| 182 | { | 182 | { |
| 183 | #ifdef WINDOWSNT | ||
| 184 | /* The Windows CRT functions are "optimized for speed", so they don't | ||
| 185 | check for timezone and DST changes if they were last called less | ||
| 186 | than 1 minute ago (see http://support.microsoft.com/kb/821231). | ||
| 187 | So all Emacs features that repeatedly call time functions (e.g., | ||
| 188 | display-time) are in real danger of missing timezone and DST | ||
| 189 | changes. Calling tzset before each localtime call fixes that. */ | ||
| 190 | tzset (); | ||
| 191 | #endif | ||
| 183 | tm = localtime_rz (tz, t, tm); | 192 | tm = localtime_rz (tz, t, tm); |
| 184 | if (!tm && errno == ENOMEM) | 193 | if (!tm && errno == ENOMEM) |
| 185 | memory_full (SIZE_MAX); | 194 | memory_full (SIZE_MAX); |
diff --git a/src/treesit.c b/src/treesit.c index 36a297ec7da..fd5fda78133 100644 --- a/src/treesit.c +++ b/src/treesit.c | |||
| @@ -1016,11 +1016,6 @@ treesit_call_after_change_functions (TSTree *old_tree, TSTree *new_tree, | |||
| 1016 | static void | 1016 | static void |
| 1017 | treesit_ensure_parsed (Lisp_Object parser) | 1017 | treesit_ensure_parsed (Lisp_Object parser) |
| 1018 | { | 1018 | { |
| 1019 | /* Make sure this comes before everything else, see comment | ||
| 1020 | (ref:notifier-inside-ensure-parsed) for more detail. */ | ||
| 1021 | if (!XTS_PARSER (parser)->need_reparse) | ||
| 1022 | return; | ||
| 1023 | |||
| 1024 | struct buffer *buffer = XBUFFER (XTS_PARSER (parser)->buffer); | 1019 | struct buffer *buffer = XBUFFER (XTS_PARSER (parser)->buffer); |
| 1025 | 1020 | ||
| 1026 | /* Before we parse, catch up with the narrowing situation. */ | 1021 | /* Before we parse, catch up with the narrowing situation. */ |
| @@ -1029,6 +1024,11 @@ treesit_ensure_parsed (Lisp_Object parser) | |||
| 1029 | because it might set the flag to true. */ | 1024 | because it might set the flag to true. */ |
| 1030 | treesit_sync_visible_region (parser); | 1025 | treesit_sync_visible_region (parser); |
| 1031 | 1026 | ||
| 1027 | /* Make sure this comes before everything else, see comment | ||
| 1028 | (ref:notifier-inside-ensure-parsed) for more detail. */ | ||
| 1029 | if (!XTS_PARSER (parser)->need_reparse) | ||
| 1030 | return; | ||
| 1031 | |||
| 1032 | TSParser *treesit_parser = XTS_PARSER (parser)->parser; | 1032 | TSParser *treesit_parser = XTS_PARSER (parser)->parser; |
| 1033 | TSTree *tree = XTS_PARSER (parser)->tree; | 1033 | TSTree *tree = XTS_PARSER (parser)->tree; |
| 1034 | TSInput input = XTS_PARSER (parser)->input; | 1034 | TSInput input = XTS_PARSER (parser)->input; |