From a82b7f3e8233905f924493180bcdaf29c42a39b9 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Sun, 15 Sep 2024 09:01:25 +0800 Subject: [PATCH 01/13] Document unavailability of frame geometry on Wayland * etc/PROBLEMS (Runtime problems specific to PGTK build): Document that frame-edges and company are liable not to return valid coordinates. (bug#73207) --- etc/PROBLEMS | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 841294ec7f1..964fef3b672 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -3583,6 +3583,14 @@ GTK_IM_MODULE. GTK does not allow programs to warp the pointer anymore. There is nothing that can be done about this problem. +** 'frame-edges' or 'frame-geometry' does not return correct frame origin positions. + +Rather, on Wayland, they return a position not distant from 0, 0, as the +Wayland protocol is specifically engineered not to reveal this +information to clients. By the same token, `frame-monitor-workarea', +and related geometry-querying functions, cannot establish the size of +the workarea and return a placeholder result. + ** Certain keys such as 'C-S-u' are not reported correctly. Some keys with modifiers such as Shift and Control might not be From 81347c1aaf25b27e78e8beee4bc818ad2c4e1b71 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 15 Sep 2024 07:55:20 +0300 Subject: [PATCH 02/13] ; * etc/PROBLEMS: Fix last change (bug#73207). --- etc/PROBLEMS | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 964fef3b672..d13d0d34128 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -3583,13 +3583,17 @@ GTK_IM_MODULE. GTK does not allow programs to warp the pointer anymore. There is nothing that can be done about this problem. -** 'frame-edges' or 'frame-geometry' does not return correct frame origin positions. +** 'frame-edges' and 'frame-geometry' return incorrect information -Rather, on Wayland, they return a position not distant from 0, 0, as the -Wayland protocol is specifically engineered not to reveal this -information to clients. By the same token, `frame-monitor-workarea', -and related geometry-querying functions, cannot establish the size of -the workarea and return a placeholder result. +The information returned by these and similar functions on Wayland about +frame position is incorrect. For example, 'frame-edges' can return zero +in the first 2 elements although the top-left corner of the frame is not +at pixel coordinates (0,0). This happens because the Wayland protocol +is specifically engineered not to reveal this information to clients. +For similar reasons, 'frame-monitor-workarea', +'frame-monitor-attributes', and related geometry-querying functions +cannot establish the size of the workarea, and return placeholder +results instead. ** Certain keys such as 'C-S-u' are not reported correctly. From 460b9d705ab482003fabe75b0fd1df223abe467c Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Sun, 15 Sep 2024 00:24:03 -0700 Subject: [PATCH 03/13] Fix treesit_sync_visible_region's range fixup code (bug#73264) new_ranges_head | v ( )->( )->( )->( )->( ) ^ ^ | | | lisp_ranges (loop head) | prev_cons -> set cdr to nil to cut of the rest result: ( )->( ) * src/treesit.c (treesit_sync_visible_region): Cut off this cons and the rest, not set the current range's end to nil. * test/src/treesit-tests.el: (treesit-range-fixup-after-edit): Add tests for all cases. --- src/treesit.c | 14 ++++++++++++-- test/src/treesit-tests.el | 32 +++++++++++++++++++++++++++++++- 2 files changed, 43 insertions(+), 3 deletions(-) diff --git a/src/treesit.c b/src/treesit.c index 9958d8a4c2a..628a4dff9cc 100644 --- a/src/treesit.c +++ b/src/treesit.c @@ -1064,6 +1064,7 @@ treesit_sync_visible_region (Lisp_Object parser) if (NILP (lisp_ranges)) return; Lisp_Object new_ranges_head = lisp_ranges; + Lisp_Object prev_cons = Qnil; FOR_EACH_TAIL_SAFE (lisp_ranges) { @@ -1076,9 +1077,12 @@ treesit_sync_visible_region (Lisp_Object parser) new_ranges_head = XCDR (new_ranges_head); else if (beg >= visible_end) { - /* Even the beg is after visible_end, dicard this range and all + /* Even the beg is after visible_end, discard this range and all the ranges after it. */ - XSETCDR (range, Qnil); + if (NILP (prev_cons)) + new_ranges_head = Qnil; + else + XSETCDR (prev_cons, Qnil); break; } else @@ -1091,12 +1095,18 @@ treesit_sync_visible_region (Lisp_Object parser) if (end > visible_end) XSETCDR (range, make_fixnum (visible_end)); } + prev_cons = lisp_ranges; } XTS_PARSER (parser)->last_set_ranges = new_ranges_head; if (NILP (new_ranges_head)) { + /* We are in a weird situation here: none of the previous ranges + overlaps with the new visible region. We don't have any good + options, so just throw the towel: just remove ranges and hope + lisp world will soon update with reasonable ranges or just + delete this parser. */ bool success; success = ts_parser_set_included_ranges (XTS_PARSER (parser)->parser, NULL, 0); diff --git a/test/src/treesit-tests.el b/test/src/treesit-tests.el index 98aaeb62781..68ed6ca751f 100644 --- a/test/src/treesit-tests.el +++ b/test/src/treesit-tests.el @@ -709,7 +709,37 @@ visible_end.)" '((1 . 7) (10 . 15)))) (narrow-to-region 5 13) (should (equal (treesit-parser-included-ranges parser) - '((5 . 7) (10 . 13))))))) + '((5 . 7) (10 . 13)))) + + ;; Narrow in front. + (widen) + (treesit-parser-set-included-ranges parser '((4 . 17))) + ;; 11111111111111111111 + ;; [ ] + ;; { } narrow + (narrow-to-region 1 8) + (should (equal (treesit-parser-included-ranges parser) + '((4 . 8)))) + + ;; Narrow in back. + (widen) + (treesit-parser-set-included-ranges parser '((4 . 17))) + ;; 11111111111111111111 + ;; [ ] + ;; { } narrow + (narrow-to-region 15 20) + (should (equal (treesit-parser-included-ranges parser) + '((15 . 17)))) + + ;; No overlap + (widen) + (treesit-parser-set-included-ranges parser '((15 . 20))) + ;; 11111111111111111111 + ;; [ ] + ;; { } narrow + (narrow-to-region 1 10) + (should (equal (treesit-parser-included-ranges parser) + nil))))) ;;; Multiple language From ae22ad7f624afa5e974059b8f2e78959402d8b3a Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Sun, 15 Sep 2024 00:42:41 -0700 Subject: [PATCH 04/13] ; Add even more tests for previous commit * test/src/treesit-tests.el: (treesit-range-fixup-after-edit): Make the tests trickier. --- test/src/treesit-tests.el | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/test/src/treesit-tests.el b/test/src/treesit-tests.el index 68ed6ca751f..6256b1d2fb9 100644 --- a/test/src/treesit-tests.el +++ b/test/src/treesit-tests.el @@ -711,21 +711,23 @@ visible_end.)" (should (equal (treesit-parser-included-ranges parser) '((5 . 7) (10 . 13)))) - ;; Narrow in front. + ;; Narrow in front, and discard the last one. (widen) - (treesit-parser-set-included-ranges parser '((4 . 17))) + (treesit-parser-set-included-ranges + parser '((4 . 10) (12 . 14) (16 . 20))) ;; 11111111111111111111 - ;; [ ] + ;; [ ] [ ] [ ] ;; { } narrow (narrow-to-region 1 8) (should (equal (treesit-parser-included-ranges parser) '((4 . 8)))) - ;; Narrow in back. + ;; Narrow in back, and discard the first one. (widen) - (treesit-parser-set-included-ranges parser '((4 . 17))) + (treesit-parser-set-included-ranges + parser '((1 . 5) (7 . 9) (11 . 17))) ;; 11111111111111111111 - ;; [ ] + ;; [ ] [ ] [ ] ;; { } narrow (narrow-to-region 15 20) (should (equal (treesit-parser-included-ranges parser) From c6077015894dd89c5aa3811bf55d3124394874d0 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Sun, 15 Sep 2024 16:28:38 +0800 Subject: [PATCH 05/13] ; * src/haiku_support.cc: Correct last change. --- src/haiku_support.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/haiku_support.cc b/src/haiku_support.cc index 4ea5e0884b9..a16b9bc10b0 100644 --- a/src/haiku_support.cc +++ b/src/haiku_support.cc @@ -340,18 +340,18 @@ keysym_from_raw_char (int32 raw, int32 key, unsigned *code) break; -#if B_HAIKU_VERSION >= B_HAIKU_VERSION_1_BETA_5 +#if B_HAIKU_VERSION >= B_HAIKU_VERSION_1_PRE_BETA_6 case B_HANGUL_KEY: -#else /* B_HAIKU_VERSION < B_HAIKU_VERSION_1_BETA_5 */ +#else /* B_HAIKU_VERSION < B_HAIKU_VERSION_1_PRE_BETA_6 */ case B_HANGUL: -#endif /* B_HAIKU_VERSION >= B_HAIKU_VERSION_1_BETA_5 */ +#endif /* B_HAIKU_VERSION >= B_HAIKU_VERSION_1_PRE_BETA_6 */ *code = KEY_HANGUL; break; -#if B_HAIKU_VERSION >= B_HAIKU_VERSION_1_BETA_5 +#if B_HAIKU_VERSION >= B_HAIKU_VERSION_1_PRE_BETA_6 case B_HANGUL_HANJA_KEY: -#else /* B_HAIKU_VERSION < B_HAIKU_VERSION_1_BETA_5 */ +#else /* B_HAIKU_VERSION < B_HAIKU_VERSION_1_PRE_BETA_6 */ case B_HANGUL: -#endif /* B_HAIKU_VERSION >= B_HAIKU_VERSION_1_BETA_5 */ +#endif /* B_HAIKU_VERSION >= B_HAIKU_VERSION_1_PRE_BETA_6 */ *code = KEY_HANGUL_HANJA; break; case B_KATAKANA_HIRAGANA: From 4c6f45fa8eef1a15d5790c1f3d3e608b548015db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Engdeg=C3=A5rd?= Date: Tue, 17 Sep 2024 13:07:01 +0200 Subject: [PATCH 06/13] Re-enable GC mark trace buffer by default Enable GC_REMEMBER_LAST_MARKED by default (it was disabled in Emacs 29) to make it easier to debug difficult-to-reproduce GC problems encountered by users. This increases GC costs by about 5 %, which can be avoided by turning the mark trace buffer back off using the new --disable-gc-mark-trace option. See discussion at https://lists.gnu.org/archive/html/emacs-devel/2024-09/msg00240.html * configure.ac (--disable-gc-mark-trace): New config option. * etc/NEWS: Mention it. * src/alloc.c: Enable it by default and avoid a compiler warning. --- configure.ac | 11 +++++++++++ etc/NEWS | 7 +++++++ src/alloc.c | 5 ++--- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index f63ef180c5b..5eaa1c7f962 100644 --- a/configure.ac +++ b/configure.ac @@ -776,6 +776,17 @@ AS_IF([test "$with_android" = no || test -n "$XCONFIGURE"],[ [android_enable_checking=yes export android_enable_checking])]) +AC_ARG_ENABLE([gc-mark-trace], + [AS_HELP_STRING([--disable-gc-mark-trace], + [disable the mark trace buffer used for debugging the Emacs + garbage collector])], + [ac_enable_gc_mark_trace="${enableval}"], + [ac_enable_gc_mark_trace=yes]) +if test "x$ac_enable_gc_mark_trace" = xyes ; then + AC_DEFINE([GC_REMEMBER_LAST_MARKED], [1], + [Define to 1 to enable GC mark trace buffer.]) +fi + dnl The name of this option is unfortunate. It predates, and has no dnl relation to, the "sampling-based elisp profiler" added in 24.3. dnl Actually, it stops it working. diff --git a/etc/NEWS b/etc/NEWS index 9b66e67c49a..2bb419ea129 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -55,6 +55,13 @@ and to resolve potential incompatibilities between GNU/Linux and *BSD versions of ALSA. Use '--with-sound=alsa' to build with ALSA on these operating systems instead. +--- +** New configuration option '--disable-gc-mark-trace'. +This disables the GC mark trace buffer for about 5 % better garbage +collection performance. Doing so may make it more difficult for Emacs +developers to help finding GC-related bugs that you run into, which is +why it the mark trace buffer is enabled by default. + * Startup Changes in Emacs 30.1 diff --git a/src/alloc.c b/src/alloc.c index 666f77bfce1..258a3d1aaf2 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -6849,11 +6849,10 @@ mark_glyph_matrix (struct glyph_matrix *matrix) } } -/* Whether to remember a few of the last marked values for debugging. */ -#define GC_REMEMBER_LAST_MARKED 0 - #if GC_REMEMBER_LAST_MARKED +/* Remember a few of the last marked values for debugging purposes. */ enum { LAST_MARKED_SIZE = 1 << 9 }; /* Must be a power of 2. */ +extern Lisp_Object last_marked[LAST_MARKED_SIZE]; Lisp_Object last_marked[LAST_MARKED_SIZE] EXTERNALLY_VISIBLE; static int last_marked_index; #endif From 8771310a10d528e01e1ff853c6b180af39b60620 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 17 Sep 2024 16:18:08 +0300 Subject: [PATCH 07/13] ; * admin/notes/unicode: Need to run textsec-tests (bug#73312). --- admin/notes/unicode | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/admin/notes/unicode b/admin/notes/unicode index 4a25d8159cb..bc1ae61840a 100644 --- a/admin/notes/unicode +++ b/admin/notes/unicode @@ -100,13 +100,19 @@ Specifically, the values of 'ucs-normalize-composition-exclusions' and verified against the latest Unicode data files. Next, test normalization functions against NormalizationTests.txt, -in the test/ directory run: +in the top-level directory run: - make lisp/international/ucs-normalize-tests + make -C test lisp/international/ucs-normalize-tests See commentary in test/lisp/international/ucs-normalize-tests.el regarding failing lines. +Changes in UTS#46 and other relevant Unicode data might break our +features that detect confusable and suspicious text, so run +test/lisp-international/textsec-tests to check that: + + make -C test lisp/international/textsec-tests + The file BidiCharacterTest.txt should be copied to the test suite, and if its format has changed, the file biditest.el there should be modified to follow suit. If there's trailing whitespace in From 035024b4e5a8eb759e30ce72ed3b83036f35525e Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Tue, 17 Sep 2024 20:53:36 -0700 Subject: [PATCH 08/13] ; Fix treesit.c printing * src/treesit.c (treesit_debug_print_parser_list): Use PRIuPTR so 32bit systems compile without warnings. --- src/treesit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/treesit.c b/src/treesit.c index 628a4dff9cc..8fc7385a3da 100644 --- a/src/treesit.c +++ b/src/treesit.c @@ -494,7 +494,7 @@ treesit_debug_print_parser_list (char *msg, Lisp_Object parser) { struct buffer *buf = XBUFFER (XTS_PARSER (parser)->buffer); char *buf_name = SSDATA (BVAR (buf, name)); - printf ("%s (%s) [%s] <%s>: %ld(%ld)-(%ld)%ld {\n", + printf ("%s (%s) [%s] <%s>: %"PRIuPTR"(%"PRIuPTR")-(%"PRIuPTR")%"PRIuPTR" {\n", msg == NULL ? "" : msg, SSDATA (SYMBOL_NAME (Vthis_command)), SSDATA (SYMBOL_NAME (XTS_PARSER (parser)->language_symbol)), @@ -505,7 +505,7 @@ treesit_debug_print_parser_list (char *msg, Lisp_Object parser) FOR_EACH_TAIL (tail) { struct Lisp_TS_Parser *parser = XTS_PARSER (XCAR (tail)); - printf ("[%s %s %s %ld-%ld T:%ld]\n", SSDATA (SYMBOL_NAME (parser->language_symbol)), + printf ("[%s %s %s %"PRIuPTR"-%"PRIuPTR" T:%"PRIuPTR"]\n", SSDATA (SYMBOL_NAME (parser->language_symbol)), SSDATA (SYMBOL_NAME (parser->tag)), parser->need_reparse ? "NEED-R" : "NONEED", parser->visible_beg, parser->visible_end, From f0daa2f2153a9d250d32ac1261a6fffb30860e31 Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Tue, 17 Sep 2024 21:17:13 -0700 Subject: [PATCH 09/13] Conservative heuristic for tree-sitter parser ranges (bug#73324) * src/treesit.c (treesit_sync_visible_region): If the parser's original ranges don't overlap with visible region, give it a zero range, rather than don't set any range. * test/src/treesit-tests.el (treesit-range-fixup-after-edit): Test new behavior. --- src/treesit.c | 41 +++++++++++++++++---------------------- test/src/treesit-tests.el | 2 +- 2 files changed, 19 insertions(+), 24 deletions(-) diff --git a/src/treesit.c b/src/treesit.c index 8fc7385a3da..84d903b027c 100644 --- a/src/treesit.c +++ b/src/treesit.c @@ -1098,31 +1098,26 @@ treesit_sync_visible_region (Lisp_Object parser) prev_cons = lisp_ranges; } + /* We are in a weird situation here: none of the previous ranges + overlaps with the new visible region. We don't have any good + options, so just throw the towel: just give the parser a zero + range. (Perfect filling!!) */ + if (NILP (new_ranges_head)) + new_ranges_head = Fcons (Fcons (make_fixnum (visible_beg), + make_fixnum (visible_beg)), + Qnil); + XTS_PARSER (parser)->last_set_ranges = new_ranges_head; - if (NILP (new_ranges_head)) - { - /* We are in a weird situation here: none of the previous ranges - overlaps with the new visible region. We don't have any good - options, so just throw the towel: just remove ranges and hope - lisp world will soon update with reasonable ranges or just - delete this parser. */ - bool success; - success = ts_parser_set_included_ranges (XTS_PARSER (parser)->parser, - NULL, 0); - eassert (success); - } - else - { - uint32_t len = 0; - TSRange *ts_ranges = treesit_make_ts_ranges (new_ranges_head, parser, - &len); - bool success; - success = ts_parser_set_included_ranges (XTS_PARSER (parser)->parser, - ts_ranges, len); - xfree (ts_ranges); - eassert (success); - } + uint32_t len = 0; + TSRange *ts_ranges = NULL; + ts_ranges = treesit_make_ts_ranges (new_ranges_head, parser, + &len); + bool success; + success = ts_parser_set_included_ranges (XTS_PARSER (parser)->parser, + ts_ranges, len); + xfree (ts_ranges); + eassert (success); } /* (ref:bytepos-range-pitfall) Suppose we have the following buffer diff --git a/test/src/treesit-tests.el b/test/src/treesit-tests.el index 6256b1d2fb9..24cd755fcf0 100644 --- a/test/src/treesit-tests.el +++ b/test/src/treesit-tests.el @@ -741,7 +741,7 @@ visible_end.)" ;; { } narrow (narrow-to-region 1 10) (should (equal (treesit-parser-included-ranges parser) - nil))))) + '((1 . 1))))))) ;;; Multiple language From 0f0f21b7f27265e7c9c3a47dc6c9042324f2b031 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 19 Sep 2024 08:20:04 +0300 Subject: [PATCH 10/13] ; Improve doc strings of options related to numbered backups * lisp/files.el (version-control, dired-kept-versions) (delete-old-versions, kept-old-versions, kept-new-versions): Doc fixes. --- lisp/files.el | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/lisp/files.el b/lisp/files.el index 6cbb1b5c632..a81f742bbb4 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -299,12 +299,12 @@ See also `backup-by-copying' and `backup-by-copying-when-linked'." :version "23.1") (defcustom version-control nil - "Control use of version numbers for backup files. -When t, make numeric backup versions unconditionally. -When nil, make them for files that have some already. -The value `never' means do not make them." + "Control use of version-numbered backup files. +When t, make numbered backup files unconditionally. +When nil, make them for files that already have numbered backups. +The value `never' means never make numbered backups." :type '(choice (const :tag "Never" never) - (const :tag "If existing" nil) + (const :tag "If numbered backups exist" nil) (other :tag "Always" t)) :safe #'version-control-safe-local-p :group 'backup) @@ -314,28 +314,36 @@ The value `never' means do not make them." (or (booleanp x) (equal x 'never))) (defcustom dired-kept-versions 2 - "When cleaning directory, number of versions to keep." + "When cleaning directory, number of versions of numbered backups to keep. +See `version-control', `kept-old-versions' and `kept-new-versions' for +more about keeping and deleting old versioned (a.k.a. \"numbered\") +backup files." :type 'natnum :group 'backup :group 'dired) (defcustom delete-old-versions nil - "If t, delete excess backup versions silently. -If nil, ask confirmation. Any other value prevents any trimming." + "If t, delete excess numbered backup files silently. +If nil, ask confirmation. Any other value prevents any trimming. +See `version-control', `kept-old-versions', `kept-new-versions' +and `dired-kept-versions' for more about keeping and deleting old +versioned (a.k.a. \"numbered\") backup files." :type '(choice (const :tag "Delete" t) (const :tag "Ask" nil) (other :tag "Leave" other)) :group 'backup) (defcustom kept-old-versions 2 - "Number of oldest versions to keep when a new numbered backup is made." + "Number of oldest versions to keep when a new numbered backup is made. +See `version-control' for how Emacs decides when to make numbered backups." :type 'natnum :safe #'natnump :group 'backup) (defcustom kept-new-versions 2 "Number of newest versions to keep when a new numbered backup is made. -Includes the new backup. Must be greater than 0." +Includes the new backup. Must be greater than 0. +See `version-control' for how Emacs decides when to make numbered backups." :type 'natnum :safe #'natnump :group 'backup) From 300d05ecb4cdd53eb8ae9c95f9db6909bb872e29 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Wed, 18 Sep 2024 17:19:28 +0200 Subject: [PATCH 11/13] Type-check argument to network-lookup-address-info * src/process.c (Fnetwork_lookup_address_info): Check that the "name" argument is a string, and mention 'puny-encode-domain'. (Bug#73337) --- src/process.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/process.c b/src/process.c index 9b44603c047..58ce0f3e6ed 100644 --- a/src/process.c +++ b/src/process.c @@ -4711,6 +4711,9 @@ network_lookup_address_info_1 (Lisp_Object host, const char *service, DEFUN ("network-lookup-address-info", Fnetwork_lookup_address_info, Snetwork_lookup_address_info, 1, 3, 0, doc: /* Look up Internet Protocol (IP) address info of NAME. +NAME must be an ASCII-only string. For looking up internationalized +hostnames, use `puny-encode-domain' on the string first. + Optional argument FAMILY controls whether to look up IPv4 or IPv6 addresses. The default of nil means both, symbol `ipv4' means IPv4 only, symbol `ipv6' means IPv6 only. @@ -4730,6 +4733,8 @@ returned from the lookup. */) struct addrinfo *res, *lres; struct addrinfo hints; + CHECK_STRING (name); + memset (&hints, 0, sizeof hints); if (NILP (family)) hints.ai_family = AF_UNSPEC; From 956f14ae5e999519e23a9a575b1d6616c744d802 Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Thu, 19 Sep 2024 10:27:21 +0200 Subject: [PATCH 12/13] * src/treesit.c (treesit_debug_print_parser_list): Fix compiler warning. --- src/treesit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/treesit.c b/src/treesit.c index 84d903b027c..679b8fc7ddd 100644 --- a/src/treesit.c +++ b/src/treesit.c @@ -494,7 +494,7 @@ treesit_debug_print_parser_list (char *msg, Lisp_Object parser) { struct buffer *buf = XBUFFER (XTS_PARSER (parser)->buffer); char *buf_name = SSDATA (BVAR (buf, name)); - printf ("%s (%s) [%s] <%s>: %"PRIuPTR"(%"PRIuPTR")-(%"PRIuPTR")%"PRIuPTR" {\n", + printf ("%s (%s) [%s] <%s>: %td(%td)-(%td)%td {\n", msg == NULL ? "" : msg, SSDATA (SYMBOL_NAME (Vthis_command)), SSDATA (SYMBOL_NAME (XTS_PARSER (parser)->language_symbol)), @@ -505,7 +505,7 @@ treesit_debug_print_parser_list (char *msg, Lisp_Object parser) FOR_EACH_TAIL (tail) { struct Lisp_TS_Parser *parser = XTS_PARSER (XCAR (tail)); - printf ("[%s %s %s %"PRIuPTR"-%"PRIuPTR" T:%"PRIuPTR"]\n", SSDATA (SYMBOL_NAME (parser->language_symbol)), + printf ("[%s %s %s %td-%td T:%td]\n", SSDATA (SYMBOL_NAME (parser->language_symbol)), SSDATA (SYMBOL_NAME (parser->tag)), parser->need_reparse ? "NEED-R" : "NONEED", parser->visible_beg, parser->visible_end, From 4b9a8fd607423726aea390a5fe25fd2307c937b6 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Fri, 20 Sep 2024 14:39:53 +0100 Subject: [PATCH 13/13] etags-regen-file-extensions: Add .pm * lisp/progmodes/etags-regen.el (etags-regen-file-extensions): Add .pm. --- lisp/progmodes/etags-regen.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/etags-regen.el b/lisp/progmodes/etags-regen.el index 21ea9bfb8b3..a8e67197070 100644 --- a/lisp/progmodes/etags-regen.el +++ b/lisp/progmodes/etags-regen.el @@ -118,7 +118,7 @@ We currently support only Emacs's etags program with this option." ;; when it cannot determine the type of the file. ;; http://lists.gnu.org/archive/html/emacs-devel/2018-01/msg00323.html (defcustom etags-regen-file-extensions - '("rb" "js" "py" "pl" "el" "c" "cpp" "cc" "h" "hh" "hpp" + '("rb" "js" "py" "pl" "pm" "el" "c" "cpp" "cc" "h" "hh" "hpp" "java" "go" "cl" "lisp" "prolog" "php" "erl" "hrl" "F" "f" "f90" "for" "cs" "a" "asm" "ads" "adb" "ada") "Code file extensions for `etags-regen-mode'.