1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-26 07:33:47 +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>
* 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)
"Return the window system for DISPLAY.
Return nil if we don't know how to interpret DISPLAY."
(cl-loop for descriptor in display-format-alist
for pattern = (car descriptor)
for system = (cdr descriptor)
when (string-match-p pattern display) return system))
;; MS-Windows doesn't know how to create a GUI frame in a -nw session.
(if (and (eq system-type 'windows-nt)
(null (window-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)
"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>
* 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;
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
storage now. */
parameters = Fcopy_alist (parameters);