From e6ad97a3338c22224eb0da3f0d3226be255298a7 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 24 Nov 2023 09:30:53 +0200 Subject: [PATCH 1/5] Fix byte-compilation warnings about 'sqlite-rollback' * lisp/sqlite.el (sqlite-transaction, sqlite-commit) (sqlite-rollback): Declare. * lisp/emacs-lisp/multisession.el (sqlite-commit) (sqlite-transaction): Remove declaration. --- lisp/emacs-lisp/multisession.el | 2 -- lisp/sqlite.el | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/emacs-lisp/multisession.el b/lisp/emacs-lisp/multisession.el index b09777be407..4f95fc91dd8 100644 --- a/lisp/emacs-lisp/multisession.el +++ b/lisp/emacs-lisp/multisession.el @@ -137,8 +137,6 @@ DOC should be a doc string, and ARGS are keywords as applicable to (declare-function sqlite-select "sqlite.c") (declare-function sqlite-open "sqlite.c") (declare-function sqlite-pragma "sqlite.c") -(declare-function sqlite-transaction "sqlite.c") -(declare-function sqlite-commit "sqlite.c") (defvar multisession--db nil) diff --git a/lisp/sqlite.el b/lisp/sqlite.el index 8a525739c9a..22a0355d3cd 100644 --- a/lisp/sqlite.el +++ b/lisp/sqlite.el @@ -23,6 +23,10 @@ ;;; Code: +(declare-function sqlite-transaction "sqlite.c") +(declare-function sqlite-commit "sqlite.c") +(declare-function sqlite-rollback "sqlite.c") + (defmacro with-sqlite-transaction (db &rest body) "Execute BODY while holding a transaction for DB. If BODY completes normally, commit the changes and return From df094dd4bc122d0d1539ee01130dd2b4ed006549 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Fri, 24 Nov 2023 11:09:15 +0100 Subject: [PATCH 2/5] Do not unregister a D-Bus service which is a unique name * lisp/net/dbus.el (dbus-unregister-service): Check, whether SERVICE is a known name. (Bug#67386) --- lisp/net/dbus.el | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el index f35d11db152..95f92cf7786 100644 --- a/lisp/net/dbus.el +++ b/lisp/net/dbus.el @@ -682,7 +682,9 @@ operation. One of the following keywords is returned: `:non-existent': Service name does not exist on this bus. `:not-owner': We are neither the primary owner nor waiting in the -queue of this service." +queue of this service. + +When SERVICE is not a known name but a unique name, the function returns nil." (maphash (lambda (key value) @@ -694,14 +696,17 @@ queue of this service." (puthash key (delete elt value) dbus-registered-objects-table) (remhash key dbus-registered-objects-table))))))) dbus-registered-objects-table) - (let ((reply (dbus-call-method - bus dbus-service-dbus dbus-path-dbus dbus-interface-dbus - "ReleaseName" service))) - (pcase reply - (1 :released) - (2 :non-existent) - (3 :not-owner) - (_ (signal 'dbus-error (list "Could not unregister service" service)))))) + + (unless (string-prefix-p ":" service) + (let ((reply (dbus-call-method + bus dbus-service-dbus dbus-path-dbus dbus-interface-dbus + "ReleaseName" service))) + (pcase reply + (1 :released) + (2 :non-existent) + (3 :not-owner) + (_ (signal + 'dbus-error (list "Could not unregister service" service))))))) (defun dbus-register-signal (bus service path interface signal handler &rest args) From 0676a02931014e64160c71207ab4ef8d4a33a9b1 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Fri, 24 Nov 2023 16:34:26 +0100 Subject: [PATCH 3/5] Extend D-Bus doc and test * doc/misc/dbus.texi (Register Objects): Adapt doc of dbus-unregister-service. * test/lisp/net/dbus-tests.el (dbus--test-register-service): Extend test. --- doc/misc/dbus.texi | 3 +++ test/lisp/net/dbus-tests.el | 3 +++ 2 files changed, 6 insertions(+) diff --git a/doc/misc/dbus.texi b/doc/misc/dbus.texi index 2bd6b9556c8..9dff54ff94a 100644 --- a/doc/misc/dbus.texi +++ b/doc/misc/dbus.texi @@ -1418,6 +1418,9 @@ The name @var{service} does not exist on the bus. @item :not-owner We are not an owner of the name @var{service}. @end table + +When @var{service} is not a known name but a unique name, the function +returns nil. @end defun When a name has been chosen, Emacs can offer its own methods, which diff --git a/test/lisp/net/dbus-tests.el b/test/lisp/net/dbus-tests.el index 418ae61bb42..66240efd882 100644 --- a/test/lisp/net/dbus-tests.el +++ b/test/lisp/net/dbus-tests.el @@ -465,6 +465,9 @@ (should (eq (dbus-unregister-service bus dbus--test-service) :non-existent)) (should-not (member dbus--test-service (dbus-list-known-names bus))) + ;; Unregistering a unique name returns nil. + (should-not (dbus-unregister-service bus ":1.1")) + ;; A service name is a string, constructed of at least two words ;; separated by ".". (should From 6f843f03dc21c64d2535105c5bf91180aba554d1 Mon Sep 17 00:00:00 2001 From: nverno Date: Fri, 24 Nov 2023 07:18:26 -0800 Subject: [PATCH 4/5] typescript-ts-mode: Add missing 'operator' to treesit-font-lock-features * lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode): Add operator to treesit-font-lock-feature-list (bug#67433). --- 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 4e039abd236..a2b16d1beea 100644 --- a/lisp/progmodes/typescript-ts-mode.el +++ b/lisp/progmodes/typescript-ts-mode.el @@ -428,7 +428,7 @@ This mode is intended to be inherited by concrete major modes." '((comment declaration) (keyword string escape-sequence) (constant expression identifier number pattern property) - (function bracket delimiter))) + (operator function bracket delimiter))) (setq-local syntax-propertize-function #'typescript-ts--syntax-propertize) (treesit-major-mode-setup))) From 77ab00207d6b421e94500ef6e32624c629e58e08 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 25 Nov 2023 11:48:38 +0200 Subject: [PATCH 5/5] ; * admin/authors.el (authors-aliases): Add Noah Peart. --- admin/authors.el | 1 + 1 file changed, 1 insertion(+) diff --git a/admin/authors.el b/admin/authors.el index 266b52f4c90..bbb7a928912 100644 --- a/admin/authors.el +++ b/admin/authors.el @@ -200,6 +200,7 @@ files.") (nil "montag451@laposte\\.net") (nil "na@aisrntairetnraoitn") ("Nelson Jose dos Santos Ferreira" "Nelson Ferreira") + ("Noah Peart" "noah\\.v\\.peart@gmail\\.com") ("Noorul Islam" "Noorul Islam K M") ;;; ("Tetsurou Okazaki" "OKAZAKI Tetsurou") ; FIXME? (nil "odanoburu@")