Commit e7cc6aa5 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(x-create-frame-with-faces): Delete the frame if get error.

parent 8be055fd
......@@ -816,7 +816,10 @@ selected frame."
(let* ((visibility-spec (assq 'visibility parameters))
(frame (x-create-frame (cons '(visibility . nil) parameters)))
(faces (copy-alist global-face-data))
success
(rest faces))
(unwind-protect
(progn
(set-frame-face-alist frame faces)
(if (cdr (or (assq 'reverse parameters)
......@@ -851,7 +854,10 @@ selected frame."
(if (null visibility-spec)
(make-frame-visible frame)
(modify-frame-parameters frame (list visibility-spec)))
frame)))
(setq success t)
frame)
(or success
(delete-frame frame))))))
;; Update a frame's faces when we change its default font.
(defun frame-update-faces (frame)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment