branch: externals/transient commit b326421f93bbdb89a2aa33b85416afe5e8064671 Author: Jonas Bernoulli <jo...@bernoul.li> Commit: Jonas Bernoulli <jo...@bernoul.li>
transient--emergency-exit: Always reset inhibit-quit We already call `transient--post-exit', which also takes care of this, but to be absolutely sure, also reset here and unconditionally (i.e., even if `transient--prefix' is nil or `transient--exitp' is `replace'). Before the emergency exit was added, unexpected bugs could look up Emacs. That does not happen anymore, and we can also rely on it to guarantee quitting is enabled again. --- CHANGELOG | 5 +++++ lisp/transient.el | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 54a9275957..ea277f32d3 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,9 @@ # -*- mode: org -*- +* v0.9.1 UNRELEASED + +- As an additional safety measure, unconditionally reset ~inhibit-quit~ + when the emergency exit is taken. + * v0.9.0 2025-06-01 - Key descriptions (as returned by ~key-description~ and understood by diff --git a/lisp/transient.el b/lisp/transient.el index e5b309bcae..445a457f1c 100644 --- a/lisp/transient.el +++ b/lisp/transient.el @@ -3078,9 +3078,10 @@ value. Otherwise return CHILDREN as is.") (defun transient--emergency-exit (&optional id) "Exit the current transient command after an error occurred. When no transient is active (i.e., when `transient--prefix' is -nil) then do nothing. Optional ID is a keyword identifying the -exit." +nil) then only reset `inhibit-quit'. Optional ID is a keyword +identifying the exit." (transient--debug 'emergency-exit id) + (set-default-toplevel-value 'inhibit-quit nil) (when transient--prefix (setq transient--stack nil) (setq transient--exitp t)