[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r116243: Disallow suspend-emacs under NS
From: |
Jan D. |
Subject: |
[Emacs-diffs] trunk r116243: Disallow suspend-emacs under NS |
Date: |
Sun, 02 Feb 2014 14:10:56 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 116243
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/16612
committer: Jan D. <address@hidden>
branch nick: trunk
timestamp: Sun 2014-02-02 15:10:50 +0100
message:
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.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/term/ns-win.el nswin.el-20091113204419-o5vbwnq5f7feedwu-8708
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2014-02-02 10:25:29 +0000
+++ b/lisp/ChangeLog 2014-02-02 14:10:50 +0000
@@ -1,3 +1,9 @@
+2014-02-02 Jan Djärv <address@hidden>
+
+ * 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 <address@hidden>
* progmodes/cc-defs.el (c-find-assignment-for-mode): Make loading
cc-mode silent.
=== modified file 'lisp/term/ns-win.el'
--- a/lisp/term/ns-win.el 2014-01-20 19:44:56 +0000
+++ b/lisp/term/ns-win.el 2014-02-02 14:10:50 +0000
@@ -863,6 +863,12 @@
(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 @@
(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.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r116243: Disallow suspend-emacs under NS,
Jan D. <=