summaryrefslogtreecommitdiff
path: root/lisp/startup.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2006-11-05 17:35:08 +0000
committerChong Yidong <cyd@stupidchicken.com>2006-11-05 17:35:08 +0000
commit4e35ba2f2e682faafc2a0f4abd738d3d208cbc8a (patch)
treee250ba86c00ff16ab9811ae897c9970e93ad4463 /lisp/startup.el
parented58e877259ffc72f9d2fc2359d607b518dbe732 (diff)
downloademacs-4e35ba2f2e682faafc2a0f4abd738d3d208cbc8a.tar.gz
(command-line-1): Kill emacs if the last frame is deleted while
evaluating the command-line arguments.
Diffstat (limited to 'lisp/startup.el')
-rw-r--r--lisp/startup.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/startup.el b/lisp/startup.el
index 91491ac25e2..8268ac53400 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -1893,7 +1893,12 @@ With a prefix argument, any user input hides the splash screen."
(setq line 0)
(unless (< column 1)
(move-to-column (1- column)))
- (setq column 0))))))))
+ (setq column 0))))))
+ ;; In unusual circumstances, the execution of Lisp code due
+ ;; to command-line options can cause the last visible frame
+ ;; to be deleted. In this case, kill emacs to avoid an
+ ;; abort later.
+ (unless (frame-live-p (selected-frame)) (kill-emacs nil))))
;; If 3 or more files visited, and not all visible,
;; show user what they all are. But leave the last one current.