diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2023-03-27 17:16:58 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2023-03-27 17:16:58 -0400 |
commit | 616b22b5b95ce442ee343a18bfbf9ef18d8bb04f (patch) | |
tree | 5fd048b91fc3b4f65e47c6a838306af01942abdd /src | |
parent | cd62dc0dd2d371f45e6e0b4f031b7deb674edf39 (diff) | |
parent | 8f42db010d15efa21fb9007e61daedbe1e2dfa53 (diff) | |
download | emacs-616b22b5b95ce442ee343a18bfbf9ef18d8bb04f.tar.gz |
Merge from origin/emacs-29
8f42db010d1 Improve indenting "case" in Python
c4d490490dc ; * test/src/fns-tests.el: Fix last change
875e77a66a6 * test/infra/Dockerfile.emba (emacs-native-comp): Add zli...
64a2b0d36fe Fix failure of fns-tests-collate-strings on Cygwin
90fc6b987ad * lisp/savehist.el (savehist-save): Preserve shared struc...
08fbc133756 Adapt Tramp manual
accb3871668 Fix system time sampling on MS-Windows
33d436eefa1 Fix treesit_ensure_parsed (bug#62333)
d93a439846f * lisp/help-fns.el (find-lisp-object-file-name): Fix bug#...
be8147c53f9 Improve "Bugs" in the Emacs manual
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; static struct tm * emacs_localtime_rz (timezone_t tz, time_t const *t, struct tm *tm) { +#ifdef WINDOWSNT + /* The Windows CRT functions are "optimized for speed", so they don't + check for timezone and DST changes if they were last called less + than 1 minute ago (see http://support.microsoft.com/kb/821231). + So all Emacs features that repeatedly call time functions (e.g., + display-time) are in real danger of missing timezone and DST + changes. Calling tzset before each localtime call fixes that. */ + tzset (); +#endif tm = localtime_rz (tz, t, tm); if (!tm && errno == ENOMEM) 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, static void treesit_ensure_parsed (Lisp_Object parser) { - /* Make sure this comes before everything else, see comment - (ref:notifier-inside-ensure-parsed) for more detail. */ - if (!XTS_PARSER (parser)->need_reparse) - return; - struct buffer *buffer = XBUFFER (XTS_PARSER (parser)->buffer); /* Before we parse, catch up with the narrowing situation. */ @@ -1029,6 +1024,11 @@ treesit_ensure_parsed (Lisp_Object parser) because it might set the flag to true. */ treesit_sync_visible_region (parser); + /* Make sure this comes before everything else, see comment + (ref:notifier-inside-ensure-parsed) for more detail. */ + if (!XTS_PARSER (parser)->need_reparse) + return; + TSParser *treesit_parser = XTS_PARSER (parser)->parser; TSTree *tree = XTS_PARSER (parser)->tree; TSInput input = XTS_PARSER (parser)->input; |