From b93107c20b2899612c5c7a15187fc69866905e47 Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Wed, 9 Aug 2023 15:13:48 +0200 Subject: [PATCH 01/24] Fix emacs-lisp-native-compile-and-load eln target directory (bug#64226) * lisp/emacs-lisp/comp.el (comp-spill-lap-function): Don't use `byte+native-compile' to select output directory but always axpect it explicit through `native-compile-target-directory'. (batch-byte+native-compile): Set `native-compile-target-directory'. * test/src/comp-tests.el (comp-tests-bootstrap): Set `native-compile-target-directory'. --- lisp/emacs-lisp/comp.el | 9 ++++----- test/src/comp-tests.el | 6 ++++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 322df0e86a1..bdce4254bf5 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -1392,11 +1392,8 @@ clashes." (unless byte-to-native-top-level-forms (signal 'native-compiler-error-empty-byte filename)) (unless (comp-ctxt-output comp-ctxt) - (setf (comp-ctxt-output comp-ctxt) (comp-el-to-eln-filename - filename - (or native-compile-target-directory - (when byte+native-compile - (car (last native-comp-eln-load-path))))))) + (setf (comp-ctxt-output comp-ctxt) + (comp-el-to-eln-filename filename native-compile-target-directory))) (setf (comp-ctxt-speed comp-ctxt) (alist-get 'native-comp-speed byte-native-qualities) (comp-ctxt-debug comp-ctxt) (alist-get 'native-comp-debug @@ -4351,6 +4348,8 @@ variable \"NATIVE_DISABLED\" is set, only byte compile." (batch-byte-compile) (cl-assert (length= command-line-args-left 1)) (let* ((byte+native-compile t) + (native-compile-target-directory + (car (last native-comp-eln-load-path))) (byte-to-native-output-buffer-file nil) (eln-file (car (batch-native-compile)))) (comp-write-bytecode-file eln-file) diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el index b0d865292b7..0e36a3c9190 100644 --- a/test/src/comp-tests.el +++ b/test/src/comp-tests.el @@ -70,9 +70,11 @@ Check that the resulting binaries do not differ." :suffix "-comp-stage1.el" (ert-with-temp-file comp2-src :suffix "-comp-stage2.el" - (let* ((byte+native-compile t) ; FIXME HACK + (let* ((byte+native-compile t) + (native-compile-target-directory + (car (last native-comp-eln-load-path))) (comp-src (expand-file-name "../../../lisp/emacs-lisp/comp.el" - (ert-resource-directory))) + (ert-resource-directory))) ;; Can't use debug symbols. (native-comp-debug 0)) (copy-file comp-src comp1-src t) From 913e50aba6c8be86c762ad2f6491b81ca7e9cdfd Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 9 Aug 2023 17:35:24 +0300 Subject: [PATCH 02/24] Add native-compilation to Emacs Lisp mode menu * lisp/progmodes/elisp-mode.el (emacs-lisp-mode-menu): Add menu item for emacs-lisp-native-compile-and-load. --- lisp/progmodes/elisp-mode.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 956e3d30bce..1b42051ab93 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -84,6 +84,10 @@ All commands in `lisp-mode-shared-map' are inherited by this map." :help "Byte-compile the current file (if it has changed), then load compiled code"] ["Byte-recompile Directory..." byte-recompile-directory :help "Recompile every `.el' file in DIRECTORY that needs recompilation"] + ["Native-compile and Load" emacs-lisp-native-compile-and-load + :help "Compile the current file to native code, then load compiled native code" + :active (and (featurep 'native-compile) + (native-comp-available-p))] ["Disassemble Byte Compiled Object..." disassemble :help "Print disassembled code for OBJECT in a buffer"] "---" From 6d11b7b30076977fd30d4df6cd9ae16cc0a618e8 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Wed, 9 Aug 2023 16:48:54 +0200 Subject: [PATCH 03/24] Fix cross-reference to eldoc in eglot manual * doc/misc/eglot.texi (Eglot Features): Fix cross-reference to eldoc node in the Emacs manual. --- doc/misc/eglot.texi | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/misc/eglot.texi b/doc/misc/eglot.texi index 962e6c914ce..6eb212ca841 100644 --- a/doc/misc/eglot.texi +++ b/doc/misc/eglot.texi @@ -406,9 +406,10 @@ provides: At-point documentation: when point is at or near a symbol or an identifier, the information about the symbol/identifier, such as the signature of a function or class method and server-generated -diagnostics, is made available via the ElDoc package (@pxref{Lisp -Doc,,, emacs, GNU Emacs Manual}). This allows major modes to provide -extensive help and documentation about the program identifiers. +diagnostics, is made available via the ElDoc package +(@pxref{Programming Language Doc,,, emacs, GNU Emacs Manual}). This +allows major modes to provide extensive help and documentation about +the program identifiers. @item On-the-fly diagnostic annotations with server-suggested fixes, via the From 75c72e59f69c07948d367d09c11392981f30c488 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Thu, 10 Aug 2023 07:21:22 +0200 Subject: [PATCH 04/24] ; Fix typo --- lisp/help.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/help.el b/lisp/help.el index 6eac037df2c..7902a5c5b14 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -1479,7 +1479,7 @@ If PREFIX is non-nil, mention only keys that start with PREFIX. If TITLE is non-nil, is a string to insert at the beginning. TITLE should not end with a colon or a newline; we supply that. -If NOMENU is non-nil, then omit menu-bar commands. +If NO-MENU is non-nil, then omit menu-bar commands. If TRANSL is non-nil, the definitions are actually key translations so print strings and vectors differently. From 97b8ac376b55ad48a8e66e9ab3975f81bc8cbfab Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 10 Aug 2023 09:06:05 +0300 Subject: [PATCH 05/24] Fix the effects and documentation of 'dired-free-space' * lisp/dired.el (dired-free-space): Fix doc string and Custom tags. (dired--insert-disk-space): When 'dired-free-space' is 'separate', return the position of the beginning of the disk-space line, to be compatible with pre-Emacs 29 behavior under 'dired-hide-details-mode'. (Bug#65186) * doc/emacs/dired.texi (Misc Dired Features): Fix wording in documentation of 'dired-free-space'. --- doc/emacs/dired.texi | 17 +++++++++++------ lisp/dired.el | 24 ++++++++++++++++-------- 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi index 77c4e09c826..c20c221cd78 100644 --- a/doc/emacs/dired.texi +++ b/doc/emacs/dired.texi @@ -1726,12 +1726,17 @@ rotation is lossless, and uses an external utility called @section Other Dired Features @vindex dired-free-space - By default, Dired will display the available space on the disk in -the first line. This is the @code{first} value of the -@code{dired-free-space} variable. If you set this to -@code{separate} instead, Dired will display this on a separate line -(including the space the files in the current directory takes). If -you set this to @code{nil}, the free space isn't displayed at all. + By default, Dired displays the available space on the directory's +disk on the first line of that directory listing, following the +directory name. You can control this display by customizing the +variable @code{dired-free-space}. Its default value is @code{first}, +which produces the available space after the directory name. If you +customize it to the value @code{separate} instead, Dired will display +the disk space information on a separate line, following the line with +the directory name, and will include in that line the space used by +the files in the current directory as well as the available disk +space. If you set this to @code{nil}, the available disk space +information will not be displayed at all. @kindex + @r{(Dired)} @findex dired-create-directory diff --git a/lisp/dired.el b/lisp/dired.el index d0af05d68f0..4c2e9243e6c 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -218,14 +218,19 @@ If t, they are marked if and as the files linked to were marked. If a character, new links are unconditionally marked with that character.") (defcustom dired-free-space 'first - "Whether and how to display the amount of free disk space in Dired buffers. + "Whether and how to display the disk space usage info in Dired buffers. If nil, don't display. -If `separate', display on a separate line (along with used count). -If `first', display only the free disk space on the first line, -following the directory name." - :type '(choice (const :tag "On a separate line" separate) - (const :tag "On the first line, after directory name" first) - (const :tag "Don't display" nil)) +If `separate', display on a separate line, and include both the used +and the free disk space. +If `first', the default, display only the free disk space on the first +line, following the directory name." + :type '(choice (const + :tag + "On separate line, display both used and free space" separate) + (const + :tag + "On first line, after directory name, display only free space" first) + (const :tag "Don't display disk space usage" nil)) :version "29.1" :group 'dired) @@ -1769,7 +1774,10 @@ see `dired-use-ls-dired' for more details.") ((eq dired-free-space 'separate) (end-of-line) (insert " available " available) - (forward-line 1) + ;; The separate free-space line is considered part of the + ;; directory content, for the purposes of + ;; 'dired-hide-details-mode'. + (beginning-of-line) (point)) ((eq dired-free-space 'first) (goto-char beg) From d06fc72496f7ec6dc166b264e9a2acae88488733 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 10 Aug 2023 09:08:59 +0300 Subject: [PATCH 06/24] ; * doc/emacs/dired.texi (Misc Dired Features): Fix last change. --- doc/emacs/dired.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi index c20c221cd78..05e12f56668 100644 --- a/doc/emacs/dired.texi +++ b/doc/emacs/dired.texi @@ -1727,7 +1727,7 @@ rotation is lossless, and uses an external utility called @vindex dired-free-space By default, Dired displays the available space on the directory's -disk on the first line of that directory listing, following the +disk on the first line of that directory's listing, following the directory name. You can control this display by customizing the variable @code{dired-free-space}. Its default value is @code{first}, which produces the available space after the directory name. If you From 5a7fb0b39b7059e6ff3c9a9e7641c80cf3a48459 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Thu, 10 Aug 2023 15:31:03 +0800 Subject: [PATCH 07/24] Document that `set-mouse-color' does not work everywhere * etc/PROBLEMS (Miscellaneous Problems): Mention where `set-mouse-color' does not work. --- etc/PROBLEMS | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 4c75cfc62b6..a2d3d687998 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -575,6 +575,20 @@ This can happen with CVS versions 1.12.8 and 1.12.9. Upgrade to CVS ** Miscellaneous problems +*** 'set-mouse-color' and the '-ms' command line argument do not work. + +Systems where the default cursors are not simple 1 bit-per-pixel +bitmaps usually forbid recoloring the cursor, since it is unclear +which colors should replace those already present within each cursor +image. For example, 'set-mouse-color' and '-ms' have no function on X +systems with GNOME, KDE, and other recent desktop environments +employing cursor images containing colors and partial transparency. + +Changing the cursor color is also impossible on MS-Windows and PGTK +systems. In the former case, it is because the prerequisite code has +yet to be written. In the latter, it is because GTK does not provide +for changing the color of cursor images. + *** Display artifacts on GUI frames on X-based systems. This is known to be caused by using double-buffering (which is enabled From 063d7d89d7ae053be611f4de3d1baceddf407c07 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 10 Aug 2023 10:50:35 +0300 Subject: [PATCH 08/24] Fix the -x switch in non-X builds * src/emacs.c (main): Move the handling of the -x switch out of the HAVE_X_WINDOWS condition, and simplify the rest of the code by avoiding code duplication in HAVE_X_WINDOWS and !HAVE_X_WINDOWS cases. (Bug#65048) --- src/emacs.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/src/emacs.c b/src/emacs.c index e63b0924282..dde305edbc2 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -2007,15 +2007,16 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem } #endif /* HAVE_NS */ -#ifdef HAVE_X_WINDOWS /* Stupid kludge to catch command-line display spec. We can't handle this argument entirely in window system dependent code because we don't even know which window system dependent code to run until we've recognized this argument. */ { - char *displayname = 0; int count_before = skip_args; +#ifdef HAVE_X_WINDOWS + char *displayname = 0; + /* Skip any number of -d options, but only use the last one. */ while (!only_version) { @@ -2045,12 +2046,15 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem } argv[count_before + 1] = (char *) "-d"; } +#endif /* HAVE_X_WINDOWS */ if (! no_site_lisp) { - if (argmatch (argv, argc, "-Q", "--quick", 3, NULL, &skip_args) + + if (argmatch (argv, argc, "-Q", "--quick", 3, NULL, &skip_args) || argmatch (argv, argc, "-quick", 0, 2, NULL, &skip_args)) - no_site_lisp = 1; + no_site_lisp = 1; + } if (argmatch (argv, argc, "-x", 0, 1, &junk, &skip_args)) @@ -2066,18 +2070,6 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem /* Don't actually discard this arg. */ skip_args = count_before; } -#else /* !HAVE_X_WINDOWS */ - if (! no_site_lisp) - { - int count_before = skip_args; - - if (argmatch (argv, argc, "-Q", "--quick", 3, NULL, &skip_args) - || argmatch (argv, argc, "-quick", 0, 2, NULL, &skip_args)) - no_site_lisp = 1; - - skip_args = count_before; - } -#endif /* argmatch must not be used after here, except when building temacs From 173af0cad514b7fa7b71580caa5e59241098607f Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Thu, 10 Aug 2023 10:18:43 +0200 Subject: [PATCH 09/24] * Introduce `emacs-lisp-native-compile'. * lisp/progmodes/elisp-mode.el (emacs-lisp-native-compile): New command. (emacs-lisp-native-compile-and-load): Make use of. --- lisp/progmodes/elisp-mode.el | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 1b42051ab93..5343be48bb3 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -221,6 +221,16 @@ All commands in `lisp-mode-shared-map' are inherited by this map." (declare-function native-compile "comp") (declare-function comp-write-bytecode-file "comp") +(defun emacs-lisp-native-compile () + "Native-compile synchronously the current file (if it has changed)." + (interactive nil emacs-lisp-mode) + (emacs-lisp--before-compile-buffer) + (let* ((byte+native-compile t) + (byte-to-native-output-buffer-file nil) + (eln (native-compile buffer-file-name))) + (when eln + (comp-write-bytecode-file eln)))) + (defun emacs-lisp-native-compile-and-load () "Native-compile synchronously the current file (if it has changed). Load the compiled code when finished. @@ -229,11 +239,8 @@ Use `emacs-lisp-byte-compile-and-load' in combination with `native-comp-jit-compilation' set to t to achieve asynchronous native compilation." (interactive nil emacs-lisp-mode) - (emacs-lisp--before-compile-buffer) - (let ((byte+native-compile t) - (byte-to-native-output-buffer-file nil)) - (when-let ((eln (native-compile buffer-file-name))) - (load (file-name-sans-extension (comp-write-bytecode-file eln)))))) + (when-let ((byte-file (emacs-lisp-native-compile))) + (load (file-name-sans-extension byte-file)))) (defun emacs-lisp-macroexpand () "Macroexpand the form after point. From 4535aafa8a34b659e4ab18f0188fc8d9332f4e97 Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Thu, 10 Aug 2023 10:34:01 +0200 Subject: [PATCH 10/24] * lisp/progmodes/elisp-mode.el (emacs-lisp-mode-menu): Simplify condition. --- lisp/progmodes/elisp-mode.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 5343be48bb3..4d92bed6236 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -86,8 +86,7 @@ All commands in `lisp-mode-shared-map' are inherited by this map." :help "Recompile every `.el' file in DIRECTORY that needs recompilation"] ["Native-compile and Load" emacs-lisp-native-compile-and-load :help "Compile the current file to native code, then load compiled native code" - :active (and (featurep 'native-compile) - (native-comp-available-p))] + :active (native-comp-available-p)] ["Disassemble Byte Compiled Object..." disassemble :help "Print disassembled code for OBJECT in a buffer"] "---" From 889cfb42ed9e857a7e813bb356bb2b5e588c89c0 Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Thu, 10 Aug 2023 10:39:14 +0200 Subject: [PATCH 11/24] * Add `emacs-lisp-native-compile' to easy-menu. * lisp/progmodes/elisp-mode.el (emacs-lisp-mode-menu): Add menu item for emacs-lisp-native-compile. --- lisp/progmodes/elisp-mode.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 4d92bed6236..bd3916ce108 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -84,6 +84,9 @@ All commands in `lisp-mode-shared-map' are inherited by this map." :help "Byte-compile the current file (if it has changed), then load compiled code"] ["Byte-recompile Directory..." byte-recompile-directory :help "Recompile every `.el' file in DIRECTORY that needs recompilation"] + ["Native-compile This File" emacs-lisp-native-compile + :help "Compile the current file containing the current buffer to native code" + :active (native-comp-available-p)] ["Native-compile and Load" emacs-lisp-native-compile-and-load :help "Compile the current file to native code, then load compiled native code" :active (native-comp-available-p)] From 71bc060e4031bee83ec79354bff526fa8a27a81d Mon Sep 17 00:00:00 2001 From: dannyfreeman Date: Mon, 7 Aug 2023 15:55:27 -0400 Subject: [PATCH 12/24] Properly expand the JSX indentation rules in 'js-ts-mode' * lisp/progmodes/js.el (js--treesit-indent-rules): Fix 'js-ts-mode' indent bug in JSX expressions. Before this change, treesit indent mechanisms were trying to call this compatibility function like a matching or anchor rule. This resulted in an error when running `indent-for-tab-command` while the cursor was in a JSX expression: treesit--simple-indent-eval: Wrong number of arguments: ((cl-struct-js--pitem-tags ido-cur-list t) nil "Indent rules helper, to handle different releases of tree-sitter-javascript." (Bug#65134) --- lisp/progmodes/js.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index bbe3159f596..c583b6f6191 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -3474,7 +3474,7 @@ Check if a node type is available, then return the right indent rules." ((parent-is "statement_block") parent-bol js-indent-level) ;; JSX - (js-jsx--treesit-indent-compatibility-bb1f97b) + ,@(js-jsx--treesit-indent-compatibility-bb1f97b) ((node-is "jsx_closing_element") parent 0) ((match "jsx_element" "statement") parent js-indent-level) ((parent-is "jsx_element") parent js-indent-level) From bccf848b26c2f3d899e739c78ce1bb195ef6cfaf Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Thu, 10 Aug 2023 12:17:59 +0200 Subject: [PATCH 13/24] Adapt Tramp test * test/lisp/net/tramp-tests.el (tramp-test41-special-characters): Skip for macOS. --- test/lisp/net/tramp-tests.el | 1 + 1 file changed, 1 insertion(+) diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index c090fec8b2a..6021eda8dff 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -7404,6 +7404,7 @@ This requires restrictions of file name syntax." (skip-unless (not (getenv "EMACS_HYDRA_CI"))) ; SLOW ~ 245s (skip-unless (not (tramp--test-rsync-p))) (skip-unless (not (tramp--test-rclone-p))) + (skip-unless (not (or (eq system-type 'darwin) (tramp--test-macos-p)))) ;; Newlines, slashes and backslashes in file names are not ;; supported. So we don't test. And we don't test the tab From 344ac529ca9a452cbb01c120fb70410f56b459f7 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Thu, 10 Aug 2023 12:42:30 +0200 Subject: [PATCH 14/24] ; * etc/PROBLEMS: Fix typo. --- etc/PROBLEMS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/PROBLEMS b/etc/PROBLEMS index a2d3d687998..418962174ec 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -516,7 +516,7 @@ directory copy is ineffective. This is due to an arbitrary limit in certain versions of awk. The solution is to use gawk (GNU awk). -*** Saving a file encrypted with GnuPG via EasyPG hangs +*** Saving a file encrypted with GnuPG via EasyPG hangs. This is known to happen with GnuPG v2.4.1. The only known workaround is to downgrade to a version of GnuPG older than 2.4.1 (or, in the From 9091f42784b35fabb947621f665feb5a58e03eeb Mon Sep 17 00:00:00 2001 From: Gregory Heytings Date: Thu, 10 Aug 2023 17:34:40 +0000 Subject: [PATCH 15/24] ; * admin/git-bisect-start: Update failing commits --- admin/git-bisect-start | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/admin/git-bisect-start b/admin/git-bisect-start index 9de4d547323..2ffb79088bc 100755 --- a/admin/git-bisect-start +++ b/admin/git-bisect-start @@ -82,7 +82,7 @@ done # SKIP-BRANCH 58cc931e92ece70c3e64131ee12a799d65409100 ## The list below is the exhaustive list of all commits between Dec 1 -## 2016 and Jul 8 2023 on which building Emacs with the default +## 2016 and Aug 9 2023 on which building Emacs with the default ## options, on a GNU/Linux computer and with GCC, fails. It is ## possible (though unlikely) that building Emacs with non-default ## options, with other compilers, or on other platforms, would succeed @@ -1757,3 +1757,27 @@ $REAL_GIT bisect skip $(cat $0 | grep '^# SKIP-SINGLE ' | sed 's/^# SKIP-SINGLE # SKIP-SINGLE 0a35c991c19a6dd0a707f2baa868f8989242c3ab # SKIP-SINGLE e2ee646b162b87e832c8032b9d90577bd21f21f8 # SKIP-SINGLE 35d2fe176cb438d55552cacbdf25c3692c054d51 +# SKIP-SINGLE 50649a6d1a208b7814a5fc9f0c882442502311e6 +# SKIP-SINGLE de3d8ae71b43f80244c4d813ff1503b8551f0026 +# SKIP-SINGLE a496509cedb17109d0e6297a74e2ff8ed526333c +# SKIP-SINGLE a6a586ffc1bd302e30d80cb88b06e1e7e1573f63 +# SKIP-SINGLE f5d142f66370b29af58360faeea90d1112756bc5 +# SKIP-SINGLE e1874c4e8bff165abc5c2e842b4381b65da67ebb +# SKIP-SINGLE 46e8ab23eaeb5e453042f430fc016cf9ffc2ac37 +# SKIP-SINGLE eb72569dbef91862a765cd4d9f380220244b4549 +# SKIP-SINGLE c4b77b82decb757af0aff1b7420203fa0805b483 +# SKIP-SINGLE 0ee01457a84e031d490553949a2deacd4865a5bb +# SKIP-SINGLE 6c68d9bd3a18c74384fc764179fd92a024d6c35d +# SKIP-SINGLE a46e231a5f27c46933cc53865cee452ad1a0c0d3 +# SKIP-SINGLE c045d5322c2c1658f215bf59d431fcc8f96ffc12 +# SKIP-SINGLE f4acae842c02525c41b0e077482206658b14624d +# SKIP-SINGLE dabb713eb05aff62deb6872a3498327934f18c8d +# SKIP-SINGLE b8c05636ca4b28a7adc62e82a5fed528b402396d +# SKIP-SINGLE dd1d8414b33fe620cf21361a4f089d5f14ff454c +# SKIP-SINGLE e72afa9dbf92f45d00c87c90ead364d52f73024f +# SKIP-SINGLE f0dda682ffbc84bd36a9543d23cc3151066e7e49 +# SKIP-SINGLE 9d3aacedf0c217af207d39e390f376914160396b +# SKIP-SINGLE 6bdbb4cbfc2deb7d3a02e1428768e101f3dbd265 +# SKIP-SINGLE 2752573dfb76873dbe783e89a1fbf01d157c54e3 +# SKIP-SINGLE 62e990db7a2fad16756e019b331c28ad5a5a89fe +# SKIP-SINGLE 6253e7e74249c7cdfa86723f0b91a1d207cb143e From e80a9dcabb9c7d7c35d97ced89209d072166dace Mon Sep 17 00:00:00 2001 From: Gregory Heytings Date: Fri, 11 Aug 2023 14:22:17 +0000 Subject: [PATCH 16/24] ; * admin/git-bisect-start: Update failing commits --- admin/git-bisect-start | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/admin/git-bisect-start b/admin/git-bisect-start index 2ffb79088bc..8eb5328a1a1 100755 --- a/admin/git-bisect-start +++ b/admin/git-bisect-start @@ -82,7 +82,7 @@ done # SKIP-BRANCH 58cc931e92ece70c3e64131ee12a799d65409100 ## The list below is the exhaustive list of all commits between Dec 1 -## 2016 and Aug 9 2023 on which building Emacs with the default +## 2016 and Aug 10 2023 on which building Emacs with the default ## options, on a GNU/Linux computer and with GCC, fails. It is ## possible (though unlikely) that building Emacs with non-default ## options, with other compilers, or on other platforms, would succeed @@ -1757,12 +1757,10 @@ $REAL_GIT bisect skip $(cat $0 | grep '^# SKIP-SINGLE ' | sed 's/^# SKIP-SINGLE # SKIP-SINGLE 0a35c991c19a6dd0a707f2baa868f8989242c3ab # SKIP-SINGLE e2ee646b162b87e832c8032b9d90577bd21f21f8 # SKIP-SINGLE 35d2fe176cb438d55552cacbdf25c3692c054d51 -# SKIP-SINGLE 50649a6d1a208b7814a5fc9f0c882442502311e6 # SKIP-SINGLE de3d8ae71b43f80244c4d813ff1503b8551f0026 # SKIP-SINGLE a496509cedb17109d0e6297a74e2ff8ed526333c # SKIP-SINGLE a6a586ffc1bd302e30d80cb88b06e1e7e1573f63 # SKIP-SINGLE f5d142f66370b29af58360faeea90d1112756bc5 -# SKIP-SINGLE e1874c4e8bff165abc5c2e842b4381b65da67ebb # SKIP-SINGLE 46e8ab23eaeb5e453042f430fc016cf9ffc2ac37 # SKIP-SINGLE eb72569dbef91862a765cd4d9f380220244b4549 # SKIP-SINGLE c4b77b82decb757af0aff1b7420203fa0805b483 @@ -1770,12 +1768,9 @@ $REAL_GIT bisect skip $(cat $0 | grep '^# SKIP-SINGLE ' | sed 's/^# SKIP-SINGLE # SKIP-SINGLE 6c68d9bd3a18c74384fc764179fd92a024d6c35d # SKIP-SINGLE a46e231a5f27c46933cc53865cee452ad1a0c0d3 # SKIP-SINGLE c045d5322c2c1658f215bf59d431fcc8f96ffc12 -# SKIP-SINGLE f4acae842c02525c41b0e077482206658b14624d # SKIP-SINGLE dabb713eb05aff62deb6872a3498327934f18c8d # SKIP-SINGLE b8c05636ca4b28a7adc62e82a5fed528b402396d -# SKIP-SINGLE dd1d8414b33fe620cf21361a4f089d5f14ff454c # SKIP-SINGLE e72afa9dbf92f45d00c87c90ead364d52f73024f -# SKIP-SINGLE f0dda682ffbc84bd36a9543d23cc3151066e7e49 # SKIP-SINGLE 9d3aacedf0c217af207d39e390f376914160396b # SKIP-SINGLE 6bdbb4cbfc2deb7d3a02e1428768e101f3dbd265 # SKIP-SINGLE 2752573dfb76873dbe783e89a1fbf01d157c54e3 From b1ba06a1e4bac45cecddeb961ec3e56afa390c3f Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 12 Aug 2023 09:27:23 +0300 Subject: [PATCH 17/24] Fix a typo in 'leuven-dark-theme.el' * etc/themes/leuven-dark-theme.el (leuven-dark): Fix a typo. Reported by John Poole . (Bug#65239) --- etc/themes/leuven-dark-theme.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/themes/leuven-dark-theme.el b/etc/themes/leuven-dark-theme.el index fda00f1282f..e45f98d9cc1 100644 --- a/etc/themes/leuven-dark-theme.el +++ b/etc/themes/leuven-dark-theme.el @@ -95,7 +95,7 @@ CONTROL can be a number, nil, or t. When t, use DEFAULT-HEIGHT." ;;;###theme-autoload (deftheme leuven-dark - "Face colors with a light background. + "Face colors with a dark background. Basic, Font Lock, Isearch, Gnus, Message, Org mode, Diff, Ediff, Flyspell, Semantic, and Ansi-Color faces are included -- and much more..." From 03e897c08facf8e920ee04cd505b72f5aa5a30cf Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 12 Aug 2023 09:38:28 +0300 Subject: [PATCH 18/24] Fix rare crashes in redisplay due to problems with fontsets * src/xdisp.c (get_next_display_element): If we have no usable face to display a character/composition, treat that as glyphless. (produce_glyphless_glyph): If neither it->face nor its ASCII face are usable, fall back to the frame's default font. (Bug#65198) --- src/xdisp.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index 9cddcfeda27..22508978298 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -8312,9 +8312,17 @@ get_next_display_element (struct it *it) && success_p && FRAME_WINDOW_P (it->f)) { - struct face *face = FACE_FROM_ID (it->f, it->face_id); + struct face *face = FACE_FROM_ID_OR_NULL (it->f, it->face_id); - if (it->what == IT_COMPOSITION && it->cmp_it.ch >= 0) + /* It shouldn't happen, ever, that FACE is NULL here, but + evidently some faulty fonts/fontsets can sometimes cause it. + In that case, we punt and consider the stuff undisplayable. */ + if (!face) + { + it->what = IT_GLYPHLESS; + it->glyphless_method = GLYPHLESS_DISPLAY_EMPTY_BOX; + } + else if (it->what == IT_COMPOSITION && it->cmp_it.ch >= 0) { /* Automatic composition with glyph-string. */ Lisp_Object gstring = composition_gstring_from_id (it->cmp_it.id); @@ -31781,9 +31789,12 @@ produce_glyphless_glyph (struct it *it, bool for_no_font, Lisp_Object acronym) int len; /* Get the metrics of the base font. We always refer to the current - ASCII face. */ - face = FACE_FROM_ID (it->f, it->face_id)->ascii_face; - font = face->font ? face->font : FRAME_FONT (it->f); + ASCII face, but if some faulty setup of fontsets causes that to + be NULL, we fall back to the frame's default font. */ + face = FACE_FROM_ID_OR_NULL (it->f, it->face_id); + if (face) + face = face->ascii_face; + font = (face && face->font) ? face->font : FRAME_FONT (it->f); normal_char_ascent_descent (font, -1, &it->ascent, &it->descent); it->ascent += font->baseline_offset; it->descent -= font->baseline_offset; From 99367078e50fd7bc419183f20b118793ddffb039 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 12 Aug 2023 10:04:55 +0300 Subject: [PATCH 19/24] ; * etc/PROBLEMS: Add entry about XIM problems (bug#65205). --- etc/PROBLEMS | 47 ++++++++++------------------------------------- 1 file changed, 10 insertions(+), 37 deletions(-) diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 418962174ec..f3d7eb303e3 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -1177,43 +1177,6 @@ do anything about it. ** International characters aren't displayed under X. -*** Missing X fonts - -XFree86 4 contains many fonts in iso10646-1 encoding which have -minimal character repertoires (whereas the encoding part of the font -name is meant to be a reasonable indication of the repertoire -according to the XLFD spec). Emacs may choose one of these to display -characters from the mule-unicode charsets and then typically won't be -able to find the glyphs to display many characters. (Check with C-u -C-x = .) To avoid this, you may need to use a fontset which sets the -font for the mule-unicode sets explicitly. E.g. to use GNU unifont, -include in the fontset spec: - -mule-unicode-2500-33ff:-gnu-unifont-*-iso10646-1,\ -mule-unicode-e000-ffff:-gnu-unifont-*-iso10646-1,\ -mule-unicode-0100-24ff:-gnu-unifont-*-iso10646-1 - -** The UTF-8/16/7 coding systems don't encode CJK (Far Eastern) characters. - -Emacs directly supports the Unicode BMP whose code points are in the -ranges 0000-33ff and e000-ffff, and indirectly supports the parts of -CJK characters belonging to these legacy charsets: - - GB2312, Big5, JISX0208, JISX0212, JISX0213-1, JISX0213-2, KSC5601 - -The latter support is done in Utf-Translate-Cjk mode (turned on by -default). Which Unicode CJK characters are decoded into which Emacs -charset is decided by the current language environment. For instance, -in Chinese-GB, most of them are decoded into chinese-gb2312. - -If you read UTF-8 data with code points outside these ranges, the -characters appear in the buffer as raw bytes of the original UTF-8 -(composed into a single quasi-character) and they will be written back -correctly as UTF-8, assuming you don't break the composed sequences. -If you read such characters from UTF-16 or UTF-7 data, they are -substituted with the Unicode 'replacement character', and you lose -information. - ** Accented ISO-8859-1 characters are displayed as | or _. Try other font set sizes (S-mouse-1). If the problem persists with @@ -1251,6 +1214,16 @@ In your ~/.Xresources file, then run And restart Emacs. +** Emacs hangs when using XIM + +This is due to an old bug in the implementation of the X protocol's +XIM transport: when an input method crashes for some reason, Xlib +cannot recover. Emacs cannot do anything about this except wait for +the I-Bux developers to fix their crashes. You can work around these +problems by disabling XIM in your X resources: + + Emacs.useXIM: false + ** On Haiku, BeCJK doesn't work properly with Emacs Some popular Haiku input methods such BeCJK are known to behave badly From 556cb01b48e2db6baa6c8793c45358b578724bfe Mon Sep 17 00:00:00 2001 From: Matthew Tromp Date: Thu, 10 Aug 2023 10:41:24 -0400 Subject: [PATCH 20/24] Substitute command keys in 'ielm-header' at use time Before, command keys were substituted into the ielm-header when ielm.el was loaded, which resulted in the substitutions depending on the user's current buffer instead of the ielm buffer. For example, if the user was in an info-mode buffer, the key would appear as 'H' instead of 'C-h m'. Now, the command key is substituted after the ielm buffer has been created. * lisp/ielm.el (ielm-header): Remove substitute-command-keys. (inferior-emacs-lisp-mode): Add substitute-command-keys. (Bug#65213) Copyright-paperwork-exempt: yes --- lisp/ielm.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lisp/ielm.el b/lisp/ielm.el index 5c370733c05..578422001a5 100644 --- a/lisp/ielm.el +++ b/lisp/ielm.el @@ -148,9 +148,8 @@ such as `edebug-defun' to work with such inputs." This variable is buffer-local.") (defvar ielm-header - (substitute-command-keys "*** Welcome to IELM *** Type (describe-mode) or press \ -\\[describe-mode] for help.\n") +\\[describe-mode] for help.\n" "Message to display when IELM is started.") (defvaralias 'inferior-emacs-lisp-mode-map 'ielm-map) @@ -615,7 +614,7 @@ Customized bindings may be defined in `ielm-map', which currently contains: (setq-local comint-inhibit-carriage-motion t) ;; Add a silly header - (insert ielm-header) + (insert (substitute-command-keys ielm-header)) (ielm-set-pm (point-max)) (unless comint-use-prompt-regexp (let ((inhibit-read-only t)) From 78999d52136ef5798ec06819c2546753e65e8ff4 Mon Sep 17 00:00:00 2001 From: J M Date: Thu, 10 Aug 2023 23:23:20 +0100 Subject: [PATCH 21/24] Update csharp tree-sitter support due to upstream changes A change in tree-sitter-c-sharp grammar for csharp (commit 18a531), has removed the keyword void_keyword and advised we should use predefined_type. * lisp/progmodes/csharp-mode.el (csharp-ts-mode--font-lock-settings): Support both old and new style of keywords in tree-sitter-c-sharp grammar. (Bug#65113) --- lisp/progmodes/csharp-mode.el | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lisp/progmodes/csharp-mode.el b/lisp/progmodes/csharp-mode.el index 00587a8a515..74968f3a06a 100644 --- a/lisp/progmodes/csharp-mode.el +++ b/lisp/progmodes/csharp-mode.el @@ -816,7 +816,7 @@ compilation and evaluation time conflicts." :language 'c-sharp :feature 'definition :override t - '((qualified_name (identifier) @font-lock-type-face) + `((qualified_name (identifier) @font-lock-type-face) (using_directive (identifier) @font-lock-type-face) (using_directive (name_equals (identifier) @font-lock-type-face)) @@ -843,8 +843,13 @@ compilation and evaluation time conflicts." (class_declaration (identifier) @font-lock-type-face) (constructor_declaration name: (_) @font-lock-type-face) - - (method_declaration type: [(identifier) (void_keyword)] @font-lock-type-face) + ;;; Handle different releases of tree-sitter-c-sharp. + ;;; Check if keyword void_keyword is available, then return the correct rule." + ,@(condition-case nil + (progn (treesit-query-capture 'csharp '((void_keyword) @capture)) + `((method_declaration type: [(identifier) (void_keyword)] @font-lock-type-face))) + (error + `((method_declaration type: [(identifier) (predefined_type)] @font-lock-type-face)))) (method_declaration type: (generic_name (identifier) @font-lock-type-face)) (method_declaration name: (_) @font-lock-function-name-face) From 47b4f4cf7839cda8e12ad5f808444cd0cf8f8824 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=ADn?= Date: Sat, 12 Aug 2023 10:32:45 +0200 Subject: [PATCH 22/24] ; * doc/emacs/mini.texi (Completion Commands): Fix a typo (bug#65242). --- doc/emacs/mini.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi index 201d4e5941d..496ede531ac 100644 --- a/doc/emacs/mini.texi +++ b/doc/emacs/mini.texi @@ -412,7 +412,7 @@ the minibuffer. Typing @kbd{M-v}, while in the minibuffer, selects the window showing the completion list (@code{switch-to-completions}). This paves the way for using the commands below. @key{PageUp}, @key{prior} and -@kbd{M-g M-c} does the same. You can also select the window in other +@kbd{M-g M-c} do the same. You can also select the window in other ways (@pxref{Windows}). @findex choose-completion From 8dbd5aa1eef9db956ad3a4ed73add23fe0e48268 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 12 Aug 2023 15:06:48 +0300 Subject: [PATCH 23/24] Avoid crashes in 'display_count_lines' when current buffer was killed * src/xdisp.c (Fformat_mode_line): * src/fns.c (Fline_number_at_pos): Don't allow to count lines in a dead buffer. (Bug#65060) --- src/fns.c | 3 +++ src/xdisp.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/fns.c b/src/fns.c index 2ed62d6e8c6..af5f9479a36 100644 --- a/src/fns.c +++ b/src/fns.c @@ -6123,6 +6123,9 @@ from the absolute start of the buffer, disregarding the narrowing. */) { ptrdiff_t pos_byte, start_byte = BEGV_BYTE; + if (!BUFFER_LIVE_P (current_buffer)) + error ("Attempt to count lines in a dead buffer"); + if (MARKERP (position)) { /* We don't trust the byte position if the marker's buffer is diff --git a/src/xdisp.c b/src/xdisp.c index 22508978298..11417070804 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -27653,6 +27653,8 @@ are the selected window and the WINDOW's buffer). */) if (NILP (buffer)) buffer = w->contents; CHECK_BUFFER (buffer); + if (!BUFFER_LIVE_P (XBUFFER (buffer))) + error ("Attempt to format a mode line for a dead buffer"); /* Make formatting the modeline a non-op when noninteractive, otherwise there will be problems later caused by a partially initialized frame. */ From 842dbf500e0fcf44d686d480f39d067b19ff38a9 Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Sat, 12 Aug 2023 18:42:33 +0200 Subject: [PATCH 24/24] * Fix `batch-byte+native-compile' target directory. * lisp/emacs-lisp/comp.el (batch-native-compile): Don't shadow `native-compile-target-directory' unless necessary. --- lisp/emacs-lisp/comp.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index bdce4254bf5..0c70789be71 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -4305,8 +4305,9 @@ last directory in `native-comp-eln-load-path')." (comp-ensure-native-compiler) (let ((comp-running-batch-compilation t) (native-compile-target-directory - (if for-tarball - (car (last native-comp-eln-load-path))))) + (if for-tarball + (car (last native-comp-eln-load-path)) + native-compile-target-directory))) (cl-loop for file in command-line-args-left if (or (null byte+native-compile) (cl-notany (lambda (re) (string-match re file))