1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-27 07:37:33 +00:00

Fix bug #14739 with creation of GUI frames from TTY session on Windows.

src/w32fns.c (Fx_create_frame): Error out if called from a TTY
 session.

 lisp/frame.el (window-system-for-display): Don't allow to create a
 GUI frame from a -nw session on MS-Windows.
This commit is contained in:
Eli Zaretskii 2013-12-28 13:47:26 +02:00
parent efe702196a
commit bf7bea5de0
4 changed files with 21 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2013-12-28 Eli Zaretskii <eliz@gnu.org>
* frame.el (window-system-for-display): Don't allow to create a
GUI frame from a -nw session on MS-Windows. (Bug#14739)
2013-12-28 Glenn Morris <rgm@gnu.org> 2013-12-28 Glenn Morris <rgm@gnu.org>
* mail/hashcash.el (hashcash-program): Rename from hashcash-path. * mail/hashcash.el (hashcash-program): Rename from hashcash-path.

View File

@ -540,10 +540,14 @@ is not considered (see `next-frame')."
(defun window-system-for-display (display) (defun window-system-for-display (display)
"Return the window system for DISPLAY. "Return the window system for DISPLAY.
Return nil if we don't know how to interpret DISPLAY." Return nil if we don't know how to interpret DISPLAY."
(cl-loop for descriptor in display-format-alist ;; MS-Windows doesn't know how to create a GUI frame in a -nw session.
for pattern = (car descriptor) (if (and (eq system-type 'windows-nt)
for system = (cdr descriptor) (null (window-system)))
when (string-match-p pattern display) return system)) nil
(cl-loop for descriptor in display-format-alist
for pattern = (car descriptor)
for system = (cdr descriptor)
when (string-match-p pattern display) return system)))
(defun make-frame-on-display (display &optional parameters) (defun make-frame-on-display (display &optional parameters)
"Make a frame on display DISPLAY. "Make a frame on display DISPLAY.

View File

@ -1,3 +1,8 @@
2013-12-28 Eli Zaretskii <eliz@gnu.org>
* w32fns.c (Fx_create_frame): Error out if called from a TTY
session. (Bug#14739)
2013-12-27 Jarek Czekalski <jarekczek@poczta.onet.pl> 2013-12-27 Jarek Czekalski <jarekczek@poczta.onet.pl>
* callproc.c (Vexec_path): Document that exec-directory is in it. * callproc.c (Vexec_path): Document that exec-directory is in it.

View File

@ -4346,6 +4346,9 @@ This function is an internal primitive--use `make-frame' instead. */)
Lisp_Object parent; Lisp_Object parent;
struct kboard *kb; struct kboard *kb;
if (!FRAME_W32_P (SELECTED_FRAME ()))
error ("Cannot create a GUI frame in a -nw session");
/* Make copy of frame parameters because the original is in pure /* Make copy of frame parameters because the original is in pure
storage now. */ storage now. */
parameters = Fcopy_alist (parameters); parameters = Fcopy_alist (parameters);