Commit f0a10576 authored by Jan Djärv's avatar Jan Djärv

Disallow suspend-emacs under NS

* term/ns-win.el (ns-suspend-error): New function.
(ns-initialize-window-system): Add ns-suspend-error to
suspend-hook.

Fixes: debbugs:16612
parent b4168649
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.
......
......@@ -863,6 +863,12 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.")
(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)
......@@ -944,6 +950,10 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.")
(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.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment