[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 28718c4: Avoid userlock queries hanging forever in
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] master 28718c4: Avoid userlock queries hanging forever in batch mode |
Date: |
Fri, 14 Apr 2017 21:18:12 -0400 (EDT) |
branch: master
commit 28718c4449972640c39a7be1b62ccc7f50c6e801
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>
Avoid userlock queries hanging forever in batch mode
* lisp/userlock.el (ask-user-about-lock)
(ask-user-about-supersession-threat): Abort in batch mode.
---
lisp/userlock.el | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lisp/userlock.el b/lisp/userlock.el
index fc0d3e3..a8eb24b 100644
--- a/lisp/userlock.el
+++ b/lisp/userlock.el
@@ -61,6 +61,7 @@ in any way you like."
(while (null answer)
(message "%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))
@@ -149,6 +150,9 @@ really edit the buffer? (y, n, r or C-h) "
(file-name-nondirectory fn)))
(choices '(?y ?n ?r ?? ?\C-h))
answer)
+ (when noninteractive
+ (message "%s" prompt)
+ (error "Cannot resolve conflict in batch mode"))
(while (null answer)
(setq answer (read-char-choice prompt choices))
(cond ((memq answer '(?? ?\C-h))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 28718c4: Avoid userlock queries hanging forever in batch mode,
Glenn Morris <=