aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/term
diff options
context:
space:
mode:
authorJan Djärv2014-02-02 15:10:50 +0100
committerJan Djärv2014-02-02 15:10:50 +0100
commitf0a105764675324e5ea1f64f5592ab79a9da001f (patch)
treeac6ca693d45c916b62914b2bca3a22deb4204cc0 /lisp/term
parentb41686493e1ba1c377c7d7621249a176a1dd4dd9 (diff)
downloademacs-f0a105764675324e5ea1f64f5592ab79a9da001f.tar.gz
emacs-f0a105764675324e5ea1f64f5592ab79a9da001f.zip
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
Diffstat (limited to 'lisp/term')
-rw-r--r--lisp/term/ns-win.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el
index ba6519f3c09..d91b594671f 100644
--- a/lisp/term/ns-win.el
+++ b/lisp/term/ns-win.el
@@ -863,6 +863,12 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.")
863 (t 863 (t
864 nil)))) 864 nil))))
865 865
866(defun ns-suspend-error ()
867 ;; Don't allow suspending if any of the frames are NS frames.
868 (if (memq 'ns (mapcar 'window-system (frame-list)))
869 (error "Cannot suspend Emacs while running under NS")))
870
871
866;; Set some options to be as Nextstep-like as possible. 872;; Set some options to be as Nextstep-like as possible.
867(setq frame-title-format t 873(setq frame-title-format t
868 icon-title-format t) 874 icon-title-format t)
@@ -944,6 +950,10 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.")
944 (ns-set-resource nil "ApplePressAndHoldEnabled" "NO") 950 (ns-set-resource nil "ApplePressAndHoldEnabled" "NO")
945 951
946 (x-apply-session-resources) 952 (x-apply-session-resources)
953
954 ;; Don't let Emacs suspend under NS.
955 (add-hook 'suspend-hook 'ns-suspend-error)
956
947 (setq ns-initialized t)) 957 (setq ns-initialized t))
948 958
949;; Any display name is OK. 959;; Any display name is OK.