emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master d8726dd382a: Merge from origin/emacs-29


From: Eli Zaretskii
Subject: master d8726dd382a: Merge from origin/emacs-29
Date: Sat, 25 Nov 2023 06:43:27 -0500 (EST)

branch: master
commit d8726dd382a74737d19b958eaa037232fc9fb592
Merge: 8157d49060b 77ab00207d6
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Merge from origin/emacs-29
    
    77ab00207d6 ; * admin/authors.el (authors-aliases): Add Noah Peart.
    6f843f03dc2 typescript-ts-mode: Add missing 'operator' to treesit-fon...
    0676a029310 Extend D-Bus doc and test
    df094dd4bc1 Do not unregister a D-Bus service which is a unique name
    e6ad97a3338 Fix byte-compilation warnings about 'sqlite-rollback'
---
 admin/authors.el                     |  1 +
 doc/misc/dbus.texi                   |  3 +++
 lisp/emacs-lisp/multisession.el      |  2 --
 lisp/net/dbus.el                     | 23 ++++++++++++++---------
 lisp/progmodes/typescript-ts-mode.el |  2 +-
 lisp/sqlite.el                       |  4 ++++
 test/lisp/net/dbus-tests.el          |  3 +++
 7 files changed, 26 insertions(+), 12 deletions(-)

diff --git a/admin/authors.el b/admin/authors.el
index 2108f481a0c..7fb616ac0b7 100644
--- a/admin/authors.el
+++ b/admin/authors.el
@@ -176,6 +176,7 @@ files.")
     ("Miha Rihtaršič" "Miha Rihtarsic")
     ("Mikio Nakajima" "Nakajima Mikio")
     ("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?
     ("Óscar Fuentes" "Oscar Fuentes")
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/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/net/dbus.el b/lisp/net/dbus.el
index fff860b05c3..f17b7388844 100644
--- a/lisp/net/dbus.el
+++ b/lisp/net/dbus.el
@@ -686,7 +686,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)
@@ -698,14 +700,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)
diff --git a/lisp/progmodes/typescript-ts-mode.el 
b/lisp/progmodes/typescript-ts-mode.el
index b6d5495adbb..0503c724d36 100644
--- a/lisp/progmodes/typescript-ts-mode.el
+++ b/lisp/progmodes/typescript-ts-mode.el
@@ -483,7 +483,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)))
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
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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]