Merge from origin/emacs-30
4b9a8fd607
etags-regen-file-extensions: Add .pm956f14ae5e
* src/treesit.c (treesit_debug_print_parser_list): Fix co...300d05ecb4
Type-check argument to network-lookup-address-info0f0f21b7f2
; Improve doc strings of options related to numbered backupsf0daa2f215
Conservative heuristic for tree-sitter parser ranges (bug...035024b4e5
; Fix treesit.c printing8771310a10
; * admin/notes/unicode: Need to run textsec-tests (bug#7...4c6f45fa8e
Re-enable GC mark trace buffer by defaultc607701589
; * src/haiku_support.cc: Correct last change.ae22ad7f62
; Add even more tests for previous commit460b9d705a
Fix treesit_sync_visible_region's range fixup code (bug#7...81347c1aaf
; * etc/PROBLEMS: Fix last change (bug#73207).a82b7f3e82
Document unavailability of frame geometry on Wayland
This commit is contained in:
commit
83b0e604ce
11 changed files with 130 additions and 45 deletions
|
@ -103,13 +103,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
|
||||
|
|
11
configure.ac
11
configure.ac
|
@ -782,6 +782,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.
|
||||
|
|
7
etc/NEWS
7
etc/NEWS
|
@ -31,6 +31,13 @@ host system supports SSE2) or '-fno-tree-sra' (if not). These GCC
|
|||
options work around GCC bug 58416, which can cause Emacs to behave
|
||||
incorrectly in rare cases.
|
||||
|
||||
---
|
||||
** 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 31.1
|
||||
|
||||
|
|
12
etc/PROBLEMS
12
etc/PROBLEMS
|
@ -3583,6 +3583,18 @@ 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' and 'frame-geometry' return incorrect information
|
||||
|
||||
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.
|
||||
|
||||
Some keys with modifiers such as Shift and Control might not be
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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'.
|
||||
|
|
|
@ -6860,11 +6860,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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -4710,6 +4710,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.
|
||||
|
@ -4729,6 +4732,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;
|
||||
|
|
|
@ -499,7 +499,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>: %td(%td)-(%td)%td {\n",
|
||||
msg == NULL ? "" : msg,
|
||||
SSDATA (SYMBOL_NAME (Vthis_command)),
|
||||
SSDATA (SYMBOL_NAME (XTS_PARSER (parser)->language_symbol)),
|
||||
|
@ -510,7 +510,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 %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,
|
||||
|
@ -1110,6 +1110,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)
|
||||
{
|
||||
|
@ -1122,9 +1123,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
|
||||
|
@ -1137,28 +1141,29 @@ treesit_sync_visible_region (Lisp_Object parser)
|
|||
if (end > visible_end)
|
||||
XSETCDR (range, make_fixnum (visible_end));
|
||||
}
|
||||
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))
|
||||
{
|
||||
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
|
||||
|
|
|
@ -711,7 +711,39 @@ 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, and discard the last one.
|
||||
(widen)
|
||||
(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, and discard the first one.
|
||||
(widen)
|
||||
(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)
|
||||
'((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)
|
||||
'((1 . 1)))))))
|
||||
|
||||
;;; Multiple language
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue