aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/nsfns.m13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/nsfns.m b/src/nsfns.m
index 98801d8526f..454a6fdab62 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -1953,8 +1953,11 @@ DEFUN ("ns-hide-emacs", Fns_hide_emacs, Sns_hide_emacs,
1953 doc: /* If ON is non-nil, the entire Emacs application is hidden. 1953 doc: /* If ON is non-nil, the entire Emacs application is hidden.
1954Otherwise if Emacs is hidden, it is unhidden. 1954Otherwise if Emacs is hidden, it is unhidden.
1955If ON is equal to `activate', Emacs is unhidden and becomes 1955If ON is equal to `activate', Emacs is unhidden and becomes
1956the active application. */) 1956the active application.
1957 (Lisp_Object on) 1957If ON is equal to `activate-front', Emacs is unhidden and
1958becomes the active application, but only the selected frame
1959is layered in front of the windows of other applications. */)
1960 (Lisp_Object on)
1958{ 1961{
1959 check_window_system (NULL); 1962 check_window_system (NULL);
1960 if (EQ (on, intern ("activate"))) 1963 if (EQ (on, intern ("activate")))
@@ -1962,6 +1965,12 @@ the active application. */)
1962 [NSApp unhide: NSApp]; 1965 [NSApp unhide: NSApp];
1963 [NSApp activateIgnoringOtherApps: YES]; 1966 [NSApp activateIgnoringOtherApps: YES];
1964 } 1967 }
1968 else if (EQ (on, intern ("activate-front")))
1969 {
1970 [NSApp unhide: NSApp];
1971 [[NSRunningApplication currentApplication]
1972 activateWithOptions: NSApplicationActivateIgnoringOtherApps];
1973 }
1965 else if (NILP (on)) 1974 else if (NILP (on))
1966 [NSApp unhide: NSApp]; 1975 [NSApp unhide: NSApp];
1967 else 1976 else