aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPo Lu2023-03-28 09:41:22 +0800
committerPo Lu2023-03-28 09:41:22 +0800
commit64206ee3af9b59da9591aae400439bdea2cda09f (patch)
tree88c333f058f0afac551daca0d8cf2f2e9d8012ea /src
parent05f3f9c1c09c3e7a4d9c1d9ac16a34742a4124c1 (diff)
parent66b4394461589d0db8690b7971000f687bd3ad57 (diff)
downloademacs-64206ee3af9b59da9591aae400439bdea2cda09f.tar.gz
emacs-64206ee3af9b59da9591aae400439bdea2cda09f.zip
Merge remote-tracking branch 'origin/master' into feature/android
Diffstat (limited to 'src')
-rw-r--r--src/nsterm.m4
-rw-r--r--src/timefns.c9
-rw-r--r--src/treesit.c10
3 files changed, 18 insertions, 5 deletions
diff --git a/src/nsterm.m b/src/nsterm.m
index 0e75cbf3f0f..46007ec4fcb 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -8573,6 +8573,10 @@ ns_in_echo_area (void)
8573 return self; 8573 return self;
8574} 8574}
8575 8575
8576- (BOOL) validateToolbarItem: (NSToolbarItem *) toolbarItem
8577{
8578 return [toolbarItem isEnabled];
8579}
8576 8580
8577- (instancetype)toggleToolbar: (id)sender 8581- (instancetype)toggleToolbar: (id)sender
8578{ 8582{
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;
180static struct tm * 180static struct tm *
181emacs_localtime_rz (timezone_t tz, time_t const *t, struct tm *tm) 181emacs_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,
1016static void 1016static void
1017treesit_ensure_parsed (Lisp_Object parser) 1017treesit_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;