* term/ns-win.el (ns-suspend-error): New function.
(ns-initialize-window-system): Add ns-suspend-error to
suspend-hook.
Fixes: debbugs:16612
+2014-02-02 Jan Djärv <jan.h.d@swipnet.se>
+
+ * term/ns-win.el (ns-suspend-error): New function.
+ (ns-initialize-window-system): Add ns-suspend-error to
+ suspend-hook (Bug#16612).
+
2014-02-02 Daniel Colascione <dancol@dancol.org>
* progmodes/cc-defs.el (c-find-assignment-for-mode): Make loading cc-mode silent.
(t
nil))))
+(defun ns-suspend-error ()
+ ;; Don't allow suspending if any of the frames are NS frames.
+ (if (memq 'ns (mapcar 'window-system (frame-list)))
+ (error "Cannot suspend Emacs while running under NS")))
+
+
;; Set some options to be as Nextstep-like as possible.
(setq frame-title-format t
icon-title-format t)
(ns-set-resource nil "ApplePressAndHoldEnabled" "NO")
(x-apply-session-resources)
+
+ ;; Don't let Emacs suspend under NS.
+ (add-hook 'suspend-hook 'ns-suspend-error)
+
(setq ns-initialized t))
;; Any display name is OK.