Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Fix support for macOS multi-tty in Emacs 27.1
diff --git a/lisp/server.el b/lisp/server.el
index 5efba17a01..c194d78ad1 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -1182,10 +1182,9 @@ The following commands are accepted by the client:
;; choice there.) In daemon mode on Windows, we can't
;; make tty frames, so force the frame type to GUI
;; there too.
- (when (or (and (eq system-type 'windows-nt)
- (or (daemonp)
- (eq window-system 'w32)))
- (eq window-system 'mac))
+ (when (and (eq system-type 'windows-nt)
+ (or (daemonp)
+ (eq window-system 'w32)))
(push "-window-system" args-left)))
;; -position +LINE[:COLUMN]: Set point to the given
diff --git a/src/frame.c b/src/frame.c
index 843312ab78..d68081002f 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -1267,12 +1267,8 @@ affects all frames on the same terminal device. */)
emacs_abort ();
#else /* not MSDOS */
-#if defined WINDOWSNT || defined HAVE_MACGUI /* This should work now! */
- if (sf->output_method != output_termcap
-#ifdef HAVE_MACGUI
- && sf->output_method != output_initial
-#endif
- )
+#ifdef WINDOWS_NT /* This should work now */
+ if (sf->output_method != output_termcap)
error ("Not using an ASCII terminal now; cannot make a new ASCII frame");
#endif
#endif /* not MSDOS */
diff --git a/src/macterm.c b/src/macterm.c
index ce7c96e29c..69ec3c7a1a 100644
--- a/src/macterm.c
+++ b/src/macterm.c
@@ -2946,6 +2946,7 @@ mac_mouse_position (struct frame **fp, int insist, Lisp_Object *bar_window,
{
struct frame *f1;
struct mac_display_info *dpyinfo = FRAME_DISPLAY_INFO (*fp);
+ struct frame *sf = SELECTED_FRAME ();
block_input ();
@@ -2966,7 +2967,7 @@ mac_mouse_position (struct frame **fp, int insist, Lisp_Object *bar_window,
else
f1 = XFRAME (mac_event_frame ());
- if (f1)
+ if (f1 && sf->output_method != output_termcap)
{
/* Ok, we found a frame. Store all the values.
last_mouse_glyph is a rectangle used to reduce the
@genegoykhman

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.