]> git.eshelyaron.com Git - emacs.git/commitdiff
(x-win-suspend-error): Don't signal error if there are no X frames
authorChong Yidong <cyd@stupidchicken.com>
Thu, 28 Aug 2008 21:16:05 +0000 (21:16 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Thu, 28 Aug 2008 21:16:05 +0000 (21:16 +0000)
active.

lisp/term/x-win.el

index a8813aeb91760b6774aa6ee77fd5a4778fb712c2..2770fad84e641bb83e7783d9fe86e9d2297e0932 100644 (file)
@@ -1441,7 +1441,9 @@ The value nil is the same as this list:
 ;;; 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.")