commit 8d67bdae59425fbc7dccd35b89c019c7757c1acd (HEAD, refs/remotes/origin/master) Author: Eli Zaretskii Date: Sat Jun 15 10:00:59 2024 +0300 ; * nt/README.W32: Remove Windows 95. diff --git a/nt/README.W32 b/nt/README.W32 index 98657246f67..4760d799498 100644 --- a/nt/README.W32 +++ b/nt/README.W32 @@ -55,7 +55,7 @@ See the end of the file for license conditions. * Prerequisites for Windows 9X - The 32-bit build supports MS-Windows 9X (Windows 95/98/Me). To run + The 32-bit build supports MS-Windows 9X (Windows 98/Me). To run Emacs on these versions of Windows, you will need to have the Microsoft Layer for Unicode (MSLU) installed. It can be downloaded from the Microsoft site, and comes in a form of a single dynamic commit f0f0f0fe43480a3df6c43ed52f910197041274f7 Author: Eli Zaretskii Date: Sat Jun 15 09:59:55 2024 +0300 ; * nt/README: Remove Windows 95. diff --git a/nt/README b/nt/README index 694e8854446..171655cf741 100644 --- a/nt/README +++ b/nt/README @@ -1,10 +1,10 @@ - Emacs for Windows NT/2000 and Windows 95/98/ME + Emacs for Windows NT/2000 and Windows 98/ME Copyright (C) 2001-2024 Free Software Foundation, Inc. See the end of the file for license conditions. This directory contains support for compiling and running GNU Emacs on - Windows NT, Windows 95, and their successors. This port supports all + Windows NT, Windows 98, and their successors. This port supports all of the major functionality of the Unix version, including subprocesses, windowing features (fonts, colors, scroll bars, multiple frames, etc.), and networking support. commit 25452986cbcf3db02cf0b5b624a03bc146b5d80c Author: Po Lu Date: Sat Jun 15 10:04:07 2024 +0800 Send proper substitution character to Android IMEs * src/androidterm.c (android_text_to_string): Substitute REPLACEMENT CHARACTER for NULL in converting characters not representable without surrogate pairs to UTF-16. diff --git a/src/androidterm.c b/src/androidterm.c index 6ae9a676f3c..730c832bb5b 100644 --- a/src/androidterm.c +++ b/src/androidterm.c @@ -5230,11 +5230,11 @@ android_text_to_string (JNIEnv *env, char *buffer, ptrdiff_t n, surrogate pairs. The hack used by Emacs is to simply replace each multibyte - character that doesn't fit in a jchar with the NULL - character. */ + character that doesn't fit in a jchar with the Unicode + replacement character. */ if (encoded >= 65536) - encoded = 0; + encoded = 0xfffd; utf16[index++] = encoded; buffer += BYTES_BY_CHAR_HEAD (*buffer); commit 1079d333ab7cb24b81e7ebc4087d2a11baa0097e Author: Arsen Arsenović Date: Sat Jun 15 02:18:56 2024 +0300 typescript/tsx-ts-mode: Indentation for type parameters * lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode--indent-rules): Add rule for type_parameters. diff --git a/lisp/progmodes/typescript-ts-mode.el b/lisp/progmodes/typescript-ts-mode.el index 74ed6aa2f94..3606a139d50 100644 --- a/lisp/progmodes/typescript-ts-mode.el +++ b/lisp/progmodes/typescript-ts-mode.el @@ -125,6 +125,7 @@ Argument LANGUAGE is either `typescript' or `tsx'." ((parent-is "switch_case") parent-bol typescript-ts-mode-indent-offset) ((parent-is "switch_default") parent-bol typescript-ts-mode-indent-offset) ((parent-is "type_arguments") parent-bol typescript-ts-mode-indent-offset) + ((parent-is "type_parameters") parent-bol typescript-ts-mode-indent-offset) ((parent-is ,(rx (or "variable" "lexical") "_" (or "declaration" "declarator"))) typescript-ts-mode--anchor-decl 1) ((parent-is "arguments") parent-bol typescript-ts-mode-indent-offset) commit 47746c1f3737fe3e079ceefc496e9601b6dbef32 Author: Eli Zaretskii Date: Fri Jun 14 21:44:56 2024 +0300 ; * src/insdel.c (insert_from_gap_1): Update commentary. diff --git a/src/insdel.c b/src/insdel.c index a10b7d3b7c8..c450959eec6 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -1094,7 +1094,7 @@ insert_from_string_1 (Lisp_Object string, ptrdiff_t pos, ptrdiff_t pos_byte, GPT_ADDR (if not text_at_gap_tail). Contrary to insert_from_gap, this does not invalidate any cache, nor update any markers, nor record any buffer modification information - of any sort. */ + of any sort, with the single exception of notifying tree-sitter. */ void insert_from_gap_1 (ptrdiff_t nchars, ptrdiff_t nbytes, bool text_at_gap_tail) { commit 0372ce5f60c18956738a31985569b86444d52ec5 Author: Eli Zaretskii Date: Fri Jun 14 21:42:18 2024 +0300 ; Update comments in a recent commit * src/process.c (read_and_insert_process_output): * src/insdel.c (insert_from_gap): * src/coding.h (struct coding_system): Improve comments (bug#71525). diff --git a/src/coding.h b/src/coding.h index d89257f23be..3dc1dc266ad 100644 --- a/src/coding.h +++ b/src/coding.h @@ -428,8 +428,9 @@ struct coding_system /* Set to true if charbuf contains an annotation. */ bool_bf annotated : 1; - /* True to insert before markers in the output buffer, - if `dst_object' is a buffer. */ + /* True if the decoded text should be inserted before markers in the + output buffer, if `dst_object' is a buffer. Currently used only + when reading output from subprocesses. */ bool_bf insert_before_markers : 1; /* Used internally in coding.c. See the comment of detect_ascii. */ diff --git a/src/insdel.c b/src/insdel.c index 80e692ba2af..a10b7d3b7c8 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -1131,9 +1131,8 @@ insert_from_gap_1 (ptrdiff_t nchars, ptrdiff_t nbytes, bool text_at_gap_tail) starting at GAP_END_ADDR - NBYTES (if text_at_gap_tail) and at GPT_ADDR (if not text_at_gap_tail). - If BEFORE_MARKERS is true, insert before markers. At the moment the - only high-level callers of this functionality is - read_and_insert_process_output in process.c. */ + If BEFORE_MARKERS is true, insert before markers. At the moment only + read_and_insert_process_output in process.c sets this to true. */ void insert_from_gap (ptrdiff_t nchars, ptrdiff_t nbytes, bool text_at_gap_tail, diff --git a/src/process.c b/src/process.c index 58d9f8162df..0167ceff7e0 100644 --- a/src/process.c +++ b/src/process.c @@ -6418,6 +6418,7 @@ read_and_insert_process_output (struct Lisp_Process *p, char *buf, specpdl_ref count1 = SPECPDL_INDEX (); XSETBUFFER (curbuf, current_buffer); + /* See the comment above about inserting before markers. */ process_coding->insert_before_markers = true; /* We cannot allow after-change-functions be run during decoding, because that might modify the commit 3b07d33059150671d0af1cc7b51fa7c8cc4b4ea1 Author: Eshel Yaron Date: Fri Jun 14 19:49:21 2024 +0200 ; Fix Icomplete error during candidate highlighting * lisp/icomplete.el (icomplete-completions): Pass completion candidates through 'completion-lazy-hilit' before trimming common prefix, rather than after. https://lists.gnu.org/archive/html/emacs-devel/2024-06/msg00271.html diff --git a/lisp/icomplete.el b/lisp/icomplete.el index aa3c5680a7e..2ea5e36fa88 100644 --- a/lisp/icomplete.el +++ b/lisp/icomplete.el @@ -1057,7 +1057,8 @@ matches exist." (setq determ (concat open-bracket "" close-bracket))) (while (and comps (not limit)) (setq comp - (if prefix-len (substring (car comps) prefix-len) (car comps)) + (let ((cur (completion-lazy-hilit (car comps)))) + (if prefix-len (substring cur prefix-len) cur)) comps (cdr comps)) (setq prospects-len (+ (string-width comp) @@ -1066,8 +1067,7 @@ matches exist." (if (< prospects-len prospects-max) (push comp prospects) (setq limit t))) - (setq prospects - (nreverse (mapcar #'completion-lazy-hilit prospects))) + (setq prospects (nreverse prospects)) ;; Decorate first of the prospects. (when prospects (let ((first (copy-sequence (pop prospects)))) commit a8d5c5fd8789f28ddd040e497f03a988e5f0703c Author: Dmitry Gutov Date: Fri Jun 14 19:50:59 2024 +0300 "Insert before markers" in read_and_insert_process_output properly * src/coding.c (setup_coding_system): Initialize it. (produce_chars, encode_coding, decode_coding_gap): Obey it in insert_from_gap calls. (encode_string_utf_8, decode_string_utf_8): Update the other calls to insert_from_gap to have one new argument (false). * src/coding.h: New field insert_before_markers. * src/decompress.c (Fzlib_decompress_region): Here too. * src/insdel.c (insert_from_gap): Accept new argument BEFORE_MARKERS (bug#71525) and pass it through to adjust_markers_for_insert. * src/lisp.h: Update prototype. * src/process.c (read_and_insert_process_output): Set process_coding->insert_before_markers instead of calling adjust_markers_for_insert. diff --git a/src/coding.c b/src/coding.c index 5e4e92ea6e2..b48164efc69 100644 --- a/src/coding.c +++ b/src/coding.c @@ -5698,6 +5698,7 @@ setup_coding_system (Lisp_Object coding_system, struct coding_system *coding) coding->default_char = XFIXNUM (CODING_ATTR_DEFAULT_CHAR (attrs)); coding->carryover_bytes = 0; coding->raw_destination = 0; + coding->insert_before_markers = 0; coding_type = CODING_ATTR_TYPE (attrs); if (EQ (coding_type, Qundecided)) @@ -7209,7 +7210,8 @@ produce_chars (struct coding_system *coding, Lisp_Object translation_table, produced = dst - (coding->destination + coding->produced); if (BUFFERP (coding->dst_object) && produced_chars > 0) - insert_from_gap (produced_chars, produced, 0); + insert_from_gap (produced_chars, produced, 0, + coding->insert_before_markers); coding->produced += produced; coding->produced_char += produced_chars; return carryover; @@ -7814,7 +7816,8 @@ encode_coding (struct coding_system *coding) } while (coding->consumed_char < coding->src_chars); if (BUFFERP (coding->dst_object) && coding->produced_char > 0) - insert_from_gap (coding->produced_char, coding->produced, 0); + insert_from_gap (coding->produced_char, coding->produced, 0, + coding->insert_before_markers); SAFE_FREE (); } @@ -8008,7 +8011,7 @@ decode_coding_gap (struct coding_system *coding, ptrdiff_t bytes) } coding->produced = bytes; coding->produced_char = chars; - insert_from_gap (chars, bytes, 1); + insert_from_gap (chars, bytes, 1, coding->insert_before_markers); return; } } @@ -9980,7 +9983,7 @@ encode_string_utf_8 (Lisp_Object string, Lisp_Object buffer, struct buffer *oldb = current_buffer; current_buffer = XBUFFER (buffer); - insert_from_gap (outbytes, outbytes, false); + insert_from_gap (outbytes, outbytes, false, false); current_buffer = oldb; } return val; @@ -10290,7 +10293,7 @@ decode_string_utf_8 (Lisp_Object string, const char *str, ptrdiff_t str_len, struct buffer *oldb = current_buffer; current_buffer = XBUFFER (buffer); - insert_from_gap (outchars, outbytes, false); + insert_from_gap (outchars, outbytes, false, false); current_buffer = oldb; } return val; diff --git a/src/coding.h b/src/coding.h index 8905e36838d..d89257f23be 100644 --- a/src/coding.h +++ b/src/coding.h @@ -428,6 +428,10 @@ struct coding_system /* Set to true if charbuf contains an annotation. */ bool_bf annotated : 1; + /* True to insert before markers in the output buffer, + if `dst_object' is a buffer. */ + bool_bf insert_before_markers : 1; + /* Used internally in coding.c. See the comment of detect_ascii. */ unsigned eol_seen : 3; diff --git a/src/decompress.c b/src/decompress.c index fcdbb40fc90..6c342e54355 100644 --- a/src/decompress.c +++ b/src/decompress.c @@ -310,7 +310,7 @@ This function can be called only in unibyte buffers. */) inflate_status = inflate (&stream, Z_NO_FLUSH); pos_byte += avail_in - stream.avail_in; decompressed = avail_out - stream.avail_out; - insert_from_gap (decompressed, decompressed, 0); + insert_from_gap (decompressed, decompressed, 0, false); unwind_data.nbytes += decompressed; maybe_quit (); } diff --git a/src/insdel.c b/src/insdel.c index fbf71e1e595..80e692ba2af 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -1129,10 +1129,15 @@ insert_from_gap_1 (ptrdiff_t nchars, ptrdiff_t nbytes, bool text_at_gap_tail) /* Insert a sequence of NCHARS chars which occupy NBYTES bytes starting at GAP_END_ADDR - NBYTES (if text_at_gap_tail) and at - GPT_ADDR (if not text_at_gap_tail). */ + GPT_ADDR (if not text_at_gap_tail). + + If BEFORE_MARKERS is true, insert before markers. At the moment the + only high-level callers of this functionality is + read_and_insert_process_output in process.c. */ void -insert_from_gap (ptrdiff_t nchars, ptrdiff_t nbytes, bool text_at_gap_tail) +insert_from_gap (ptrdiff_t nchars, ptrdiff_t nbytes, bool text_at_gap_tail, + bool before_markers) { ptrdiff_t ins_charpos = GPT, ins_bytepos = GPT_BYTE; @@ -1151,7 +1156,8 @@ insert_from_gap (ptrdiff_t nchars, ptrdiff_t nbytes, bool text_at_gap_tail) insert_from_gap_1 (nchars, nbytes, text_at_gap_tail); adjust_markers_for_insert (ins_charpos, ins_bytepos, - ins_charpos + nchars, ins_bytepos + nbytes, false); + ins_charpos + nchars, ins_bytepos + nbytes, + before_markers); if (buffer_intervals (current_buffer)) { diff --git a/src/lisp.h b/src/lisp.h index 21dada59132..59d8e497f13 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -4371,8 +4371,8 @@ extern void insert (const char *, ptrdiff_t); extern void insert_and_inherit (const char *, ptrdiff_t); extern void insert_1_both (const char *, ptrdiff_t, ptrdiff_t, bool, bool, bool); -extern void insert_from_gap_1 (ptrdiff_t, ptrdiff_t, bool text_at_gap_tail); -extern void insert_from_gap (ptrdiff_t, ptrdiff_t, bool text_at_gap_tail); +extern void insert_from_gap_1 (ptrdiff_t, ptrdiff_t, bool); +extern void insert_from_gap (ptrdiff_t, ptrdiff_t, bool, bool); extern void insert_from_string (Lisp_Object, ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_t, bool); extern void insert_from_buffer (struct buffer *, ptrdiff_t, ptrdiff_t, bool); diff --git a/src/process.c b/src/process.c index eb526311c53..58d9f8162df 100644 --- a/src/process.c +++ b/src/process.c @@ -6406,6 +6406,9 @@ read_and_insert_process_output (struct Lisp_Process *p, char *buf, if (NILP (BVAR (XBUFFER (p->buffer), enable_multibyte_characters)) && ! CODING_MAY_REQUIRE_DECODING (process_coding)) { + /* For compatibility with the long-standing behavior of + internal-default-process-filter we insert before markers, + both here and in the 'else' branch. */ insert_1_both (buf, nread, nread, 0, 0, 1); signal_after_change (PT - nread, 0, nread); } @@ -6415,6 +6418,7 @@ read_and_insert_process_output (struct Lisp_Process *p, char *buf, specpdl_ref count1 = SPECPDL_INDEX (); XSETBUFFER (curbuf, current_buffer); + process_coding->insert_before_markers = true; /* We cannot allow after-change-functions be run during decoding, because that might modify the buffer, while we rely on process_coding.produced to @@ -6423,9 +6427,6 @@ read_and_insert_process_output (struct Lisp_Process *p, char *buf, specbind (Qinhibit_modification_hooks, Qt); decode_coding_c_string (process_coding, (unsigned char *) buf, nread, curbuf); - adjust_markers_for_insert (PT, PT_BYTE, - PT + process_coding->produced_char, - PT_BYTE + process_coding->produced, true); unbind_to (count1, Qnil); read_process_output_set_last_coding_system (p, process_coding); commit 08e38818f6ff4e514ac291bc5a7686f4390759b0 Author: Dmitry Gutov Date: Fri Jun 14 18:24:04 2024 +0300 * lisp/progmodes/project.el: Bump the version diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 17550a83f95..b7c1698f50b 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -1,7 +1,7 @@ ;;; project.el --- Operations on the current project -*- lexical-binding: t; -*- ;; Copyright (C) 2015-2024 Free Software Foundation, Inc. -;; Version: 0.11.0 +;; Version: 0.11.1 ;; Package-Requires: ((emacs "26.1") (xref "1.7.0")) ;; This is a GNU ELPA :core package. Avoid functionality that is not commit 6a9f1b504a5a3c096afd17f3b8f8ebeca6a03ed5 Author: Eli Zaretskii Date: Fri Jun 14 14:38:01 2024 +0300 Fix generation of org.texi from org.org * doc/misc/Makefile.in (org_template): Bind 'org-id-track-globally' to nil when running 'org-texinfo-export-to-texinfo-batch', to avoid searching local user files when building the Org manual. diff --git a/doc/misc/Makefile.in b/doc/misc/Makefile.in index b26d3525a22..087742f6a9c 100644 --- a/doc/misc/Makefile.in +++ b/doc/misc/Makefile.in @@ -251,6 +251,7 @@ define org_template $${AM_V_GEN}cd "$${srcdir}" && $${emacs} -l ox-texinfo \ --eval '(setq gc-cons-threshold 50000000)' \ --eval '(setq org-confirm-babel-evaluate nil)' \ + --eval '(setq org-id-track-globally nil)' \ -f org-texinfo-export-to-texinfo-batch $$(notdir $$<) $$(notdir $$@) endef commit 11b145ac070217891b7ec939ce7821253887dac1 Author: Po Lu Date: Fri Jun 14 16:42:32 2024 +0800 Correct last change * lisp/term.el (term-generate-db-directory): Don't delete DST-DIRECTORY if not yet existent. diff --git a/lisp/term.el b/lisp/term.el index 80be0237640..0cfff4ef981 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -1728,10 +1728,11 @@ from the same directory to a temporary location, and return the latter." (when (file-newer-than-file-p src-directory dst-directory) (message "Generating Terminfo database...") (with-demoted-errors "Generating Terminfo database: %s" - ;; Arrange that the directory be writable. - (dolist (x (directory-files-recursively parent "" t t)) - (set-file-modes x #o700)) - (delete-directory dst-directory t) + (when (file-exists-p dst-directory) + ;; Arrange that the directory be writable. + (dolist (x (directory-files-recursively parent "" t t)) + (set-file-modes x #o700)) + (delete-directory dst-directory t)) (copy-directory src-directory dst-directory nil t t))) parent)))) commit f66341a13be57bec6c89f75d26444b42ca3f1ecf Author: Po Lu Date: Fri Jun 14 16:21:55 2024 +0800 Port term.el's terminfo machinery to Android * lisp/term.el (term-generate-db-directory): New function. Copy /assets/etc/e to the cache directory, on Android, and return the same. (term-exec-1): Call term-generate-db-directory in place of data-directory. diff --git a/lisp/term.el b/lisp/term.el index c15f6cf2e9f..80be0237640 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -1712,6 +1712,29 @@ Nil if unknown.") "case $BASH_VERSION in [0123].*|4.[0123].*) exit 43;; esac") (error 0))))))) +(defun term-generate-db-directory () + "Return the name of a directory holding Emacs's terminfo files. +If `data-directory' is accessible to subprocesses, as on systems besides +Android, return the same and no more. Otherwise, copy terminfo files +from the same directory to a temporary location, and return the latter." + (if (not (featurep 'android)) + data-directory + (progn + (let* ((dst-directory (expand-file-name "eterm-db/e" + temporary-file-directory)) + (parent (directory-file-name + (file-name-directory dst-directory))) + (src-directory (expand-file-name "e" data-directory))) + (when (file-newer-than-file-p src-directory dst-directory) + (message "Generating Terminfo database...") + (with-demoted-errors "Generating Terminfo database: %s" + ;; Arrange that the directory be writable. + (dolist (x (directory-files-recursively parent "" t t)) + (set-file-modes x #o700)) + (delete-directory dst-directory t) + (copy-directory src-directory dst-directory nil t t))) + parent)))) + ;; This auxiliary function cranks up the process for term-exec in ;; the appropriate environment. @@ -1725,7 +1748,8 @@ Nil if unknown.") (nconc (list (format "TERM=%s" term-term-name) - (format "TERMINFO=%s" data-directory) + (format "TERMINFO=%s" + (term-generate-db-directory)) (format term-termcap-format "TERMCAP=" term-term-name term-height term-width) commit 9c9afd5235782bd987dea12ab89fd91e661ec89e Author: Po Lu Date: Fri Jun 14 15:11:04 2024 +0800 Unconditionally prefer built-in decompression functions on Android * lisp/jka-compr.el (jka-compr-insert-file-contents): Prefer built-in decompression functions (i.e., zlib) to external agents. diff --git a/lisp/jka-compr.el b/lisp/jka-compr.el index 8e6d14cc290..0a14f0ab2b7 100644 --- a/lisp/jka-compr.el +++ b/lisp/jka-compr.el @@ -402,15 +402,22 @@ There should be no more than seven characters after the final `/'." (setq buffer-file-name filename)) (unwind-protect ; to make sure local-copy gets deleted - (progn - (and uncompress-message jka-compr-verbose (message "%s %s..." uncompress-message base-name)) - - (if (and (not (executable-find uncompress-program)) + (if (and (or (not (executable-find uncompress-program)) + ;; Android ships a bespoke version of gzip + ;; that is absolutely useless for Emacs's + ;; purposes, not supporting decompression or + ;; reading input from elsewhere than stdin. + ;; + ;; This is only true of early releases of the + ;; OS, but, since zlib is always available on + ;; Android, simply unconditionally prefer the + ;; built-in decompression function. + (eq system-type 'android)) uncompress-function (fboundp uncompress-function)) ;; If we don't have the uncompression program, then use the