diff --git a/lisp/userlock.el b/lisp/userlock.el index 4623608f1db..91d5b7308dd 100644 --- a/lisp/userlock.el +++ b/lisp/userlock.el @@ -64,10 +64,11 @@ in any way you like." (match-string 0 opponent))) opponent)) (while (null answer) + (when noninteractive + (signal 'file-locked (list file opponent "Cannot resolve lock conflict in batch mode"))) (message (substitute-command-keys "%s locked by %s: (\\`s', \\`q', \\`p', \\`?')? ") short-file short-opponent) - (if noninteractive (error "Cannot resolve lock conflict in batch mode")) (let ((tem (let ((inhibit-quit t) (cursor-in-echo-area t)) (prog1 (downcase (read-char))