From 583ba1db7ee31349eeef94f9dcb6e43f860a32eb Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Sat, 3 Jun 2023 15:00:41 +0300 Subject: [PATCH 01/18] typescript-ts-mode: Add a rule for function_signature * lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode--font-lock-settings): Add a rule for function_signature (bug#63867) --- lisp/progmodes/typescript-ts-mode.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/typescript-ts-mode.el b/lisp/progmodes/typescript-ts-mode.el index e30eb880266..09e04f0cd0e 100644 --- a/lisp/progmodes/typescript-ts-mode.el +++ b/lisp/progmodes/typescript-ts-mode.el @@ -173,9 +173,10 @@ Argument LANGUAGE is either `typescript' or `tsx'." :feature 'declaration `((function name: (identifier) @font-lock-function-name-face) - (function_declaration name: (identifier) @font-lock-function-name-face) + (function_signature + name: (identifier) @font-lock-function-name-face) (method_definition name: (property_identifier) @font-lock-function-name-face) From 2eadf328d05edf3304e5101e14b9aa2ac60a211f Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sat, 3 Jun 2023 17:52:46 +0200 Subject: [PATCH 02/18] * test/infra/Dockerfile.emba (emacs-base): Don't install gawk. --- test/infra/Dockerfile.emba | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/infra/Dockerfile.emba b/test/infra/Dockerfile.emba index b146f5a2c4d..7f12d682a13 100644 --- a/test/infra/Dockerfile.emba +++ b/test/infra/Dockerfile.emba @@ -29,7 +29,7 @@ FROM debian:bullseye as emacs-base RUN apt-get update && \ apt-get install -y --no-install-recommends -o=Dpkg::Use-Pty=0 \ libc-dev gcc g++ make autoconf automake libncurses-dev gnutls-dev \ - libdbus-1-dev libacl1-dev acl git texinfo gawk gdb \ + libdbus-1-dev libacl1-dev acl git texinfo gdb \ && rm -rf /var/lib/apt/lists/* FROM emacs-base as emacs-inotify From 4bc043ff45d4b02c762474791b054cb33972a2d6 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 3 Jun 2023 19:20:23 +0300 Subject: [PATCH 03/18] Avoid asking redundant question in emacsbug.el * lisp/mail/emacsbug.el (report-emacs-bug-hook): Don't ask the question about saving email setup if we cannot save it anyway. (Bug#63816) --- lisp/mail/emacsbug.el | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) 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." (setq send-mail-function (sendmail-query-user-about-smtp)) (when (derived-mode-p 'message-mode) (setq message-send-mail-function (message-default-send-mail-function)) - (add-hook 'message-sent-hook - (lambda () - (when (y-or-n-p "Save this mail sending choice?") - (customize-save-variable 'send-mail-function - send-mail-function))) - nil t))) + ;; Don't ask the question below if we are going to ignore it in + ;; 'customize-save-variable' anyway. + (unless (or (null user-init-file) + (and (null custom-file) init-file-had-error)) + (add-hook 'message-sent-hook + (lambda () + (when (y-or-n-p "Save this mail sending choice?") + (customize-save-variable 'send-mail-function + send-mail-function))) + nil t)))) (or report-emacs-bug-no-confirmation ;; mailclient.el does not need a valid From (eq send-mail-function 'mailclient-send-it) From 2a84ab905c8009db4d7df7b8f7cfb34c403081c8 Mon Sep 17 00:00:00 2001 From: Spencer Baugh Date: Fri, 2 Jun 2023 20:57:32 -0400 Subject: [PATCH 04/18] Handle point in last file-name component in minibuffer completion This is a followup to commit e338a8ac41d4a9fd798dda90275abe75ac071335 (Handle point not at EOB in minibuffer-choose-completion). That commit added a heuristic, but the heuristic was insufficient: It still had the original wrong behavior when completing the last file-name component (i.e., the completion category is 'file' and there's no slash after point). This patch makes the heuristic cover that case as well. * lisp/minibuffer.el (minibuffer-next-completion) (minibuffer-choose-completion): If in file completion and there's no slash after point, clear what's after point when we complete. (Bug#62700) --- lisp/minibuffer.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 298f3f8728d..a873e5f9747 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -4498,8 +4498,9 @@ insert the selected completion to the minibuffer." (base-suffix (if (eq (alist-get 'category (cdr md)) 'file) (with-current-buffer buf - (buffer-substring (save-excursion (search-forward "/" nil t) (point)) - (point-max))) + (buffer-substring + (save-excursion (or (search-forward "/" nil t) (point-max))) + (point-max))) "")) (completion-base-affixes (list (car completion-base-affixes) base-suffix))) (choose-completion nil t t)))))) @@ -4524,8 +4525,9 @@ minibuffer, but don't quit the completions window." (let* ((md (completion--field-metadata (minibuffer--completion-prompt-end))) (base-suffix (if (eq (alist-get 'category (cdr md)) 'file) - (buffer-substring (save-excursion (search-forward "/" nil t) (point)) - (point-max)) + (buffer-substring + (save-excursion (or (search-forward "/" nil t) (point-max))) + (point-max)) ""))) (with-minibuffer-completions-window (let ((completion-use-base-affixes t) From 27fcfa2c0a756bbe94ff0ea6accf12fd45186e5c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 4 Jun 2023 10:57:07 +0300 Subject: [PATCH 05/18] ; * etc/NEWS: Improve instructions for grammar libraries. --- etc/NEWS | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 60aa64b5ede..8f518993856 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -65,12 +65,13 @@ cloning its Git repository, compile the files "scanner.c" and "parser.c" (sometimes named "scanner.cc" and "parser.cc") in the "src" subdirectory of the library's source tree using the C or C++ compiler, then link these two files into a shared library named -"libtree-sitter-LANG.so", where LANG is the name of the language -supported by the grammar as it is expected by the Emacs major mode -(for example, "c" for 'c-ts-mode', "cpp" for 'c++-ts-mode', "python" -for 'python-ts-mode', etc.). Then place the shared library you've -built in the same directory where you keep the other shared libraries -used by Emacs, or in the "tree-sitter" subdirectory of your +"libtree-sitter-LANG.so" ("libtree-sitter-LANG.dll" on MS-Windows, +"libtree-sitter-LANG.dylib" on macOS), where LANG is the name of the +language supported by the grammar as it is expected by the Emacs major +mode (for example, "c" for 'c-ts-mode', "cpp" for 'c++-ts-mode', +"python" for 'python-ts-mode', etc.). Then place the shared library +you've built in the same directory where you keep the other shared +libraries used by Emacs, or in the "tree-sitter" subdirectory of your 'user-emacs-directory', or in a directory mentioned in the variable 'treesit-extra-load-path'. @@ -79,6 +80,11 @@ Emacs modes you will use, as Emacs loads these libraries only when the corresponding mode is turned on in some buffer for the first time in an Emacs session. +We generally recommend to use the latest versions of grammar libraries +available from their sites, as these libraries are in constant +development and occasionally add features and fix important bugs to +follow the advances in the programming languages they support. + +++ ** Emacs can be built with built-in support for accessing SQLite databases. This uses the popular sqlite3 library, and can be disabled by using From fa8135f8916d6d0beaa945cc28689060f52a1ecf Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Sun, 4 Jun 2023 15:21:04 +0200 Subject: [PATCH 06/18] Revert changes to the order in which package descs are loaded * lisp/emacs-lisp/package.el (package-load-all-descriptors): Remove NOSORT argument to 'directory-files', reverting back to the behaviour as of Emacs 28. (Bug#63757) --- lisp/emacs-lisp/package.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 8f266186d5e..43368b59522 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -739,7 +739,7 @@ description file containing a call to `define-package', which updates `package-alist'." (dolist (dir (cons package-user-dir package-directory-list)) (when (file-directory-p dir) - (dolist (pkg-dir (directory-files dir t "\\`[^.]" t)) + (dolist (pkg-dir (directory-files dir t "\\`[^.]")) (when (file-directory-p pkg-dir) (package-load-descriptor pkg-dir)))))) From dd2d8ff2f5cf5f495a793c7db0a168474a339613 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 5 Jun 2023 14:50:00 +0300 Subject: [PATCH 07/18] ; * etc/NEWS: Mention the issue with PGTK on WSL (bug#63384). --- etc/NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/NEWS b/etc/NEWS index 8f518993856..d3146fab8eb 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -135,7 +135,7 @@ use this configuration only if you are running a window system other than X that's supported by GDK. Running this configuration on X is known to have problems, such as undesirable frame positioning and various issues with keyboard input of sequences such as 'C-;' and -'C-S-u'. +'C-S-u'. Running this on WSL is also known to have problems. Note that, unlike the X build of Emacs, the PGTK build cannot automatically switch to text-mode interface (thus emulating '-nw') if From 07c8211ca3075d57dc669946fc4670bb94b79983 Mon Sep 17 00:00:00 2001 From: Theodor Thornhill Date: Tue, 6 Jun 2023 06:26:43 +0200 Subject: [PATCH 08/18] Add 'infer' as a keyword to typescript-ts-mode (bug#63880) * lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode--keywords): New keyword. --- lisp/progmodes/typescript-ts-mode.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/typescript-ts-mode.el b/lisp/progmodes/typescript-ts-mode.el index 09e04f0cd0e..1c19a031878 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'." "case" "catch" "class" "const" "continue" "debugger" "declare" "default" "delete" "do" "else" "enum" "export" "extends" "finally" "for" "from" "function" - "get" "if" "implements" "import" "in" "instanceof" "interface" "is" + "get" "if" "implements" "import" "in" "instanceof" "interface" "is" "infer" "keyof" "let" "namespace" "new" "of" "private" "protected" "public" "readonly" "return" "set" "static" "switch" "target" "throw" "try" "type" "typeof" "var" "void" From bcc222251e1a750a11e365f2faa641cc56c1169d Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Tue, 6 Jun 2023 11:27:13 +0200 Subject: [PATCH 09/18] Fix `emacs-lisp-native-compile-and-load' for C-h f (bug#58314) * lisp/emacs-lisp/comp.el (comp-write-bytecode-file): New function spilling code from `batch-byte+native-compile'. (batch-byte+native-compile): Make use of. * lisp/progmodes/elisp-mode.el (emacs-lisp-native-compile-and-load): Produce the elc file and ask to have it loaded. --- lisp/emacs-lisp/comp.el | 31 +++++++++++++++++++++---------- lisp/progmodes/elisp-mode.el | 8 ++++++-- 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 8f40f2f40a0..469f921a38e 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -4318,6 +4318,26 @@ last directory in `native-comp-eln-load-path')." else collect (byte-compile-file file)))) +(defun comp-write-bytecode-file (eln-file) + "After native compilation write the bytecode file for ELN-FILE. +Make sure that eln file is younger than byte-compiled one and +return the filename of this last. + +This function can be used only in conjuntion with +`byte+native-compile' `byte-to-native-output-buffer-file' (see +`batch-byte+native-compile')." + (pcase byte-to-native-output-buffer-file + (`(,temp-buffer . ,target-file) + (unwind-protect + (progn + (byte-write-target-file temp-buffer target-file) + ;; Touch the .eln in order to have it older than the + ;; corresponding .elc. + (when (stringp eln-file) + (set-file-times eln-file))) + (kill-buffer temp-buffer)) + target-file))) + ;;;###autoload (defun batch-byte+native-compile () "Like `batch-native-compile', but used for bootstrap. @@ -4333,16 +4353,7 @@ variable \"NATIVE_DISABLED\" is set, only byte compile." (let* ((byte+native-compile t) (byte-to-native-output-buffer-file nil) (eln-file (car (batch-native-compile)))) - (pcase byte-to-native-output-buffer-file - (`(,temp-buffer . ,target-file) - (unwind-protect - (progn - (byte-write-target-file temp-buffer target-file) - ;; Touch the .eln in order to have it older than the - ;; corresponding .elc. - (when (stringp eln-file) - (set-file-times eln-file))) - (kill-buffer temp-buffer)))) + (comp-write-bytecode-file eln-file) (setq command-line-args-left (cdr command-line-args-left))))) ;;;###autoload diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 6fbb87fa3a8..956e3d30bce 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." (load (byte-compile-dest-file buffer-file-name))) (declare-function native-compile "comp") +(declare-function comp-write-bytecode-file "comp") + (defun emacs-lisp-native-compile-and-load () "Native-compile synchronously the current file (if it has changed). Load the compiled code when finished. @@ -224,8 +226,10 @@ Use `emacs-lisp-byte-compile-and-load' in combination with native compilation." (interactive nil emacs-lisp-mode) (emacs-lisp--before-compile-buffer) - (when-let ((out (native-compile buffer-file-name))) - (load out))) + (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)))))) (defun emacs-lisp-macroexpand () "Macroexpand the form after point. From 026afb229847f4a76890b09a196c8431fce2804d Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 8 Jun 2023 08:30:18 +0300 Subject: [PATCH 10/18] ; * etc/PROBLEMS: Entry about crashes due to anti-virus (bug#57880). --- etc/PROBLEMS | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 5b9b5ee4ead..561b116c9bd 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -2730,6 +2730,45 @@ C-r C-t, to toggle whether C-x gets through to Emacs. * Runtime problems specific to MS-Windows +** Emacs with native compilation crashes/signals errors accessing *.eln files + +This is known to be caused by some flavors of Windows anti-virus +software. The problem could manifest itself in several ways: + + . Emacs crashes when it tries to load certain *.eln files + . Emacs signals an error when it tries to load some *.eln files, + claiming they are "not GPL compatible" + . Emacs crashes during GC when it calls unload_comp_unit + +This was specifically reported to happen with *.eln files in +directories under the C:\Users directory, which is where Emacs on +Windows places the emulated HOME directory, and thus also the +~/.emacs.d/eln-cache directory holding the *.eln files compiled during +Emacs sessions (as opposed to those that came precompiled and were +installed with the rest of Emacs distribution). + +If you cannot disable such anti-virus software or switch to another +one, you could use the following workarounds: + + . Define the HOME environment variable to point to a directory + outside of the C:\Users tree, then copy/move your ~/.emacs.d + directory to that new home directory. + . Move all the *.eln files from ~/.emacs.d/eln-cache to a directory + out of the C:\Users tree, and customize Emacs to use that + directory for *.eln files. This requires to add that directory to + the value of native-comp-eln-load-path, and also call the function + startup-redirect-eln-cache in your init file, to force Emacs to + write *.eln files compiled at run time to that directory. + . Delete all *.eln files in your ~/.emacs.d/eln-cache directory, and + then disable run-time native compilation. To disable native + compilation, set the variables native-comp-jit-compilation and + native-comp-enable-subr-trampolines to nil. + . Install Emacs built without native compilation. + +With any of the above methods, you'd need to restart Emacs (and +preferably also your Windows system) after making the changes, to have +them take effect. + ** Emacs on Windows 9X requires UNICOWS.DLL If that DLL is not available, Emacs will display an error dialog From 240803cc3e1f361baf5665f91e4d0bd9576956a7 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 8 Jun 2023 08:50:54 +0300 Subject: [PATCH 11/18] Document 'startup-redirect-eln-cache' * doc/lispref/compile.texi (Native Compilation) (Native-Compilation Functions): Document 'startup-redirect-eln-cache'. * etc/PROBLEMS: Fix last change. * etc/NEWS: Mark 'startup-redirect-eln-cache' as documented. --- doc/lispref/compile.texi | 21 ++++++++++++++++++++- etc/NEWS | 2 +- etc/PROBLEMS | 3 +-- 3 files changed, 22 insertions(+), 4 deletions(-) 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 @file{*.eln} files if Emacs needs to generate @dfn{trampolines}, which are used if Lisp primitives are advised or redefined in your Lisp code that is being natively compiled. @xref{Native-Compilation Variables, -trampolines}. +trampolines}. Alternatively, you can specify that the @file{*.eln} +files are written to a non-default directory using the +@code{startup-redirect-eln-cache} function; @pxref{Native-Compilation +Functions}. @menu * Native-Compilation Functions:: Functions to natively-compile Lisp. @@ -977,6 +980,22 @@ the native-compilation support compiled into it. On systems that load @file{libgccjit} dynamically, it also makes sure that library is available and can be loaded. Lisp programs that need to know up front whether native-compilation is available should use this predicate. +@end defun + + By default, asynchronous native compilation writes the @file{*.eln} +files it produces to a subdirectory of the first writable directory +specified by the @code{native-comp-eln-load-path} variable +(@pxref{Native-Compilation Variables}). You can change this by using +the following function in your startup files: + +@defun startup-redirect-eln-cache cache-directory +This function arranges for the asynchronous native compilation to +write the produced @file{*.eln} files to @var{cache-directory}, which +must be a single directory, a string. It also destructively modifies +@code{native-comp-eln-load-path} such that its first element is +@var{cache-directory}. If @var{cache-directory} is not an absolute +file name, it is interpreted relative to @code{user-emacs-directory} +(@pxref{Init File}). @end defun @node Native-Compilation Variables diff --git a/etc/NEWS b/etc/NEWS index d3146fab8eb..ca0d602e9ad 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -226,7 +226,7 @@ ones for the current Emacs version). Note that subdirectories of the system directory where the "*.eln" files are installed (usually, the last entry in 'native-comp-eln-load-path') are not deleted. ---- ++++ *** New function 'startup-redirect-eln-cache'. This function can be called in your init files to change the user-specific directory where Emacs stores the "*.eln" files produced diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 561b116c9bd..e5baa8ee18a 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -2755,8 +2755,7 @@ one, you could use the following workarounds: directory to that new home directory. . Move all the *.eln files from ~/.emacs.d/eln-cache to a directory out of the C:\Users tree, and customize Emacs to use that - directory for *.eln files. This requires to add that directory to - the value of native-comp-eln-load-path, and also call the function + directory for *.eln files. This requires to call the function startup-redirect-eln-cache in your init file, to force Emacs to write *.eln files compiled at run time to that directory. . Delete all *.eln files in your ~/.emacs.d/eln-cache directory, and From a3a69ec23421dd65671be37f829d5a29c8c0ef89 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Thu, 8 Jun 2023 09:59:06 +0200 Subject: [PATCH 12/18] Fix connection-local user options handling (bug#63300) * lisp/files-x.el (connection-local-set-profiles) (connection-local-set-profile-variables): Avoid saving the changed user option to file unless triggered explicitly by user. (Bug#63300) --- lisp/files-x.el | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) 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 (dolist (profile profiles) (unless (assq profile connection-local-profile-alist) (error "No such connection profile `%s'" (symbol-name profile)))) - (let* ((criteria (connection-local-normalize-criteria criteria)) + ;; Avoid saving the changed user option to file unless triggered + ;; explicitly by user. This workaround can be removed once there is + ;; a solution for bug#63891. + (let* ((saved-value (get 'connection-local-criteria-alist 'saved-value)) + (criteria (connection-local-normalize-criteria criteria)) (slot (assoc criteria connection-local-criteria-alist))) (if slot (setcdr slot (delete-dups (append (cdr slot) profiles))) (setq connection-local-criteria-alist (cons (cons criteria (delete-dups profiles)) - connection-local-criteria-alist)))) - (custom-set-variables - `(connection-local-criteria-alist ',connection-local-criteria-alist now))) + connection-local-criteria-alist))) + (custom-set-variables + `(connection-local-criteria-alist ',connection-local-criteria-alist now)) + (unless saved-value + (put 'connection-local-criteria-alist 'saved-value nil)))) (defsubst connection-local-get-profile-variables (profile) "Return the connection-local variable list for PROFILE." @@ -701,9 +707,15 @@ connection profile using `connection-local-set-profiles'. Then variables are set in the server's process buffer according to the VARIABLES list of the connection profile. The list is processed in order." - (setf (alist-get profile connection-local-profile-alist) variables) - (custom-set-variables - `(connection-local-profile-alist ',connection-local-profile-alist now))) + ;; Avoid saving the changed user option to file unless triggered + ;; explicitly by user. This workaround can be removed once there is + ;; a solution for bug#63891. + (let ((saved-value (get 'connection-local-profile-alist 'saved-value))) + (setf (alist-get profile connection-local-profile-alist) variables) + (custom-set-variables + `(connection-local-profile-alist ',connection-local-profile-alist now)) + (unless saved-value + (put 'connection-local-profile-alist 'saved-value nil)))) ;;;###autoload (defun connection-local-update-profile-variables (profile variables) From 65f355ea0a3652eb0051ad4919afe0e1b67eebaa Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Thu, 8 Jun 2023 10:59:41 +0200 Subject: [PATCH 13/18] ; Update my mail address * lisp/emacs-lisp/comp-cstr.el: Update author mail. * lisp/emacs-lisp/comp.el: Likewise. * src/comp.c: Likewise. * test/lisp/emacs-lisp/comp-cstr-tests.el: Likewise. * test/src/comp-resources/comp-test-funcs-dyn.el: Likewise. * test/src/comp-resources/comp-test-funcs.el: Likewise. * test/src/comp-resources/comp-test-pure.el: Likewise. * test/src/comp-tests.el: Likewise. --- lisp/emacs-lisp/comp-cstr.el | 2 +- lisp/emacs-lisp/comp.el | 2 +- src/comp.c | 2 +- test/lisp/emacs-lisp/comp-cstr-tests.el | 2 +- test/src/comp-resources/comp-test-funcs-dyn.el | 2 +- test/src/comp-resources/comp-test-funcs.el | 2 +- test/src/comp-resources/comp-test-pure.el | 2 +- test/src/comp-tests.el | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lisp/emacs-lisp/comp-cstr.el b/lisp/emacs-lisp/comp-cstr.el index d4200c16c19..787232067a1 100644 --- a/lisp/emacs-lisp/comp-cstr.el +++ b/lisp/emacs-lisp/comp-cstr.el @@ -2,7 +2,7 @@ ;; Copyright (C) 2020-2023 Free Software Foundation, Inc. -;; Author: Andrea Corallo +;; Author: Andrea Corallo ;; Keywords: lisp ;; Package: emacs diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 469f921a38e..322df0e86a1 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -2,7 +2,7 @@ ;; Copyright (C) 2019-2023 Free Software Foundation, Inc. -;; Author: Andrea Corallo +;; Author: Andrea Corallo ;; Keywords: lisp ;; Package: emacs diff --git a/src/comp.c b/src/comp.c index 3f72d088a66..59c9e9619a3 100644 --- a/src/comp.c +++ b/src/comp.c @@ -1,7 +1,7 @@ /* Compile Emacs Lisp into native code. Copyright (C) 2019-2023 Free Software Foundation, Inc. -Author: Andrea Corallo +Author: Andrea Corallo This file is part of GNU Emacs. 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 @@ ;; Copyright (C) 2020-2023 Free Software Foundation, Inc. -;; Author: Andrea Corallo +;; Author: Andrea Corallo ;; This file is part of GNU Emacs. 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 @@ ;; Copyright (C) 2020-2023 Free Software Foundation, Inc. -;; Author: Andrea Corallo +;; Author: Andrea Corallo ;; This file is part of GNU Emacs. diff --git a/test/src/comp-resources/comp-test-funcs.el b/test/src/comp-resources/comp-test-funcs.el index fff881dd595..3525e118153 100644 --- a/test/src/comp-resources/comp-test-funcs.el +++ b/test/src/comp-resources/comp-test-funcs.el @@ -2,7 +2,7 @@ ;; Copyright (C) 2019-2023 Free Software Foundation, Inc. -;; Author: Andrea Corallo +;; Author: Andrea Corallo ;; This file is part of GNU Emacs. 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 @@ ;; Copyright (C) 2020-2023 Free Software Foundation, Inc. -;; Author: Andrea Corallo +;; Author: Andrea Corallo ;; This file is part of GNU Emacs. diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el index c5e5b346adb..b0d865292b7 100644 --- a/test/src/comp-tests.el +++ b/test/src/comp-tests.el @@ -2,7 +2,7 @@ ;; Copyright (C) 2019-2023 Free Software Foundation, Inc. -;; Author: Andrea Corallo +;; Author: Andrea Corallo ;; This file is part of GNU Emacs. From 90eadc3e2349c155a14aedb6cf09d9c571d8e698 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 8 Jun 2023 12:23:11 +0300 Subject: [PATCH 14/18] Revert "* package.el (package--get-activatable-pkg): Prefer source packages" This reverts commit fb87d5008e21d1bc03547c1edf2280fb4cb8311e. It caused problems when new versions of packages are installed without deleting old versions. (Bug#63757) --- lisp/emacs-lisp/package.el | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 43368b59522..3e6acd9b388 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -924,22 +924,14 @@ correspond to previously loaded files." (defun package--get-activatable-pkg (pkg-name) ;; Is "activatable" a word? - (let ((pkg-descs (sort (cdr (assq pkg-name package-alist)) - (lambda (p1 p2) - (let ((v1 (package-desc-version p1)) - (v2 (package-desc-version p2))) - (or - ;; Prefer VC packages. - (package-vc-p p1) - (package-vc-p p2) - ;; Prefer builtin packages. - (package-disabled-p p1 v1) - (not (package-disabled-p p2 v2)))))))) + (let ((pkg-descs (cdr (assq pkg-name package-alist)))) ;; Check if PACKAGE is available in `package-alist'. (while (when pkg-descs (let ((available-version (package-desc-version (car pkg-descs)))) - (package-disabled-p pkg-name available-version))) + (or (package-disabled-p pkg-name available-version) + ;; Prefer a builtin package. + (package-built-in-p pkg-name available-version)))) (setq pkg-descs (cdr pkg-descs))) (car pkg-descs))) From f4ee696b887ca9f0ebf3685817f9b9cfbfc49b99 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 9 Jun 2023 10:28:36 +0300 Subject: [PATCH 15/18] Improve documentation of color-related functions * doc/lispref/frames.texi (Color Names): Document 'color-name-to-rgb' and 'color-dark-p'. --- doc/lispref/frames.texi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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}, and that name is still supported as an alias. @end defun +@defun color-name-to-rgb color &optional frame +This function does the same as @code{color-values}, but it returns +color values as floating-point numbers between 0.0 and 1.0 inclusive. +@end defun + +@defun color-dark-p rgb +This function returns non-@code{nil} if the color described by its RGB +triplet @var{rgb} is more readable against white background than +against dark background. The argument @var{rgb} should be a list of +the form @w{@code{(@var{r} @var{g} @var{b})}}, with each component a +floating-point number in the range 0.0 to 1.0 inclusive. You can use +@code{color-name-to-rgb} to convert a color's name to such a list. +@end defun + @node Text Terminal Colors @section Text Terminal Colors @cindex colors on text terminals From 9855a3ea7447b6045407ff55ad2c448d1302bcce Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 9 Jun 2023 19:19:07 +0300 Subject: [PATCH 16/18] ; * src/xdisp.c (redisplay_tool_bar): Fix a typo in a comment. --- src/xdisp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xdisp.c b/src/xdisp.c index 2ddfdf0d51b..c9b488b7fb2 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -15346,7 +15346,7 @@ redisplay_tool_bar (struct frame *f) 0, 0, 0, STRING_MULTIBYTE (f->desired_tool_bar_string)); /* FIXME: This should be controlled by a user option. But it doesn't make sense to have an R2L tool bar if the menu bar cannot - be drawn also R2L, and making the menu bar R2L is tricky due + be drawn also R2L, and making the menu bar R2L is tricky due to toolkit-specific code that implements it. If an R2L tool bar is ever supported, display_tool_bar_line should also be augmented to call unproduce_glyphs like display_line and display_string From f11e2d369995ffc514005578857e5b7819e779eb Mon Sep 17 00:00:00 2001 From: Gregory Heytings Date: Sat, 10 Jun 2023 08:50:47 +0000 Subject: [PATCH 17/18] ; * admin/git-bisect-start: Update failing commits --- admin/git-bisect-start | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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 # SKIP-BRANCH 58cc931e92ece70c3e64131ee12a799d65409100 ## The list below is the exhaustive list of all commits between Dec 1 -## 2016 and Apr 30 2023 on which building Emacs with the default +## 2016 and Jun 8 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 @@ -1723,3 +1723,15 @@ $REAL_GIT bisect skip $(cat $0 | grep '^# SKIP-SINGLE ' | sed 's/^# SKIP-SINGLE # SKIP-SINGLE 9686b015a0d71d08828afb0cfe6e477bbc4909ae # SKIP-SINGLE 621e732ade0f3dc165498ebde4d55d5aacb05b56 # SKIP-SINGLE 200dbf7d302e659e618f74bde81c7b3ccd795639 +# SKIP-SINGLE 03663b8798a06bf18ff1e235ac0fb87870f8fe77 +# SKIP-SINGLE 4897c98b6c496801aad2477c289a40a300eee27f +# SKIP-SINGLE e6585e0be2efc3f2eaec7210b036169fbdffa9ce +# SKIP-SINGLE 8ec786349e18068bff39b1387bc4a88d62265e34 +# SKIP-SINGLE 0eba9cf65119a68596c4bf3689086a517d51ce72 +# SKIP-SINGLE ede3535051a8f3b209b830adcaba9cb1ddf58685 +# SKIP-SINGLE 2f94f6de9d64f9fd89284dac171e166e7d721dcd +# SKIP-SINGLE ab5258b19255ebff04df01d6f55888f43c42dcb9 +# SKIP-SINGLE dc7acb1aafe9b0b84481ac51a5bd5125d263537e +# SKIP-SINGLE 348e4504c6d5588443809ec28da3c3c693368e16 +# SKIP-SINGLE 970f94a2dd8bc4be4d71f1075421093ca6f87d28 +# SKIP-SINGLE 6b2c8dc9050c5c0514fa404733ce1d4a37d00e39 From 0d8b69e0ad37fe2d801e16a0ccafd8759dd33d02 Mon Sep 17 00:00:00 2001 From: Morgan Smith Date: Mon, 5 Jun 2023 13:34:59 -0400 Subject: [PATCH 18/18] Don't ding when completion succeeded * lisp/minibuffer.el (minibuffer-completion-help): Ensure 'ding' is not called on a successful completion. Ensure 'ding' is not called on a failure if 'completion-fail-discreetly' is set. Also change "No completions" to "No match" as that is what is used elsewhere. (Bug#63913) --- lisp/minibuffer.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index a873e5f9747..44226449af2 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -2388,9 +2388,11 @@ These include: ;; If there are no completions, or if the current input is already ;; the sole completion, then hide (previous&stale) completions. (minibuffer-hide-completions) - (ding) - (completion--message - (if completions "Sole completion" "No completions"))) + (if completions + (completion--message "Sole completion") + (unless completion-fail-discreetly + (ding) + (completion--message "No match")))) (let* ((last (last completions)) (base-size (or (cdr last) 0))