Merge from origin/emacs-29
77ab00207d
; * admin/authors.el (authors-aliases): Add Noah Peart.6f843f03dc
typescript-ts-mode: Add missing 'operator' to treesit-fon...0676a02931
Extend D-Bus doc and testdf094dd4bc
Do not unregister a D-Bus service which is a unique namee6ad97a333
Fix byte-compilation warnings about 'sqlite-rollback'
This commit is contained in:
commit
d8726dd382
7 changed files with 26 additions and 12 deletions
|
@ -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")
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)))
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue