diff options
| author | Eli Zaretskii | 2023-06-10 06:42:43 -0400 |
|---|---|---|
| committer | Eli Zaretskii | 2023-06-10 06:42:43 -0400 |
| commit | acfd261a61a5bdc00f714aeec74635ac9ef87457 (patch) | |
| tree | cf1b824856df65c05fc2f22079e3b538814c3b84 | |
| parent | c777779bf24507e4bf55cfff77e2cc31d8d25ef3 (diff) | |
| parent | 0d8b69e0ad37fe2d801e16a0ccafd8759dd33d02 (diff) | |
| download | emacs-acfd261a61a5bdc00f714aeec74635ac9ef87457.tar.gz emacs-acfd261a61a5bdc00f714aeec74635ac9ef87457.zip | |
Merge from origin/emacs-29
0d8b69e0ad3 Don't ding when completion succeeded
f11e2d36999 ; * admin/git-bisect-start: Update failing commits
9855a3ea744 ; * src/xdisp.c (redisplay_tool_bar): Fix a typo in a com...
f4ee696b887 Improve documentation of color-related functions
90eadc3e234 Revert "* package.el (package--get-activatable-pkg): Pref...
65f355ea0a3 ; Update my mail address
a3a69ec2342 Fix connection-local user options handling (bug#63300)
240803cc3e1 Document 'startup-redirect-eln-cache'
026afb22984 ; * etc/PROBLEMS: Entry about crashes due to anti-virus (...
bcc222251e1 Fix `emacs-lisp-native-compile-and-load' for C-h f (bug#5...
07c8211ca30 Add 'infer' as a keyword to typescript-ts-mode (bug#63880)
dd2d8ff2f5c ; * etc/NEWS: Mention the issue with PGTK on WSL (bug#633...
fa8135f8916 Revert changes to the order in which package descs are lo...
27fcfa2c0a7 ; * etc/NEWS: Improve instructions for grammar libraries.
2a84ab905c8 Handle point in last file-name component in minibuffer co...
05f25238b7b Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/...
4bc043ff45d Avoid asking redundant question in emacsbug.el
2eadf328d05 * test/infra/Dockerfile.emba (emacs-base): Don't install ...
583ba1db7ee typescript-ts-mode: Add a rule for function_signature
# Conflicts:
# etc/NEWS
# lisp/minibuffer.el
| -rwxr-xr-x | admin/git-bisect-start | 14 | ||||
| -rw-r--r-- | doc/lispref/compile.texi | 21 | ||||
| -rw-r--r-- | doc/lispref/frames.texi | 14 | ||||
| -rw-r--r-- | etc/NEWS.29 | 22 | ||||
| -rw-r--r-- | etc/PROBLEMS | 38 | ||||
| -rw-r--r-- | lisp/emacs-lisp/comp-cstr.el | 2 | ||||
| -rw-r--r-- | lisp/emacs-lisp/comp.el | 33 | ||||
| -rw-r--r-- | lisp/emacs-lisp/package.el | 18 | ||||
| -rw-r--r-- | lisp/files-x.el | 26 | ||||
| -rw-r--r-- | lisp/mail/emacsbug.el | 16 | ||||
| -rw-r--r-- | lisp/minibuffer.el | 10 | ||||
| -rw-r--r-- | lisp/progmodes/elisp-mode.el | 8 | ||||
| -rw-r--r-- | lisp/progmodes/typescript-ts-mode.el | 5 | ||||
| -rw-r--r-- | src/comp.c | 2 | ||||
| -rw-r--r-- | src/xdisp.c | 2 | ||||
| -rw-r--r-- | test/infra/Dockerfile.emba | 2 | ||||
| -rw-r--r-- | test/lisp/emacs-lisp/comp-cstr-tests.el | 2 | ||||
| -rw-r--r-- | test/src/comp-resources/comp-test-funcs-dyn.el | 2 | ||||
| -rw-r--r-- | test/src/comp-resources/comp-test-funcs.el | 2 | ||||
| -rw-r--r-- | test/src/comp-resources/comp-test-pure.el | 2 | ||||
| -rw-r--r-- | test/src/comp-tests.el | 2 |
21 files changed, 179 insertions, 64 deletions
diff --git a/admin/git-bisect-start b/admin/git-bisect-start index cae9c7918a8..f4ffb8f33b6 100755 --- a/admin/git-bisect-start +++ b/admin/git-bisect-start | |||
| @@ -82,7 +82,7 @@ done | |||
| 82 | # SKIP-BRANCH 58cc931e92ece70c3e64131ee12a799d65409100 | 82 | # SKIP-BRANCH 58cc931e92ece70c3e64131ee12a799d65409100 |
| 83 | 83 | ||
| 84 | ## The list below is the exhaustive list of all commits between Dec 1 | 84 | ## The list below is the exhaustive list of all commits between Dec 1 |
| 85 | ## 2016 and Apr 30 2023 on which building Emacs with the default | 85 | ## 2016 and Jun 8 2023 on which building Emacs with the default |
| 86 | ## options, on a GNU/Linux computer and with GCC, fails. It is | 86 | ## options, on a GNU/Linux computer and with GCC, fails. It is |
| 87 | ## possible (though unlikely) that building Emacs with non-default | 87 | ## possible (though unlikely) that building Emacs with non-default |
| 88 | ## options, with other compilers, or on other platforms, would succeed | 88 | ## options, with other compilers, or on other platforms, would succeed |
| @@ -1723,3 +1723,15 @@ $REAL_GIT bisect skip $(cat $0 | grep '^# SKIP-SINGLE ' | sed 's/^# SKIP-SINGLE | |||
| 1723 | # SKIP-SINGLE 9686b015a0d71d08828afb0cfe6e477bbc4909ae | 1723 | # SKIP-SINGLE 9686b015a0d71d08828afb0cfe6e477bbc4909ae |
| 1724 | # SKIP-SINGLE 621e732ade0f3dc165498ebde4d55d5aacb05b56 | 1724 | # SKIP-SINGLE 621e732ade0f3dc165498ebde4d55d5aacb05b56 |
| 1725 | # SKIP-SINGLE 200dbf7d302e659e618f74bde81c7b3ccd795639 | 1725 | # SKIP-SINGLE 200dbf7d302e659e618f74bde81c7b3ccd795639 |
| 1726 | # SKIP-SINGLE 03663b8798a06bf18ff1e235ac0fb87870f8fe77 | ||
| 1727 | # SKIP-SINGLE 4897c98b6c496801aad2477c289a40a300eee27f | ||
| 1728 | # SKIP-SINGLE e6585e0be2efc3f2eaec7210b036169fbdffa9ce | ||
| 1729 | # SKIP-SINGLE 8ec786349e18068bff39b1387bc4a88d62265e34 | ||
| 1730 | # SKIP-SINGLE 0eba9cf65119a68596c4bf3689086a517d51ce72 | ||
| 1731 | # SKIP-SINGLE ede3535051a8f3b209b830adcaba9cb1ddf58685 | ||
| 1732 | # SKIP-SINGLE 2f94f6de9d64f9fd89284dac171e166e7d721dcd | ||
| 1733 | # SKIP-SINGLE ab5258b19255ebff04df01d6f55888f43c42dcb9 | ||
| 1734 | # SKIP-SINGLE dc7acb1aafe9b0b84481ac51a5bd5125d263537e | ||
| 1735 | # SKIP-SINGLE 348e4504c6d5588443809ec28da3c3c693368e16 | ||
| 1736 | # SKIP-SINGLE 970f94a2dd8bc4be4d71f1075421093ca6f87d28 | ||
| 1737 | # SKIP-SINGLE 6b2c8dc9050c5c0514fa404733ce1d4a37d00e39 | ||
diff --git a/doc/lispref/compile.texi b/doc/lispref/compile.texi index 6ae6755ad76..a51691bddcf 100644 --- a/doc/lispref/compile.texi +++ b/doc/lispref/compile.texi | |||
| @@ -854,7 +854,10 @@ that the latter technique might still produce a small number of | |||
| 854 | @file{*.eln} files if Emacs needs to generate @dfn{trampolines}, which | 854 | @file{*.eln} files if Emacs needs to generate @dfn{trampolines}, which |
| 855 | are used if Lisp primitives are advised or redefined in your Lisp code | 855 | are used if Lisp primitives are advised or redefined in your Lisp code |
| 856 | that is being natively compiled. @xref{Native-Compilation Variables, | 856 | that is being natively compiled. @xref{Native-Compilation Variables, |
| 857 | trampolines}. | 857 | trampolines}. Alternatively, you can specify that the @file{*.eln} |
| 858 | files are written to a non-default directory using the | ||
| 859 | @code{startup-redirect-eln-cache} function; @pxref{Native-Compilation | ||
| 860 | Functions}. | ||
| 858 | 861 | ||
| 859 | @menu | 862 | @menu |
| 860 | * Native-Compilation Functions:: Functions to natively-compile Lisp. | 863 | * Native-Compilation Functions:: Functions to natively-compile Lisp. |
| @@ -979,6 +982,22 @@ available and can be loaded. Lisp programs that need to know up front | |||
| 979 | whether native-compilation is available should use this predicate. | 982 | whether native-compilation is available should use this predicate. |
| 980 | @end defun | 983 | @end defun |
| 981 | 984 | ||
| 985 | By default, asynchronous native compilation writes the @file{*.eln} | ||
| 986 | files it produces to a subdirectory of the first writable directory | ||
| 987 | specified by the @code{native-comp-eln-load-path} variable | ||
| 988 | (@pxref{Native-Compilation Variables}). You can change this by using | ||
| 989 | the following function in your startup files: | ||
| 990 | |||
| 991 | @defun startup-redirect-eln-cache cache-directory | ||
| 992 | This function arranges for the asynchronous native compilation to | ||
| 993 | write the produced @file{*.eln} files to @var{cache-directory}, which | ||
| 994 | must be a single directory, a string. It also destructively modifies | ||
| 995 | @code{native-comp-eln-load-path} such that its first element is | ||
| 996 | @var{cache-directory}. If @var{cache-directory} is not an absolute | ||
| 997 | file name, it is interpreted relative to @code{user-emacs-directory} | ||
| 998 | (@pxref{Init File}). | ||
| 999 | @end defun | ||
| 1000 | |||
| 982 | @node Native-Compilation Variables | 1001 | @node Native-Compilation Variables |
| 983 | @section Native-Compilation Variables | 1002 | @section Native-Compilation Variables |
| 984 | @cindex native-compilation variables | 1003 | @cindex native-compilation variables |
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index c78ab1c34ba..a8ac9a214f6 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi | |||
| @@ -4518,6 +4518,20 @@ This function used to be called @code{x-color-values}, | |||
| 4518 | and that name is still supported as an alias. | 4518 | and that name is still supported as an alias. |
| 4519 | @end defun | 4519 | @end defun |
| 4520 | 4520 | ||
| 4521 | @defun color-name-to-rgb color &optional frame | ||
| 4522 | This function does the same as @code{color-values}, but it returns | ||
| 4523 | color values as floating-point numbers between 0.0 and 1.0 inclusive. | ||
| 4524 | @end defun | ||
| 4525 | |||
| 4526 | @defun color-dark-p rgb | ||
| 4527 | This function returns non-@code{nil} if the color described by its RGB | ||
| 4528 | triplet @var{rgb} is more readable against white background than | ||
| 4529 | against dark background. The argument @var{rgb} should be a list of | ||
| 4530 | the form @w{@code{(@var{r} @var{g} @var{b})}}, with each component a | ||
| 4531 | floating-point number in the range 0.0 to 1.0 inclusive. You can use | ||
| 4532 | @code{color-name-to-rgb} to convert a color's name to such a list. | ||
| 4533 | @end defun | ||
| 4534 | |||
| 4521 | @node Text Terminal Colors | 4535 | @node Text Terminal Colors |
| 4522 | @section Text Terminal Colors | 4536 | @section Text Terminal Colors |
| 4523 | @cindex colors on text terminals | 4537 | @cindex colors on text terminals |
diff --git a/etc/NEWS.29 b/etc/NEWS.29 index 60aa64b5ede..ca0d602e9ad 100644 --- a/etc/NEWS.29 +++ b/etc/NEWS.29 | |||
| @@ -65,12 +65,13 @@ cloning its Git repository, compile the files "scanner.c" and | |||
| 65 | "parser.c" (sometimes named "scanner.cc" and "parser.cc") in the "src" | 65 | "parser.c" (sometimes named "scanner.cc" and "parser.cc") in the "src" |
| 66 | subdirectory of the library's source tree using the C or C++ compiler, | 66 | subdirectory of the library's source tree using the C or C++ compiler, |
| 67 | then link these two files into a shared library named | 67 | then link these two files into a shared library named |
| 68 | "libtree-sitter-LANG.so", where LANG is the name of the language | 68 | "libtree-sitter-LANG.so" ("libtree-sitter-LANG.dll" on MS-Windows, |
| 69 | supported by the grammar as it is expected by the Emacs major mode | 69 | "libtree-sitter-LANG.dylib" on macOS), where LANG is the name of the |
| 70 | (for example, "c" for 'c-ts-mode', "cpp" for 'c++-ts-mode', "python" | 70 | language supported by the grammar as it is expected by the Emacs major |
| 71 | for 'python-ts-mode', etc.). Then place the shared library you've | 71 | mode (for example, "c" for 'c-ts-mode', "cpp" for 'c++-ts-mode', |
| 72 | built in the same directory where you keep the other shared libraries | 72 | "python" for 'python-ts-mode', etc.). Then place the shared library |
| 73 | used by Emacs, or in the "tree-sitter" subdirectory of your | 73 | you've built in the same directory where you keep the other shared |
| 74 | libraries used by Emacs, or in the "tree-sitter" subdirectory of your | ||
| 74 | 'user-emacs-directory', or in a directory mentioned in the variable | 75 | 'user-emacs-directory', or in a directory mentioned in the variable |
| 75 | 'treesit-extra-load-path'. | 76 | 'treesit-extra-load-path'. |
| 76 | 77 | ||
| @@ -79,6 +80,11 @@ Emacs modes you will use, as Emacs loads these libraries only when the | |||
| 79 | corresponding mode is turned on in some buffer for the first time in | 80 | corresponding mode is turned on in some buffer for the first time in |
| 80 | an Emacs session. | 81 | an Emacs session. |
| 81 | 82 | ||
| 83 | We generally recommend to use the latest versions of grammar libraries | ||
| 84 | available from their sites, as these libraries are in constant | ||
| 85 | development and occasionally add features and fix important bugs to | ||
| 86 | follow the advances in the programming languages they support. | ||
| 87 | |||
| 82 | +++ | 88 | +++ |
| 83 | ** Emacs can be built with built-in support for accessing SQLite databases. | 89 | ** Emacs can be built with built-in support for accessing SQLite databases. |
| 84 | This uses the popular sqlite3 library, and can be disabled by using | 90 | This uses the popular sqlite3 library, and can be disabled by using |
| @@ -129,7 +135,7 @@ use this configuration only if you are running a window system other | |||
| 129 | than X that's supported by GDK. Running this configuration on X is | 135 | than X that's supported by GDK. Running this configuration on X is |
| 130 | known to have problems, such as undesirable frame positioning and | 136 | known to have problems, such as undesirable frame positioning and |
| 131 | various issues with keyboard input of sequences such as 'C-;' and | 137 | various issues with keyboard input of sequences such as 'C-;' and |
| 132 | 'C-S-u'. | 138 | 'C-S-u'. Running this on WSL is also known to have problems. |
| 133 | 139 | ||
| 134 | Note that, unlike the X build of Emacs, the PGTK build cannot | 140 | Note that, unlike the X build of Emacs, the PGTK build cannot |
| 135 | automatically switch to text-mode interface (thus emulating '-nw') if | 141 | automatically switch to text-mode interface (thus emulating '-nw') if |
| @@ -220,7 +226,7 @@ ones for the current Emacs version). Note that subdirectories of the | |||
| 220 | system directory where the "*.eln" files are installed (usually, the | 226 | system directory where the "*.eln" files are installed (usually, the |
| 221 | last entry in 'native-comp-eln-load-path') are not deleted. | 227 | last entry in 'native-comp-eln-load-path') are not deleted. |
| 222 | 228 | ||
| 223 | --- | 229 | +++ |
| 224 | *** New function 'startup-redirect-eln-cache'. | 230 | *** New function 'startup-redirect-eln-cache'. |
| 225 | This function can be called in your init files to change the | 231 | This function can be called in your init files to change the |
| 226 | user-specific directory where Emacs stores the "*.eln" files produced | 232 | user-specific directory where Emacs stores the "*.eln" files produced |
diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 5b2a4cce955..773507db3be 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS | |||
| @@ -2750,6 +2750,44 @@ C-r C-t, to toggle whether C-x gets through to Emacs. | |||
| 2750 | 2750 | ||
| 2751 | * Runtime problems specific to MS-Windows | 2751 | * Runtime problems specific to MS-Windows |
| 2752 | 2752 | ||
| 2753 | ** Emacs with native compilation crashes/signals errors accessing *.eln files | ||
| 2754 | |||
| 2755 | This is known to be caused by some flavors of Windows anti-virus | ||
| 2756 | software. The problem could manifest itself in several ways: | ||
| 2757 | |||
| 2758 | . Emacs crashes when it tries to load certain *.eln files | ||
| 2759 | . Emacs signals an error when it tries to load some *.eln files, | ||
| 2760 | claiming they are "not GPL compatible" | ||
| 2761 | . Emacs crashes during GC when it calls unload_comp_unit | ||
| 2762 | |||
| 2763 | This was specifically reported to happen with *.eln files in | ||
| 2764 | directories under the C:\Users directory, which is where Emacs on | ||
| 2765 | Windows places the emulated HOME directory, and thus also the | ||
| 2766 | ~/.emacs.d/eln-cache directory holding the *.eln files compiled during | ||
| 2767 | Emacs sessions (as opposed to those that came precompiled and were | ||
| 2768 | installed with the rest of Emacs distribution). | ||
| 2769 | |||
| 2770 | If you cannot disable such anti-virus software or switch to another | ||
| 2771 | one, you could use the following workarounds: | ||
| 2772 | |||
| 2773 | . Define the HOME environment variable to point to a directory | ||
| 2774 | outside of the C:\Users tree, then copy/move your ~/.emacs.d | ||
| 2775 | directory to that new home directory. | ||
| 2776 | . Move all the *.eln files from ~/.emacs.d/eln-cache to a directory | ||
| 2777 | out of the C:\Users tree, and customize Emacs to use that | ||
| 2778 | directory for *.eln files. This requires to call the function | ||
| 2779 | startup-redirect-eln-cache in your init file, to force Emacs to | ||
| 2780 | write *.eln files compiled at run time to that directory. | ||
| 2781 | . Delete all *.eln files in your ~/.emacs.d/eln-cache directory, and | ||
| 2782 | then disable run-time native compilation. To disable native | ||
| 2783 | compilation, set the variables native-comp-jit-compilation and | ||
| 2784 | native-comp-enable-subr-trampolines to nil. | ||
| 2785 | . Install Emacs built without native compilation. | ||
| 2786 | |||
| 2787 | With any of the above methods, you'd need to restart Emacs (and | ||
| 2788 | preferably also your Windows system) after making the changes, to have | ||
| 2789 | them take effect. | ||
| 2790 | |||
| 2753 | ** Emacs on Windows 9X requires UNICOWS.DLL | 2791 | ** Emacs on Windows 9X requires UNICOWS.DLL |
| 2754 | 2792 | ||
| 2755 | If that DLL is not available, Emacs will display an error dialog | 2793 | If that DLL is not available, Emacs will display an error dialog |
diff --git a/lisp/emacs-lisp/comp-cstr.el b/lisp/emacs-lisp/comp-cstr.el index e0db82604f2..7e3ca1f3bae 100644 --- a/lisp/emacs-lisp/comp-cstr.el +++ b/lisp/emacs-lisp/comp-cstr.el | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2020-2023 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2020-2023 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Andrea Corallo <akrl@sdf.org> | 5 | ;; Author: Andrea Corallo <acorallo@gnu.org> |
| 6 | ;; Keywords: lisp | 6 | ;; Keywords: lisp |
| 7 | ;; Package: emacs | 7 | ;; Package: emacs |
| 8 | 8 | ||
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index b65da148787..22fb08e4688 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2019-2023 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2019-2023 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Andrea Corallo <akrl@sdf.org> | 5 | ;; Author: Andrea Corallo <acorallo@gnu.org> |
| 6 | ;; Keywords: lisp | 6 | ;; Keywords: lisp |
| 7 | ;; Package: emacs | 7 | ;; Package: emacs |
| 8 | 8 | ||
| @@ -4367,6 +4367,26 @@ last directory in `native-comp-eln-load-path')." | |||
| 4367 | else | 4367 | else |
| 4368 | collect (byte-compile-file file)))) | 4368 | collect (byte-compile-file file)))) |
| 4369 | 4369 | ||
| 4370 | (defun comp-write-bytecode-file (eln-file) | ||
| 4371 | "After native compilation write the bytecode file for ELN-FILE. | ||
| 4372 | Make sure that eln file is younger than byte-compiled one and | ||
| 4373 | return the filename of this last. | ||
| 4374 | |||
| 4375 | This function can be used only in conjuntion with | ||
| 4376 | `byte+native-compile' `byte-to-native-output-buffer-file' (see | ||
| 4377 | `batch-byte+native-compile')." | ||
| 4378 | (pcase byte-to-native-output-buffer-file | ||
| 4379 | (`(,temp-buffer . ,target-file) | ||
| 4380 | (unwind-protect | ||
| 4381 | (progn | ||
| 4382 | (byte-write-target-file temp-buffer target-file) | ||
| 4383 | ;; Touch the .eln in order to have it older than the | ||
| 4384 | ;; corresponding .elc. | ||
| 4385 | (when (stringp eln-file) | ||
| 4386 | (set-file-times eln-file))) | ||
| 4387 | (kill-buffer temp-buffer)) | ||
| 4388 | target-file))) | ||
| 4389 | |||
| 4370 | ;;;###autoload | 4390 | ;;;###autoload |
| 4371 | (defun batch-byte+native-compile () | 4391 | (defun batch-byte+native-compile () |
| 4372 | "Like `batch-native-compile', but used for bootstrap. | 4392 | "Like `batch-native-compile', but used for bootstrap. |
| @@ -4382,16 +4402,7 @@ variable \"NATIVE_DISABLED\" is set, only byte compile." | |||
| 4382 | (let* ((byte+native-compile t) | 4402 | (let* ((byte+native-compile t) |
| 4383 | (byte-to-native-output-buffer-file nil) | 4403 | (byte-to-native-output-buffer-file nil) |
| 4384 | (eln-file (car (batch-native-compile)))) | 4404 | (eln-file (car (batch-native-compile)))) |
| 4385 | (pcase byte-to-native-output-buffer-file | 4405 | (comp-write-bytecode-file eln-file) |
| 4386 | (`(,temp-buffer . ,target-file) | ||
| 4387 | (unwind-protect | ||
| 4388 | (progn | ||
| 4389 | (byte-write-target-file temp-buffer target-file) | ||
| 4390 | ;; Touch the .eln in order to have it older than the | ||
| 4391 | ;; corresponding .elc. | ||
| 4392 | (when (stringp eln-file) | ||
| 4393 | (set-file-times eln-file))) | ||
| 4394 | (kill-buffer temp-buffer)))) | ||
| 4395 | (setq command-line-args-left (cdr command-line-args-left))))) | 4406 | (setq command-line-args-left (cdr command-line-args-left))))) |
| 4396 | 4407 | ||
| 4397 | ;;;###autoload | 4408 | ;;;###autoload |
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index ba0e3618f28..bbe5f00fde1 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el | |||
| @@ -737,7 +737,7 @@ description file containing a call to `define-package', which | |||
| 737 | updates `package-alist'." | 737 | updates `package-alist'." |
| 738 | (dolist (dir (cons package-user-dir package-directory-list)) | 738 | (dolist (dir (cons package-user-dir package-directory-list)) |
| 739 | (when (file-directory-p dir) | 739 | (when (file-directory-p dir) |
| 740 | (dolist (pkg-dir (directory-files dir t "\\`[^.]" t)) | 740 | (dolist (pkg-dir (directory-files dir t "\\`[^.]")) |
| 741 | (when (file-directory-p pkg-dir) | 741 | (when (file-directory-p pkg-dir) |
| 742 | (package-load-descriptor pkg-dir)))))) | 742 | (package-load-descriptor pkg-dir)))))) |
| 743 | 743 | ||
| @@ -916,22 +916,14 @@ correspond to previously loaded files." | |||
| 916 | 916 | ||
| 917 | (defun package--get-activatable-pkg (pkg-name) | 917 | (defun package--get-activatable-pkg (pkg-name) |
| 918 | ;; Is "activatable" a word? | 918 | ;; Is "activatable" a word? |
| 919 | (let ((pkg-descs (sort (cdr (assq pkg-name package-alist)) | 919 | (let ((pkg-descs (cdr (assq pkg-name package-alist)))) |
| 920 | (lambda (p1 p2) | ||
| 921 | (let ((v1 (package-desc-version p1)) | ||
| 922 | (v2 (package-desc-version p2))) | ||
| 923 | (or | ||
| 924 | ;; Prefer VC packages. | ||
| 925 | (package-vc-p p1) | ||
| 926 | (package-vc-p p2) | ||
| 927 | ;; Prefer builtin packages. | ||
| 928 | (package-disabled-p p1 v1) | ||
| 929 | (not (package-disabled-p p2 v2)))))))) | ||
| 930 | ;; Check if PACKAGE is available in `package-alist'. | 920 | ;; Check if PACKAGE is available in `package-alist'. |
| 931 | (while | 921 | (while |
| 932 | (when pkg-descs | 922 | (when pkg-descs |
| 933 | (let ((available-version (package-desc-version (car pkg-descs)))) | 923 | (let ((available-version (package-desc-version (car pkg-descs)))) |
| 934 | (package-disabled-p pkg-name available-version))) | 924 | (or (package-disabled-p pkg-name available-version) |
| 925 | ;; Prefer a builtin package. | ||
| 926 | (package-built-in-p pkg-name available-version)))) | ||
| 935 | (setq pkg-descs (cdr pkg-descs))) | 927 | (setq pkg-descs (cdr pkg-descs))) |
| 936 | (car pkg-descs))) | 928 | (car pkg-descs))) |
| 937 | 929 | ||
diff --git a/lisp/files-x.el b/lisp/files-x.el index 548d9efc193..9b1a7a17902 100644 --- a/lisp/files-x.el +++ b/lisp/files-x.el | |||
| @@ -674,15 +674,21 @@ variables for a connection profile are defined using | |||
| 674 | (dolist (profile profiles) | 674 | (dolist (profile profiles) |
| 675 | (unless (assq profile connection-local-profile-alist) | 675 | (unless (assq profile connection-local-profile-alist) |
| 676 | (error "No such connection profile `%s'" (symbol-name profile)))) | 676 | (error "No such connection profile `%s'" (symbol-name profile)))) |
| 677 | (let* ((criteria (connection-local-normalize-criteria criteria)) | 677 | ;; Avoid saving the changed user option to file unless triggered |
| 678 | ;; explicitly by user. This workaround can be removed once there is | ||
| 679 | ;; a solution for bug#63891. | ||
| 680 | (let* ((saved-value (get 'connection-local-criteria-alist 'saved-value)) | ||
| 681 | (criteria (connection-local-normalize-criteria criteria)) | ||
| 678 | (slot (assoc criteria connection-local-criteria-alist))) | 682 | (slot (assoc criteria connection-local-criteria-alist))) |
| 679 | (if slot | 683 | (if slot |
| 680 | (setcdr slot (delete-dups (append (cdr slot) profiles))) | 684 | (setcdr slot (delete-dups (append (cdr slot) profiles))) |
| 681 | (setq connection-local-criteria-alist | 685 | (setq connection-local-criteria-alist |
| 682 | (cons (cons criteria (delete-dups profiles)) | 686 | (cons (cons criteria (delete-dups profiles)) |
| 683 | connection-local-criteria-alist)))) | 687 | connection-local-criteria-alist))) |
| 684 | (custom-set-variables | 688 | (custom-set-variables |
| 685 | `(connection-local-criteria-alist ',connection-local-criteria-alist now))) | 689 | `(connection-local-criteria-alist ',connection-local-criteria-alist now)) |
| 690 | (unless saved-value | ||
| 691 | (put 'connection-local-criteria-alist 'saved-value nil)))) | ||
| 686 | 692 | ||
| 687 | (defsubst connection-local-get-profile-variables (profile) | 693 | (defsubst connection-local-get-profile-variables (profile) |
| 688 | "Return the connection-local variable list for PROFILE." | 694 | "Return the connection-local variable list for PROFILE." |
| @@ -701,9 +707,15 @@ connection profile using `connection-local-set-profiles'. Then | |||
| 701 | variables are set in the server's process buffer according to the | 707 | variables are set in the server's process buffer according to the |
| 702 | VARIABLES list of the connection profile. The list is processed | 708 | VARIABLES list of the connection profile. The list is processed |
| 703 | in order." | 709 | in order." |
| 704 | (setf (alist-get profile connection-local-profile-alist) variables) | 710 | ;; Avoid saving the changed user option to file unless triggered |
| 705 | (custom-set-variables | 711 | ;; explicitly by user. This workaround can be removed once there is |
| 706 | `(connection-local-profile-alist ',connection-local-profile-alist now))) | 712 | ;; a solution for bug#63891. |
| 713 | (let ((saved-value (get 'connection-local-profile-alist 'saved-value))) | ||
| 714 | (setf (alist-get profile connection-local-profile-alist) variables) | ||
| 715 | (custom-set-variables | ||
| 716 | `(connection-local-profile-alist ',connection-local-profile-alist now)) | ||
| 717 | (unless saved-value | ||
| 718 | (put 'connection-local-profile-alist 'saved-value nil)))) | ||
| 707 | 719 | ||
| 708 | ;;;###autoload | 720 | ;;;###autoload |
| 709 | (defun connection-local-update-profile-variables (profile variables) | 721 | (defun connection-local-update-profile-variables (profile variables) |
diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el index f686c04536c..7a66089aec9 100644 --- a/lisp/mail/emacsbug.el +++ b/lisp/mail/emacsbug.el | |||
| @@ -455,12 +455,16 @@ and send the mail again%s." | |||
| 455 | (setq send-mail-function (sendmail-query-user-about-smtp)) | 455 | (setq send-mail-function (sendmail-query-user-about-smtp)) |
| 456 | (when (derived-mode-p 'message-mode) | 456 | (when (derived-mode-p 'message-mode) |
| 457 | (setq message-send-mail-function (message-default-send-mail-function)) | 457 | (setq message-send-mail-function (message-default-send-mail-function)) |
| 458 | (add-hook 'message-sent-hook | 458 | ;; Don't ask the question below if we are going to ignore it in |
| 459 | (lambda () | 459 | ;; 'customize-save-variable' anyway. |
| 460 | (when (y-or-n-p "Save this mail sending choice?") | 460 | (unless (or (null user-init-file) |
| 461 | (customize-save-variable 'send-mail-function | 461 | (and (null custom-file) init-file-had-error)) |
| 462 | send-mail-function))) | 462 | (add-hook 'message-sent-hook |
| 463 | nil t))) | 463 | (lambda () |
| 464 | (when (y-or-n-p "Save this mail sending choice?") | ||
| 465 | (customize-save-variable 'send-mail-function | ||
| 466 | send-mail-function))) | ||
| 467 | nil t)))) | ||
| 464 | (or report-emacs-bug-no-confirmation | 468 | (or report-emacs-bug-no-confirmation |
| 465 | ;; mailclient.el does not need a valid From | 469 | ;; mailclient.el does not need a valid From |
| 466 | (eq send-mail-function 'mailclient-send-it) | 470 | (eq send-mail-function 'mailclient-send-it) |
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index a1379913886..539206a19e4 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el | |||
| @@ -2384,9 +2384,11 @@ These include: | |||
| 2384 | ;; If there are no completions, or if the current input is already | 2384 | ;; If there are no completions, or if the current input is already |
| 2385 | ;; the sole completion, then hide (previous&stale) completions. | 2385 | ;; the sole completion, then hide (previous&stale) completions. |
| 2386 | (minibuffer-hide-completions) | 2386 | (minibuffer-hide-completions) |
| 2387 | (ding) | 2387 | (if completions |
| 2388 | (completion--message | 2388 | (completion--message "Sole completion") |
| 2389 | (if completions "Sole completion" "No completions"))) | 2389 | (unless completion-fail-discreetly |
| 2390 | (ding) | ||
| 2391 | (completion--message "No match")))) | ||
| 2390 | 2392 | ||
| 2391 | (let* ((last (last completions)) | 2393 | (let* ((last (last completions)) |
| 2392 | (base-size (or (cdr last) 0)) | 2394 | (base-size (or (cdr last) 0)) |
| @@ -4504,7 +4506,7 @@ of `completion-no-auto-exit'. | |||
| 4504 | If NO-QUIT is non-nil, insert the completion at point to the | 4506 | If NO-QUIT is non-nil, insert the completion at point to the |
| 4505 | minibuffer, but don't quit the completions window." | 4507 | minibuffer, but don't quit the completions window." |
| 4506 | (interactive "P") | 4508 | (interactive "P") |
| 4507 | (with-minibuffer-completions-window | 4509 | (with-minibuffer-completions-window |
| 4508 | (let ((completion-use-base-affixes t)) | 4510 | (let ((completion-use-base-affixes t)) |
| 4509 | (choose-completion nil no-exit no-quit)))) | 4511 | (choose-completion nil no-exit no-quit)))) |
| 4510 | 4512 | ||
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 45e3848362e..759b1ab4baf 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el | |||
| @@ -215,6 +215,8 @@ All commands in `lisp-mode-shared-map' are inherited by this map." | |||
| 215 | (load (byte-compile-dest-file buffer-file-name))) | 215 | (load (byte-compile-dest-file buffer-file-name))) |
| 216 | 216 | ||
| 217 | (declare-function native-compile "comp") | 217 | (declare-function native-compile "comp") |
| 218 | (declare-function comp-write-bytecode-file "comp") | ||
| 219 | |||
| 218 | (defun emacs-lisp-native-compile-and-load () | 220 | (defun emacs-lisp-native-compile-and-load () |
| 219 | "Native-compile synchronously the current file (if it has changed). | 221 | "Native-compile synchronously the current file (if it has changed). |
| 220 | Load the compiled code when finished. | 222 | Load the compiled code when finished. |
| @@ -224,8 +226,10 @@ Use `emacs-lisp-byte-compile-and-load' in combination with | |||
| 224 | native compilation." | 226 | native compilation." |
| 225 | (interactive nil emacs-lisp-mode) | 227 | (interactive nil emacs-lisp-mode) |
| 226 | (emacs-lisp--before-compile-buffer) | 228 | (emacs-lisp--before-compile-buffer) |
| 227 | (when-let ((out (native-compile buffer-file-name))) | 229 | (let ((byte+native-compile t) |
| 228 | (load out))) | 230 | (byte-to-native-output-buffer-file nil)) |
| 231 | (when-let ((eln (native-compile buffer-file-name))) | ||
| 232 | (load (file-name-sans-extension (comp-write-bytecode-file eln)))))) | ||
| 229 | 233 | ||
| 230 | (defun emacs-lisp-macroexpand () | 234 | (defun emacs-lisp-macroexpand () |
| 231 | "Macroexpand the form after point. | 235 | "Macroexpand the form after point. |
diff --git a/lisp/progmodes/typescript-ts-mode.el b/lisp/progmodes/typescript-ts-mode.el index 8255e82a99e..3ba2f86bee8 100644 --- a/lisp/progmodes/typescript-ts-mode.el +++ b/lisp/progmodes/typescript-ts-mode.el | |||
| @@ -128,7 +128,7 @@ Argument LANGUAGE is either `typescript' or `tsx'." | |||
| 128 | "case" "catch" "class" "const" "continue" "debugger" | 128 | "case" "catch" "class" "const" "continue" "debugger" |
| 129 | "declare" "default" "delete" "do" "else" "enum" | 129 | "declare" "default" "delete" "do" "else" "enum" |
| 130 | "export" "extends" "finally" "for" "from" "function" | 130 | "export" "extends" "finally" "for" "from" "function" |
| 131 | "get" "if" "implements" "import" "in" "instanceof" "interface" "is" | 131 | "get" "if" "implements" "import" "in" "instanceof" "interface" "is" "infer" |
| 132 | "keyof" "let" "namespace" "new" "of" "private" "protected" | 132 | "keyof" "let" "namespace" "new" "of" "private" "protected" |
| 133 | "public" "readonly" "return" "set" "static" "switch" | 133 | "public" "readonly" "return" "set" "static" "switch" |
| 134 | "target" "throw" "try" "type" "typeof" "var" "void" | 134 | "target" "throw" "try" "type" "typeof" "var" "void" |
| @@ -173,9 +173,10 @@ Argument LANGUAGE is either `typescript' or `tsx'." | |||
| 173 | :feature 'declaration | 173 | :feature 'declaration |
| 174 | `((function | 174 | `((function |
| 175 | name: (identifier) @font-lock-function-name-face) | 175 | name: (identifier) @font-lock-function-name-face) |
| 176 | |||
| 177 | (function_declaration | 176 | (function_declaration |
| 178 | name: (identifier) @font-lock-function-name-face) | 177 | name: (identifier) @font-lock-function-name-face) |
| 178 | (function_signature | ||
| 179 | name: (identifier) @font-lock-function-name-face) | ||
| 179 | 180 | ||
| 180 | (method_definition | 181 | (method_definition |
| 181 | name: (property_identifier) @font-lock-function-name-face) | 182 | name: (property_identifier) @font-lock-function-name-face) |
diff --git a/src/comp.c b/src/comp.c index 9ff3efedbdd..013ac6358c1 100644 --- a/src/comp.c +++ b/src/comp.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* Compile Emacs Lisp into native code. | 1 | /* Compile Emacs Lisp into native code. |
| 2 | Copyright (C) 2019-2023 Free Software Foundation, Inc. | 2 | Copyright (C) 2019-2023 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | Author: Andrea Corallo <akrl@sdf.org> | 4 | Author: Andrea Corallo <acorallo@gnu.org> |
| 5 | 5 | ||
| 6 | This file is part of GNU Emacs. | 6 | This file is part of GNU Emacs. |
| 7 | 7 | ||
diff --git a/src/xdisp.c b/src/xdisp.c index 5e25857322f..1830d1965a6 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -15367,7 +15367,7 @@ redisplay_tool_bar (struct frame *f) | |||
| 15367 | 0, 0, 0, STRING_MULTIBYTE (f->desired_tool_bar_string)); | 15367 | 0, 0, 0, STRING_MULTIBYTE (f->desired_tool_bar_string)); |
| 15368 | /* FIXME: This should be controlled by a user option. But it | 15368 | /* FIXME: This should be controlled by a user option. But it |
| 15369 | doesn't make sense to have an R2L tool bar if the menu bar cannot | 15369 | doesn't make sense to have an R2L tool bar if the menu bar cannot |
| 15370 | be drawn also R2L, and making the menu bar R2L is tricky due | 15370 | be drawn also R2L, and making the menu bar R2L is tricky due to |
| 15371 | toolkit-specific code that implements it. If an R2L tool bar is | 15371 | toolkit-specific code that implements it. If an R2L tool bar is |
| 15372 | ever supported, display_tool_bar_line should also be augmented to | 15372 | ever supported, display_tool_bar_line should also be augmented to |
| 15373 | call unproduce_glyphs like display_line and display_string | 15373 | call unproduce_glyphs like display_line and display_string |
diff --git a/test/infra/Dockerfile.emba b/test/infra/Dockerfile.emba index f5259150518..584e4444dc1 100644 --- a/test/infra/Dockerfile.emba +++ b/test/infra/Dockerfile.emba | |||
| @@ -29,7 +29,7 @@ FROM debian:bullseye as emacs-base | |||
| 29 | RUN apt-get update && \ | 29 | RUN apt-get update && \ |
| 30 | apt-get install -y --no-install-recommends -o=Dpkg::Use-Pty=0 \ | 30 | apt-get install -y --no-install-recommends -o=Dpkg::Use-Pty=0 \ |
| 31 | libc-dev gcc g++ make autoconf automake libncurses-dev gnutls-dev \ | 31 | libc-dev gcc g++ make autoconf automake libncurses-dev gnutls-dev \ |
| 32 | libdbus-1-dev libacl1-dev acl git texinfo gawk gdb \ | 32 | libdbus-1-dev libacl1-dev acl git texinfo gdb \ |
| 33 | && rm -rf /var/lib/apt/lists/* | 33 | && rm -rf /var/lib/apt/lists/* |
| 34 | 34 | ||
| 35 | FROM emacs-base as emacs-inotify | 35 | FROM emacs-base as emacs-inotify |
diff --git a/test/lisp/emacs-lisp/comp-cstr-tests.el b/test/lisp/emacs-lisp/comp-cstr-tests.el index aeb620326b0..78d9bb49b98 100644 --- a/test/lisp/emacs-lisp/comp-cstr-tests.el +++ b/test/lisp/emacs-lisp/comp-cstr-tests.el | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2020-2023 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2020-2023 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Andrea Corallo <akrl@sdf.org> | 5 | ;; Author: Andrea Corallo <acorallo@gnu.org> |
| 6 | 6 | ||
| 7 | ;; This file is part of GNU Emacs. | 7 | ;; This file is part of GNU Emacs. |
| 8 | 8 | ||
diff --git a/test/src/comp-resources/comp-test-funcs-dyn.el b/test/src/comp-resources/comp-test-funcs-dyn.el index 7f9daf67019..8cd127f7e1b 100644 --- a/test/src/comp-resources/comp-test-funcs-dyn.el +++ b/test/src/comp-resources/comp-test-funcs-dyn.el | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2020-2023 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2020-2023 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Andrea Corallo <akrl@sdf.org> | 5 | ;; Author: Andrea Corallo <acorallo@gnu.org> |
| 6 | 6 | ||
| 7 | ;; This file is part of GNU Emacs. | 7 | ;; This file is part of GNU Emacs. |
| 8 | 8 | ||
diff --git a/test/src/comp-resources/comp-test-funcs.el b/test/src/comp-resources/comp-test-funcs.el index d8c72c1a920..6d0cb353513 100644 --- a/test/src/comp-resources/comp-test-funcs.el +++ b/test/src/comp-resources/comp-test-funcs.el | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2019-2023 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2019-2023 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Andrea Corallo <akrl@sdf.org> | 5 | ;; Author: Andrea Corallo <acorallo@gnu.org> |
| 6 | 6 | ||
| 7 | ;; This file is part of GNU Emacs. | 7 | ;; This file is part of GNU Emacs. |
| 8 | 8 | ||
diff --git a/test/src/comp-resources/comp-test-pure.el b/test/src/comp-resources/comp-test-pure.el index 9b4c1ee2dae..cc5ba7edef7 100644 --- a/test/src/comp-resources/comp-test-pure.el +++ b/test/src/comp-resources/comp-test-pure.el | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2020-2023 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2020-2023 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Andrea Corallo <akrl@sdf.org> | 5 | ;; Author: Andrea Corallo <acorallo@gnu.org> |
| 6 | 6 | ||
| 7 | ;; This file is part of GNU Emacs. | 7 | ;; This file is part of GNU Emacs. |
| 8 | 8 | ||
diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el index ee6a05582d5..ce7899d9d4c 100644 --- a/test/src/comp-tests.el +++ b/test/src/comp-tests.el | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2019-2023 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2019-2023 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Andrea Corallo <akrl@sdf.org> | 5 | ;; Author: Andrea Corallo <acorallo@gnu.org> |
| 6 | 6 | ||
| 7 | ;; This file is part of GNU Emacs. | 7 | ;; This file is part of GNU Emacs. |
| 8 | 8 | ||