emacs-lock-mode: user-error instead of error

* lisp/emacs-lock.el (emacs-lock--kill-emacs-hook): Use 'user-error'
instead of signaling an error.  (Bug#81292)
This commit is contained in:
Lin Sun 2026-06-24 06:05:01 +00:00 committed by Eli Zaretskii
parent f6a86d6492
commit 43f2c8f969

View file

@ -146,7 +146,7 @@ Used from `kill-emacs-hook' (which see)."
(let ((locked (emacs-lock--exit-locked-buffer)))
(when locked
(run-hook-with-args 'emacs-lock-locked-buffer-functions locked)
(error "Emacs cannot exit because buffer %S is locked"
(user-error "Emacs cannot exit because buffer %S is locked"
(buffer-name locked)))))
(defun emacs-lock--kill-emacs-query-functions ()