diff lisp/term/x-win.el @ 97805:e826c0ef09ff

(x-win-suspend-error): Don't signal error if there are no X frames active.
author Chong Yidong <cyd@stupidchicken.com>
date Thu, 28 Aug 2008 21:16:05 +0000
parents 4332a13750d7
children 16244bb150a1
line wrap: on
line diff
--- a/lisp/term/x-win.el	Thu Aug 28 21:15:57 2008 +0000
+++ b/lisp/term/x-win.el	Thu Aug 28 21:16:05 2008 +0000
@@ -1441,7 +1441,9 @@
 ;;; Window system initialization.
 
 (defun x-win-suspend-error ()
-  (error "Suspending an Emacs running under X makes no sense"))
+  ;; Don't allow suspending if any of the frames are X frames.
+  (if (memq 'x (mapcar 'window-system (frame-list)))
+      (error "Cannot suspend Emacs while running under X")))
 
 (defvar x-initialized nil
   "Non-nil if the X window system has been initialized.")