commit f91de96d036d519c98c7d09e3a8516c916a5ec56 (HEAD, refs/remotes/origin/master) Author: Eli Zaretskii Date: Sun Oct 12 08:38:00 2025 +0300 Update MS-Windows manifest for Emacs * nt/emacs-x64.manifest: * nt/emacs-x86.manifest: supportedOS GUID for Windows 11 is the same as for Windows 10. See https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests#trustinfo diff --git a/nt/emacs-x64.manifest b/nt/emacs-x64.manifest index 57ce3337c55..bd55a82cfd8 100644 --- a/nt/emacs-x64.manifest +++ b/nt/emacs-x64.manifest @@ -28,7 +28,7 @@ - + diff --git a/nt/emacs-x86.manifest b/nt/emacs-x86.manifest index 1be75b10629..5e0a892624f 100644 --- a/nt/emacs-x86.manifest +++ b/nt/emacs-x86.manifest @@ -28,7 +28,7 @@ - + commit 90b43e32083610ca89da89efab9cfbc9f85b960e Author: Juri Linkov Date: Sat Oct 11 21:37:52 2025 +0300 * lisp/progmodes/hideshow.el: Small improvements (bug#79585). (hs-allow-nesting): Turn defvar into defcustom. (hs-indicator-hide): Use BLACK DOWN-POINTING SMALL TRIANGLE as a counterpart for the BLACK RIGHT-POINTING SMALL TRIANGLE. diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index 07d7236c9b4..d01f855a7f8 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el @@ -338,7 +338,7 @@ size." :face hs-indicator-hide :height (0.6 . em) :ascent center) - (symbol "🞃" "▼" :face hs-indicator-hide) + (symbol "▾" "▼" :face hs-indicator-hide) (text "-" :face hs-indicator-hide)) "Icon used for hide block at point. This is only used if `hs-indicator-type' is set to `margin' or nil." @@ -413,10 +413,12 @@ whitespace. Case does not matter.") (defvar hs-hide-all-non-comment-function nil "Function called if non-nil when doing `hs-hide-all' for non-comments.") -(defvar hs-allow-nesting nil +(defcustom hs-allow-nesting nil "If non-nil, hiding remembers internal blocks. This means that when the outer block is shown again, -any previously hidden internal blocks remain hidden.") +any previously hidden internal blocks remain hidden." + :type 'boolean + :version "31.1") (defvar hs-hide-hook nil "Hook called (with `run-hooks') at the end of commands to hide text. commit 2acd9702de4f6a3c4915549ade6fca7bbac4ca6c Author: Sean Whitton Date: Sat Oct 11 13:56:21 2025 +0100 ; Simplify last change slightly, improve wording, add xref. diff --git a/doc/misc/use-package.texi b/doc/misc/use-package.texi index bd76f0e77b6..dc586ca9ae9 100644 --- a/doc/misc/use-package.texi +++ b/doc/misc/use-package.texi @@ -1074,8 +1074,10 @@ autoloaded from the given package. However, this does not work if one of those commands is actually a keymap, since keymaps are not functions, and cannot be autoloaded using the built-in @code{autoload} function. -When you define a keymap using @code{defvar-keymap}, you make it behave -as a function, including @code{:prefix t} in the keymap definition. +When you define a keymap using @code{defvar-keymap} you can add the +required function definition by including @code{:prefix t} in the keymap +definition (@pxref{Creating Keymaps,,, elisp, GNU Emacs Lisp Reference +Manual}). For example: @@ -1088,13 +1090,13 @@ For example: "B" #'foo-command-b) (use-package foo - :bind (("C-c x" . foo-mode-exit) - ("C-c p" . foo-command-map))) + :bind (("C-c p" . foo-command-map))) @end group @end lisp -would create the bindings for the key sequences @code{"C-c p A"}, -@code{"C-c p B"} and @code{"C-c x"} for package @code{foo}. +@noindent +would create the bindings for the key sequences @code{"C-c p A"}, and +@code{"C-c p B"} for package @code{foo}. @findex :bind-keymap Alternatively, to handle this case, @code{use-package} offers a special, limited commit 1170c277463eb2cc5e121a2ac9e91ad61973a2f8 Author: Pedro Andres Aranda Gutierrez Date: Sat Oct 11 13:53:13 2025 +0100 ; use-package manual: Discuss defvar-keymap ':prefix t' * doc/misc/use-package.texi (Binding to a keymap): Discuss defvar-keymap ':prefix t' feature. diff --git a/doc/misc/use-package.texi b/doc/misc/use-package.texi index 7fae93bbb88..bd76f0e77b6 100644 --- a/doc/misc/use-package.texi +++ b/doc/misc/use-package.texi @@ -1069,13 +1069,35 @@ before the first use of @code{:map} are applied to the global keymap: @subsection Binding to keymaps @cindex binding keys to keymaps -@findex :bind-keymap Normally @code{:bind} expects that commands are functions that will be autoloaded from the given package. However, this does not work if one of those commands is actually a keymap, since keymaps are not functions, and cannot be autoloaded using the built-in @code{autoload} function. -To handle this case, @code{use-package} offers a special, limited +When you define a keymap using @code{defvar-keymap}, you make it behave +as a function, including @code{:prefix t} in the keymap definition. + +For example: + +@lisp +@group +(defvar-keymap foo-command-map + :doc "A keymap that returns a function" + :prefix t + "A" #'foo-command-a + "B" #'foo-command-b) + +(use-package foo + :bind (("C-c x" . foo-mode-exit) + ("C-c p" . foo-command-map))) +@end group +@end lisp + +would create the bindings for the key sequences @code{"C-c p A"}, +@code{"C-c p B"} and @code{"C-c x"} for package @code{foo}. + +@findex :bind-keymap +Alternatively, to handle this case, @code{use-package} offers a special, limited variant of @code{:bind} called @code{:bind-keymap}. The only difference is that the ``commands'' bound to by @code{:bind-keymap} must be keymaps defined in the package, rather than interactive functions. This is handled commit ba7e9579260e146d53d1fc039ff2035ff45fca75 Author: Michael Albinus Date: Sat Oct 11 14:37:04 2025 +0200 Make cascaded archives working in tramp-archive.el work, again * lisp/net/tramp-archive.el (tramp-archive-file-name-handler): Move bindings of `tramp-methods' and `tramp-gvfs-methods' up. (tramp-archive-file-name-handler): Do not use `tramp-archive-run-real-handler' for testing existence of `archive'. (Bug#79582) * test/lisp/net/tramp-archive-tests.el (tramp-archive-test-file-archive-hexlified): Move down. (tramp-archive-test-cascaded-file-archive) (tramp-archive-test-cascaded-archive, tramp-archive-test-cascaded): New defvars. (tramp-archive--test-deftest-cascaded): New defmacro. (tramp-archive-test01-file-name-syntax) (tramp-archive-test05-expand-file-name): Adapt tests. (tramp-archive-test01-file-name-syntax-cascaded) (tramp-archive-test05-expand-file-name-cascaded) (tramp-archive-test06-directory-file-name-cascaded) (tramp-archive-test07-file-exists-p-cascaded) (tramp-archive-test08-file-local-copy-cascaded) (tramp-archive-test09-insert-file-contents-cascaded) (tramp-archive-test11-copy-file-cascaded) (tramp-archive-test15-copy-directory-cascaded) (tramp-archive-test16-directory-files-cascaded) (tramp-archive-test17-insert-directory-cascaded) (tramp-archive-test18-file-attributes-cascaded) (tramp-archive-test19-directory-files-and-attributes-cascaded) (tramp-archive-test20-file-modes-cascaded) (tramp-archive-test21-file-links-cascaded) (tramp-archive-test26-file-name-completion-cascaded) (tramp-archive-test40-make-nearby-temp-file-cascaded) (tramp-archive-test43-file-system-info-cascaded) (tramp-archive-test44-user-group-ids-cascaded): New tests. * test/lisp/net/tramp-archive-resources/outer.zip: New test file. diff --git a/lisp/net/tramp-archive.el b/lisp/net/tramp-archive.el index 3de909911b4..a52b8be6e09 100644 --- a/lisp/net/tramp-archive.el +++ b/lisp/net/tramp-archive.el @@ -338,15 +338,16 @@ arguments to pass to the OPERATION." (tramp-register-file-name-handlers) (tramp-archive-run-real-handler operation args)) - (let* ((filename (apply #'tramp-archive-file-name-for-operation + (let* ((tramp-methods (cons `(,tramp-archive-method) tramp-methods)) + (tramp-gvfs-methods tramp-archive-all-gvfs-methods) + (filename (apply #'tramp-archive-file-name-for-operation operation args)) (archive (tramp-archive-file-name-archive filename))) ;; `filename' could be a quoted file name. Or the file ;; archive could be a directory, see Bug#30293. (if (or (null archive) - (not (tramp-archive-run-real-handler - #'file-exists-p (list archive))) + (not (file-exists-p archive)) (tramp-archive-run-real-handler #'file-directory-p (list archive))) (tramp-archive-run-real-handler operation args) @@ -358,9 +359,7 @@ arguments to pass to the OPERATION." (tramp-get-buffer (tramp-archive-dissect-file-name filename)) (setq default-directory (file-name-as-directory archive))) ;; Now run the handler. - (let ((tramp-methods (cons `(,tramp-archive-method) tramp-methods)) - (tramp-gvfs-methods tramp-archive-all-gvfs-methods) - ;; Set uid and gid. gvfsd-archive could do it, but it doesn't. + (let (;; Set uid and gid. gvfsd-archive could do it, but it doesn't. (tramp-unknown-id-integer (user-uid)) (tramp-unknown-id-string (user-login-name)) (fn (assoc operation tramp-archive-file-name-handler-alist))) diff --git a/test/lisp/net/tramp-archive-resources/outer.zip b/test/lisp/net/tramp-archive-resources/outer.zip new file mode 100644 index 00000000000..deda1013eb0 Binary files /dev/null and b/test/lisp/net/tramp-archive-resources/outer.zip differ diff --git a/test/lisp/net/tramp-archive-tests.el b/test/lisp/net/tramp-archive-tests.el index 33dc0b9d4af..ec56c4a0f93 100644 --- a/test/lisp/net/tramp-archive-tests.el +++ b/test/lisp/net/tramp-archive-tests.el @@ -36,12 +36,6 @@ (defvar tramp-archive-test-file-archive (ert-resource-file "foo.tar.gz") "The test file archive.") -(defun tramp-archive-test-file-archive-hexlified () - "Return hexlified `tramp-archive-test-file-archive'. -Do not hexlify \"/\". This hexlified string is used in `file:///' URLs." - (let* ((url-unreserved-chars (cons ?/ url-unreserved-chars))) - (url-hexify-string tramp-archive-test-file-archive))) - (defvar tramp-archive-test-archive (file-name-as-directory tramp-archive-test-file-archive) "The test archive.") @@ -50,11 +44,28 @@ Do not hexlify \"/\". This hexlified string is used in `file:///' URLs." (file-truename (ert-resource-file "foo.iso")) "A directory file name, which looks like an archive.") +(defvar tramp-archive-test-cascaded-file-archive + (ert-resource-file "outer.zip/foo.tar.gz") + "The cascaded test file archive.") + +(defvar tramp-archive-test-cascaded-archive + (file-name-as-directory tramp-archive-test-cascaded-file-archive) + "The cascaded test archive.") + +(defun tramp-archive-test-file-archive-hexlified () + "Return hexlified `tramp-archive-test-file-archive'. +Do not hexlify \"/\". This hexlified string is used in `file:///' URLs." + (let* ((url-unreserved-chars (cons ?/ url-unreserved-chars))) + (url-hexify-string tramp-archive-test-file-archive))) + (setq password-cache-expiry nil tramp-cache-read-persistent-data t ;; For auth-sources. tramp-persistency-file-name nil tramp-verbose 0) +(defvar tramp-archive-test-cascaded nil + "Indicator, whether we are testing a cascaded archive.") + (defun tramp-archive--test-make-temp-name () "Return a temporary file name for test. The temporary file is not created." @@ -86,9 +97,29 @@ the origin of the temporary TMPFILE, have no write permissions." (file-exists-p tramp-archive-test-file-archive) (tramp-archive-file-name-p tramp-archive-test-archive)))) +;; These tests are inspired by Bug#79582. +(defmacro tramp-archive--test-deftest-cascaded (test) + "Define ert `TEST-cascaded'." + (declare (indent 1)) + `(ert-deftest ,(intern (concat (symbol-name test) "-cascaded")) () + :tags '(:expensive-test) + ;(tramp--test-set-ert-test-documentation ',test "cascaded") + (skip-unless tramp-archive-enabled) + (if-let* ((ert-test (ert-get-test ',test)) + (result (ert-test-most-recent-result ert-test)) + (tramp-archive-test-file-archive + tramp-archive-test-cascaded-file-archive) + (tramp-archive-test-archive tramp-archive-test-cascaded-archive) + (tramp-archive-test-cascaded t)) + (progn + (skip-unless (< (ert-test-result-duration result) 300)) + (funcall (ert-test-body ert-test))) + (ert-skip (format "Test `%s' must run before" ',test))))) + (ert-deftest tramp-archive-test01-file-name-syntax () "Check archive file name syntax." - (should-not (tramp-archive-file-name-p tramp-archive-test-file-archive)) + (unless tramp-archive-test-cascaded + (should-not (tramp-archive-file-name-p tramp-archive-test-file-archive))) (should (tramp-archive-file-name-p tramp-archive-test-archive)) (should (string-equal @@ -136,6 +167,8 @@ the origin of the temporary TMPFILE, have no write permissions." (concat tramp-archive-test-archive "baz.tar/")) "/"))) +(tramp-archive--test-deftest-cascaded tramp-archive-test01-file-name-syntax) + (ert-deftest tramp-archive-test02-file-name-dissect () "Check archive file name components." (skip-unless tramp-archive-enabled) @@ -250,10 +283,13 @@ the origin of the temporary TMPFILE, have no write permissions." (string-equal (expand-file-name (concat tramp-archive-test-archive "./file")) (concat tramp-archive-test-archive "file"))) - (should - (string-equal - (expand-file-name (concat tramp-archive-test-archive "../file")) - (concat (ert-resource-directory) "file")))) + (unless tramp-archive-test-cascaded + (should + (string-equal + (expand-file-name (concat tramp-archive-test-archive "../file")) + (concat (ert-resource-directory) "file"))))) + +(tramp-archive--test-deftest-cascaded tramp-archive-test05-expand-file-name) ;; This test is inspired by Bug#30293. (ert-deftest tramp-archive-test05-expand-file-name-non-archive-directory () @@ -332,6 +368,8 @@ This checks also `file-name-as-directory', `file-name-directory', (unhandled-file-name-directory (concat tramp-archive-test-archive "path/to/file")))) +(tramp-archive--test-deftest-cascaded tramp-archive-test06-directory-file-name) + (ert-deftest tramp-archive-test07-file-exists-p () "Check `file-exist-p', `write-region' and `delete-file'." :tags '(:expensive-test) @@ -355,6 +393,8 @@ This checks also `file-name-as-directory', `file-name-directory', ;; Cleanup. (tramp-archive-cleanup-hash))) +(tramp-archive--test-deftest-cascaded tramp-archive-test07-file-exists-p) + (ert-deftest tramp-archive-test08-file-local-copy () "Check `file-local-copy'." :tags '(:expensive-test) @@ -382,6 +422,8 @@ This checks also `file-name-as-directory', `file-name-directory', (ignore-errors (tramp-archive--test-delete tmp-name)) (tramp-archive-cleanup-hash)))) +(tramp-archive--test-deftest-cascaded tramp-archive-test08-file-local-copy) + (ert-deftest tramp-archive-test09-insert-file-contents () "Check `insert-file-contents'." :tags '(:expensive-test) @@ -409,6 +451,8 @@ This checks also `file-name-as-directory', `file-name-directory', ;; Cleanup. (tramp-archive-cleanup-hash)))) +(tramp-archive--test-deftest-cascaded tramp-archive-test09-insert-file-contents) + (ert-deftest tramp-archive-test11-copy-file () "Check `copy-file'." :tags '(:expensive-test) @@ -475,6 +519,8 @@ This checks also `file-name-as-directory', `file-name-directory', (ignore-errors (tramp-archive--test-delete tmp-name2)) (tramp-archive-cleanup-hash)))) +(tramp-archive--test-deftest-cascaded tramp-archive-test11-copy-file) + (ert-deftest tramp-archive-test15-copy-directory () "Check `copy-directory'." :tags '(:expensive-test) @@ -528,6 +574,8 @@ This checks also `file-name-as-directory', `file-name-directory', (ignore-errors (tramp-archive--test-delete tmp-name2)) (tramp-archive-cleanup-hash)))) +(tramp-archive--test-deftest-cascaded tramp-archive-test15-copy-directory) + (ert-deftest tramp-archive-test16-directory-files () "Check `directory-files'." :tags '(:expensive-test) @@ -552,6 +600,8 @@ This checks also `file-name-as-directory', `file-name-directory', ;; Cleanup. (tramp-archive-cleanup-hash)))) +(tramp-archive--test-deftest-cascaded tramp-archive-test16-directory-files) + (ert-deftest tramp-archive-test17-insert-directory () "Check `insert-directory'." :tags '(:expensive-test) @@ -600,6 +650,8 @@ This checks also `file-name-as-directory', `file-name-directory', ;; Cleanup. (tramp-archive-cleanup-hash)))) +(tramp-archive--test-deftest-cascaded tramp-archive-test17-insert-directory) + (ert-deftest tramp-archive-test18-file-attributes () "Check `file-attributes'. This tests also `access-file', `file-readable-p' and `file-regular-p'." @@ -661,6 +713,8 @@ This tests also `access-file', `file-readable-p' and `file-regular-p'." ;; Cleanup. (tramp-archive-cleanup-hash)))) +(tramp-archive--test-deftest-cascaded tramp-archive-test18-file-attributes) + (ert-deftest tramp-archive-test19-directory-files-and-attributes () "Check `directory-files-and-attributes'." :tags '(:expensive-test) @@ -686,6 +740,9 @@ This tests also `access-file', `file-readable-p' and `file-regular-p'." ;; Cleanup. (tramp-archive-cleanup-hash)))) +(tramp-archive--test-deftest-cascaded + tramp-archive-test19-directory-files-and-attributes) + (ert-deftest tramp-archive-test20-file-modes () "Check `file-modes'. This tests also `file-executable-p', `file-writable-p' and `set-file-modes'." @@ -717,6 +774,8 @@ This tests also `file-executable-p', `file-writable-p' and `set-file-modes'." ;; Cleanup. (tramp-archive-cleanup-hash)))) +(tramp-archive--test-deftest-cascaded tramp-archive-test20-file-modes) + (ert-deftest tramp-archive-test21-file-links () "Check `file-symlink-p' and `file-truename'" :tags '(:expensive-test) @@ -758,6 +817,8 @@ This tests also `file-executable-p', `file-writable-p' and `set-file-modes'." ;; Cleanup. (tramp-archive-cleanup-hash)))) +(tramp-archive--test-deftest-cascaded tramp-archive-test21-file-links) + (ert-deftest tramp-archive-test26-file-name-completion () "Check `file-name-completion' and `file-name-all-completions'." :tags '(:expensive-test) @@ -797,6 +858,8 @@ This tests also `file-executable-p', `file-writable-p' and `set-file-modes'." ;; Cleanup. (tramp-archive-cleanup-hash)))) +(tramp-archive--test-deftest-cascaded tramp-archive-test26-file-name-completion) + (ert-deftest tramp-archive-test40-make-nearby-temp-file () "Check `make-nearby-temp-file' and `temporary-file-directory'." (skip-unless tramp-archive-enabled) @@ -824,6 +887,8 @@ This tests also `file-executable-p', `file-writable-p' and `set-file-modes'." (delete-directory tmp-file) (should-not (file-exists-p tmp-file)))) +(tramp-archive--test-deftest-cascaded tramp-archive-test40-make-nearby-temp-file) + (ert-deftest tramp-archive-test43-file-system-info () "Check that `file-system-info' returns proper values." (skip-unless tramp-archive-enabled) @@ -837,6 +902,8 @@ This tests also `file-executable-p', `file-writable-p' and `set-file-modes'." (zerop (nth 1 fsi)) (zerop (nth 2 fsi)))))) +(tramp-archive--test-deftest-cascaded tramp-archive-test43-file-system-info) + ;; `file-user-uid' and `file-group-gid' were introduced in Emacs 30.1. (ert-deftest tramp-archive-test44-user-group-ids () "Check results of user/group functions. @@ -856,6 +923,8 @@ This tests also `file-executable-p', `file-writable-p' and `set-file-modes'." (should (equal uid (with-no-warnings (file-user-uid)))) (should (equal gid (with-no-warnings (file-group-gid))))))) +(tramp-archive--test-deftest-cascaded tramp-archive-test44-user-group-ids) + (ert-deftest tramp-archive-test50-auto-load () "Check that `tramp-archive' autoloads properly." :tags '(:expensive-test) commit dcea973c04bc9f1078444dc1faf9491408832423 Author: Eli Zaretskii Date: Sat Oct 11 14:00:09 2025 +0300 Fix MS-Windows tray notifications from different Emacs frames * src/w32fns.c (EMACS_TRAY_NOTIFICATION_ID_INIT): Rename from EMACS_TRAY_NOTIFICATION_ID; all users adjusted. (last_tray_notification_id): New static variable. (add_tray_notification): Advance 'last_tray_notification_id' for each new notification; wrap around to the fixed initial value when reached the maximum. This allows Lisp programs track notifications and remove them from the same frame from which they were created. (Fw32_notification_notify, Fw32_notification_close): Doc fixes. * doc/lispref/os.texi (Desktop Notifications): Update the documentation of 'w32-notification-notify' and 'w32-notification-close'. Bug#79400 diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index 1591cbd7be0..585ae678842 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi @@ -3255,9 +3255,10 @@ Note that versions of Windows before W2K support only @code{:icon} and @code{:tip}. The other parameters can be passed, but they will be ignored on those old systems. -There can be at most one active notification at any given time. An -active notification must be removed by calling -@code{w32-notification-close} before a new one can be shown. +There can be at most one active notification at any given time for each +Emacs frame. An active notification must be removed by calling +@code{w32-notification-close} before a new one can be shown for the same +frame. @end defun To remove the notification and its icon from the taskbar, use the @@ -3265,7 +3266,12 @@ following function: @defun w32-notification-close id This function removes the tray notification given by its unique -@var{id}. +@var{id}. The same Emacs frame which was the selected frame when the +notification was created must be selected when removing the +notification. A Lisp program which shows notifications must track which +frame corresponds to which notification @var{id}, and select that frame +when removing the notification. (When a frame is deleted, a +notification it created, if any, will be removed by MS-Windows.) @end defun @cindex desktop notifications, Haiku diff --git a/src/w32fns.c b/src/w32fns.c index 4aaafdd85d3..3fc0f55244f 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -10337,8 +10337,8 @@ typedef struct MY_NOTIFYICONDATAW { #endif -#define EMACS_TRAY_NOTIFICATION_ID 42 /* arbitrary */ -#define EMACS_NOTIFICATION_MSG (WM_APP + 1) +#define EMACS_TRAY_NOTIFICATION_ID_INIT 42 /* arbitrary */ +#define EMACS_NOTIFICATION_MSG (WM_APP + 1) enum NI_Severity { Ni_None, @@ -10403,14 +10403,16 @@ utf8_mbslen_lim (const char *str, int lim) return mblen; } +static unsigned short last_tray_notification_id; + /* Low-level subroutine to show tray notifications. All strings are supposed to be unibyte UTF-8 encoded by the caller. */ -static EMACS_INT +static int add_tray_notification (struct frame *f, const char *icon, const char *tip, enum NI_Severity severity, unsigned timeout, const char *title, const char *msg) { - EMACS_INT retval = EMACS_TRAY_NOTIFICATION_ID; + int retval = -1; if (FRAME_W32_P (f)) { @@ -10437,7 +10439,12 @@ add_tray_notification (struct frame *f, const char *icon, const char *tip, else nidw.cbSize = MYNOTIFYICONDATAW_V1_SIZE; /* < W2K */ nidw.hWnd = FRAME_W32_WINDOW (f); - nidw.uID = EMACS_TRAY_NOTIFICATION_ID; + if (!last_tray_notification_id) + last_tray_notification_id = EMACS_TRAY_NOTIFICATION_ID_INIT; + else + last_tray_notification_id++; + retval = last_tray_notification_id; + nidw.uID = last_tray_notification_id; nidw.uFlags = NIF_MESSAGE | NIF_ICON | NIF_TIP | NIF_INFO; nidw.uCallbackMessage = EMACS_NOTIFICATION_MSG; if (!*icon) @@ -10660,16 +10667,19 @@ Note that versions of Windows before W2K support only `:icon' and `:tip'. You can pass the other parameters, but they will be ignored on those old systems. -There can be at most one active notification at any given time. An -active notification must be removed by calling `w32-notification-close' -before a new one can be shown. +There can be at most one active notification at any given time per each +Emacs frame. An active notification must be removed by calling the +function `w32-notification-close', with the same frame selected as the +one which was selected when the notification was created, before a new +one can be shown for the same frame. The caller must track which +notification was created from which frame, using the returned ID value. usage: (w32-notification-notify &rest PARAMS) */) (ptrdiff_t nargs, Lisp_Object *args) { struct frame *f = SELECTED_FRAME (); Lisp_Object arg_plist, lres; - EMACS_INT retval; + int retval; char *icon, *tip, *title, *msg; enum NI_Severity severity; unsigned timeout = 0; @@ -10732,7 +10742,9 @@ usage: (w32-notification-notify &rest PARAMS) */) DEFUN ("w32-notification-close", Fw32_notification_close, Sw32_notification_close, 1, 1, 0, - doc: /* Remove the MS-Windows tray notification specified by its ID. */) + doc: /* Remove the MS-Windows tray notification specified by its ID. +The frame which was selected when the notification was created must +be selected when removing the notification. */) (Lisp_Object id) { struct frame *f = SELECTED_FRAME (); commit c723760f281036f5ae9fe651648ffc707340616d Merge: 4136bcb6923 1895ba3ba3b Author: Eli Zaretskii Date: Sat Oct 11 06:02:56 2025 -0400 Merge from origin/emacs-30 1895ba3ba3b ; Document %i format 85db0ac0d6e ; * doc/lispref/nonascii.texi (Explicit Encoding): Fix a ... c119a3600ed ; * doc/lispref/tips.texi (Documentation Tips): Document ... Also fix trailing whitespace in test files. commit 4136bcb6923a88881995c6228c3609c5e0e132c4 Author: Elías Gabriel Pérez Date: Sun Oct 5 21:46:36 2025 -0600 hideshow: Fix cursor when using end-of-line indicators. bug#79580 * lisp/progmodes/hideshow.el (hs--make-indicators-overlays): Add 'cursor' property to the EOL indicator, so it will not conflict with flymake EOL indicators. diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index b90b85e6bf8..07d7236c9b4 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el @@ -732,10 +732,12 @@ point." 'keymap hs-indicators-map)) ;; EOL string ('nil - (propertize - (icon-string face-or-icon) - 'mouse-face 'highlight - 'keymap hs-indicators-map)))))))) + (concat + (propertize " " 'cursor t) + (propertize + (icon-string face-or-icon) + 'mouse-face 'highlight + 'keymap hs-indicators-map))))))))) (defun hs--add-indicators (&optional beg end) "Add hideable indicators from BEG to END." commit c76da79e4517164cdb9985b35c81350b36470698 Author: Eli Zaretskii Date: Sat Oct 11 12:47:04 2025 +0300 ; * doc/emacs/mini.texi (Minibuffer History): Improve indexing. diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi index a9dfefc58f8..37a20f3eb78 100644 --- a/doc/emacs/mini.texi +++ b/doc/emacs/mini.texi @@ -897,13 +897,15 @@ minibuffer, replacing its existing contents. Typing @kbd{M-n} list in the opposite direction, fetching later entries into the minibuffer. +@cindex future history If you type @kbd{M-n} in the minibuffer when there are no later entries in the minibuffer history (e.g., if you haven't previously typed @kbd{M-p}), Emacs tries fetching from a list of default arguments: values that you are likely to enter. You can think of this -as moving through the ``future history''. +as moving through the @dfn{future history}. Searching forward through +minibuffer history (@pxref{Isearch Minibuffer}) includes the ``future +history'' as well. -@cindex future history for file names @cindex minibuffer defaults for file names @vindex file-name-at-point-functions The ``future history'' for file names includes several possible commit f362cef564e68d27276617ea1b8763ee06ee50ad Author: Pooya Moradi Date: Thu Oct 9 16:19:05 2025 +0330 Eglot: Add LSP server for TOML. * lisp/progmodes/eglot.el (eglot-server-programs): Add LSP server for TOML. (Bug#79605) Copyright-paperwork-exempt: yes diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 6a7edef08b3..5277df8b7c4 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -306,6 +306,7 @@ automatically)." . ,(eglot-alternatives '("digestif" "texlab"))) (erlang-mode . ("erlang_ls" "--transport" "stdio")) ((yaml-ts-mode yaml-mode) . ("yaml-language-server" "--stdio")) + ((toml-ts-mode conf-toml-mode) . ("tombi" "lsp")) (nix-mode . ,(eglot-alternatives '("nil" "rnix-lsp" "nixd"))) (nickel-mode . ("nls")) ((nushell-mode nushell-ts-mode) . ("nu" "--lsp")) commit f8b4ce68432d513526a372b726afbdeb7310e407 Author: Eli Zaretskii Date: Sat Oct 11 12:22:58 2025 +0300 Fix last change At least on MS-Windows, the last change caused the process-tests/fd-setsize-no-crash/make-process test to hang. * src/process.c (wait_reading_process_output) [WINDOWSNT]: Do not stop monitoring the process descriptor when zero bytes are read. The EOF indication from subprocesses on MS-Windows is detected via an error condition (see w32.c), while zero-size reads are not to be taken as such. (Bug#79436) diff --git a/src/process.c b/src/process.c index bd128311033..86e83e58c56 100644 --- a/src/process.c +++ b/src/process.c @@ -6054,7 +6054,11 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, process gone just because its pipe is closed. */ else if (nread == 0 && !NETCONN_P (proc) && !SERIALCONN_P (proc) && !PIPECONN_P (proc)) +#ifdef WINDOWSNT + ; +#else delete_read_fd (channel); +#endif else if (nread == 0 && PIPECONN_P (proc)) { /* Preserve status of processes already terminated. */ commit c172b6dded4f92f47f035b724605ecbb0e19970c Author: Spencer Baugh Date: Tue Sep 30 14:47:51 2025 -0400 Stop monitoring fds after receiving EOF When a subprocess closes its stdout/stderr pipe, that causes pselect to always indicate that fd is readable, and read to always return with EOF on that fd. Therefore when we receive an EOF we need to stop monitoring the fd. Otherwise Emacs will spin at 100% CPU, repeatedly reading that same EOF off the fd. * src/process.c (wait_reading_process_output): When 'read_process_output' returns EOF indication, stop monitoring the descriptor. (Bug#79436) diff --git a/src/process.c b/src/process.c index 82b8829ba8c..bd128311033 100644 --- a/src/process.c +++ b/src/process.c @@ -6054,7 +6054,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, process gone just because its pipe is closed. */ else if (nread == 0 && !NETCONN_P (proc) && !SERIALCONN_P (proc) && !PIPECONN_P (proc)) - ; + delete_read_fd (channel); else if (nread == 0 && PIPECONN_P (proc)) { /* Preserve status of processes already terminated. */ commit 443af6fe1d0161142af0bc4578efd0653c3f1be9 Author: Spencer Baugh Date: Tue Oct 7 14:41:20 2025 -0400 Allow creating a pipe process without a buffer Previously, even passing :buffer nil to make-pipe-process would create a buffer. Now, if you explicitly call (make-pipe-process :buffer nil), it will create a pipe process without a buffer, just like all the other process creation functions. * src/process.c (Fmake_pipe_process): Check for explicit :buffer nil and don't make a buffer. (bug#79596) * doc/lispref/processes.texi (Asynchronous Processes): Update. * test/src/process-tests.el (process-test-make-pipe-process-no-buffer): Add test. diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index 59f6ddeb63b..12e43cda5a6 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi @@ -842,7 +842,8 @@ Use the string @var{name} as the process name. As with @code{make-process}, it is modified if necessary to make it unique. @item :buffer @var{buffer} -Use @var{buffer} as the process buffer. +Use @var{buffer} as the process buffer. If the value is @code{nil}, +the subprocess is not associated with any buffer. @item :coding @var{coding} If @var{coding} is a symbol, it specifies the coding system to be diff --git a/src/process.c b/src/process.c index 8ec420aaa2c..82b8829ba8c 100644 --- a/src/process.c +++ b/src/process.c @@ -2414,7 +2414,8 @@ arguments are defined: :buffer BUFFER -- BUFFER is the buffer (or buffer-name) to associate with the process. Process output goes at the end of that buffer, unless you specify a filter function to handle the output. If BUFFER -is not given, the value of NAME is used. +is not given, the value of NAME is used. BUFFER may be also nil, meaning +that this process is not associated with any buffer. :coding CODING -- If CODING is a symbol, it specifies the coding system used for both reading and writing for this process. If CODING @@ -2479,10 +2480,15 @@ usage: (make-pipe-process &rest ARGS) */) if (inchannel > max_desc) max_desc = inchannel; - buffer = plist_get (contact, QCbuffer); - if (NILP (buffer)) - buffer = name; - buffer = Fget_buffer_create (buffer, Qnil); + { + Lisp_Object buffer_member = plist_member (contact, QCbuffer); + if (NILP (buffer_member)) + buffer = name; + else + buffer = XCAR (XCDR (buffer_member)); + } + if (!NILP (buffer)) + buffer = Fget_buffer_create (buffer, Qnil); pset_buffer (p, buffer); pset_childp (p, contact); diff --git a/test/src/process-tests.el b/test/src/process-tests.el index 5f84d9acc6d..b8ceb931533 100644 --- a/test/src/process-tests.el +++ b/test/src/process-tests.el @@ -1053,5 +1053,11 @@ Return nil if FILENAME doesn't exist." (should (integerp (num-processors))) (should (< 0 (num-processors)))) +(ert-deftest process-test-make-pipe-process-no-buffer () + "Test that a pipe process can be created without a buffer." + (should (process-buffer (make-pipe-process :name "test"))) + (should (process-buffer (make-pipe-process :name "test" :buffer "test"))) + (should-not (process-buffer (make-pipe-process :name "test" :buffer nil)))) + (provide 'process-tests) ;;; process-tests.el ends here commit 1895ba3ba3b45bcb81e9d94902267c15094fbf79 Author: Eli Zaretskii Date: Sat Oct 11 12:08:48 2025 +0300 ; Document %i format * src/editfns.c (Fformat): Doc fix. * doc/lispref/strings.texi (Formatting Strings): Document %i. diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index cfc14be8ba0..f19dd6dd4d7 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi @@ -1036,6 +1036,7 @@ way. The object can also be a floating-point number that is formatted as an integer, dropping any fraction. @item %d +@itemx %i Replace the specification with the base-ten representation of a signed integer. The object can also be a floating-point number that is formatted as an integer, dropping any fraction. diff --git a/src/editfns.c b/src/editfns.c index ea71c3cda37..fc9162b12f9 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -3312,7 +3312,7 @@ The format control string may contain %-sequences meaning to substitute the next available argument, or the argument explicitly specified: %s means produce a string argument. Actually, produces any object with `princ'. -%d means produce as signed number in decimal. +%d or %i means produce a signed number in decimal. %o means produce a number in octal. %x means produce a number in hex. %X is like %x, but uses upper case. @@ -3324,7 +3324,7 @@ the next available argument, or the argument explicitly specified: %c means produce a number as a single character. %S means produce any object as an s-expression (using `prin1'). -The argument used for %d, %o, %x, %e, %f, %g or %c must be a number. +The argument used for %d, %i, %o, %x, %e, %f, %g or %c must be a number. %o, %x, and %X treat arguments as unsigned if `binary-as-unsigned' is t (this is experimental; email 32252@debbugs.gnu.org if you need it). Use %% to put a single % into the output. commit dc2650faa9c185b74e958dbda0665be6a2050923 Author: Sahil Kang Date: Sun Oct 5 14:53:45 2025 -0700 * src/pdumper.c (dump_queue_dequeue): Avoid -Wgnu-folding-constant. Fixes bug#79581 Copyright-paperwork-exempt: yes diff --git a/src/pdumper.c b/src/pdumper.c index 13744dd7c4a..4fa9c917124 100644 --- a/src/pdumper.c +++ b/src/pdumper.c @@ -1241,7 +1241,7 @@ dump_queue_dequeue (struct dump_queue *dump_queue, dump_off basis) dump_tailq_length (&dump_queue->one_weight_strong_objects), (ptrdiff_t) XHASH_TABLE (dump_queue->link_weights)->count); - static const int nr_candidates = 3; + #define nr_candidates 3 struct candidate { float score; @@ -1286,6 +1286,7 @@ dump_queue_dequeue (struct dump_queue *dump_queue, dump_off basis) && candidates[i].sequence < candidates[best].sequence))) best = i; } + #undef nr_candidates Lisp_Object result; const char *src; commit 3d0027afb5a4ec9922783a01b71845ad1fe37b8b Author: Manuel Giraud Date: Fri Oct 3 08:33:57 2025 +0200 Do not erase the output buffer upon empty async shell command * lisp/simple.el (shell-command): Test if an asynchronous shell command is not empty before creating or erasing the output buffer. (Bug#79560) diff --git a/lisp/simple.el b/lisp/simple.el index fb60ba5ca16..824f7c5a1a0 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -4719,13 +4719,16 @@ impose the use of a shell (with its need to quote arguments)." (bufferp output-buffer) (stringp output-buffer) (error "Asynchronous shell commands cannot output to current buffer"))) + ;; Remove the ampersand and test if the command is + ;; not empty before creating a new buffer. + (command (substring command 0 (match-beginning 0))) + (_ (or (not (string= command "")) + (error "Empty asynchronous command"))) (buffer (get-buffer-create (or output-buffer shell-command-buffer-name-async))) (bname (buffer-name buffer)) (proc (get-buffer-process buffer)) (directory default-directory)) - ;; Remove the ampersand. - (setq command (substring command 0 (match-beginning 0))) ;; Ask the user what to do with already running process. (when proc (cond commit 85db0ac0d6e2321f3486a8a500b729b9a85b7bee Author: Eli Zaretskii Date: Sat Oct 11 09:47:14 2025 +0300 ; * doc/lispref/nonascii.texi (Explicit Encoding): Fix a typo (bug#79613). diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi index eccca96df0a..57be79074fb 100644 --- a/doc/lispref/nonascii.texi +++ b/doc/lispref/nonascii.texi @@ -2000,7 +2000,7 @@ original text: @example @group (decode-coding-string "Gr\374ss Gott" 'latin-1) - @result{} #("Grüss Gott" 0 9 (charset iso-8859-1)) + @result{} #("Grüss Gott" 0 10 (charset iso-8859-1)) @end group @end example @end defun commit c119a3600ed98ddb4b8804af61ba6ec78792859c Author: Eli Zaretskii Date: Wed Oct 8 09:38:38 2025 +0300 ; * doc/lispref/tips.texi (Documentation Tips): Document \\+`foo'. diff --git a/doc/lispref/tips.texi b/doc/lispref/tips.texi index 3088decc1b2..017174f2edc 100644 --- a/doc/lispref/tips.texi +++ b/doc/lispref/tips.texi @@ -770,6 +770,15 @@ that satisfy the criterion. does not make a hyperlink to the documentation, irrelevant here, of the function @code{list}. +Alternatively, you could precede the symbol with @samp{\\+} to prevent +marking it as a hyperlink. Example: + +@example +If the value of KIND-OF-RESULT is \\+`list', +this function returns a list of all the objects +that satisfy the criterion. +@end example + Normally, no hyperlink is made for a variable without variable documentation. You can force a hyperlink for such variables by preceding them with one of the words @samp{variable} or